/* ==========================================================================
   Dometas.lt — bendri stiliai
   ========================================================================== */

:root {
  --accent: #ffbd1f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #f3f0ea;
  color: #1c1b19;
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection { background: var(--accent); color: #1a1a1a; }

input::placeholder,
textarea::placeholder { color: #9a958c; }

/* --- Animacijos --- */
@keyframes dm-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(9px); }
}
@keyframes dm-fadeup {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes dm-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* Reveal-on-scroll
   Turinys matomas pagal nutylėjimą. Slepiame tik tada, kai shop.js tikrai
   paleistas — jis pačioje pradžioje prideda klasę `js` į <html>. Be JavaScript
   (arba kai shop.js neįkeliamas) turinys lieka matomas. */
[data-reveal] {
  opacity: 1;
  transform: none;
}
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.16,.8,.3,1),
              transform .7s cubic-bezier(.16,.8,.3,1);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Sumažintas judėjimas: turinys matomas iš karto, be animacijos. */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Nuotraukų vietos (placeholder) --- */
.img-slot {
  background: #e4ded2;
  color: #8a857b;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: inherit;
  min-height: 120px;
}

/* --- DUK --- */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* --- Formos elementai --- */
input, textarea, select, button { font-family: inherit; }

/* ==========================================================================
   MOBILI NAVIGACIJA
   ========================================================================== */
.dm-nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 9px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #f0ede7;
  flex: none;
}
.dm-nav-toggle svg { display: block; width: 22px; height: 22px; }
.dm-nav-toggle[aria-expanded="true"] { background: rgba(255,189,31,.14); border-color: rgba(255,189,31,.4); color: var(--accent, #ffbd1f); }

/* Nav on light background (kontaktai etc.) - toggle appearance */
.dm-nav-toggle.is-light {
  border-color: rgba(0,0,0,.18);
  color: #1a1a1a;
}

/* --- Mobile drawer overlay --- */
.dm-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(14,14,14,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
}
.dm-mobile-drawer.is-open { display: block; }
.dm-mobile-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 88vw);
  background: #1e1e1e;
  padding: 22px 22px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: dm-slide-in .28s ease;
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
}
.dm-mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: #d8d5cf;
  font-size: 24px;
  cursor: pointer;
  padding: 6px 10px;
  margin-bottom: 10px;
}
.dm-mobile-drawer-panel a,
.dm-mobile-drawer-panel button {
  display: block;
  text-decoration: none;
  color: #e7e5df;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.dm-mobile-drawer-panel a:hover,
.dm-mobile-drawer-panel button:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.dm-mobile-drawer-panel a.is-cta {
  background: var(--accent, #ffbd1f);
  color: #1a1a1a;
  font-weight: 800;
  margin-top: 8px;
  text-align: center;
}
.dm-mobile-drawer-panel button.is-calc {
  color: var(--accent, #ffbd1f);
  border: 1.5px solid rgba(255,189,31,.4);
  margin-top: 8px;
  text-align: center;
}

/* ==========================================================================
   RESPONSIVE — Mobiliems ekranams
   ========================================================================== */
@media (max-width: 900px) {
  .dm-nav-toggle { display: inline-flex; }
  /* Slėpiame originalų desktop meniu — pastebime tarp <a> ir mygtukų grupę */
  .dm-nav-links { display: none !important; }
}

@media (max-width: 640px) {
  /* Top bar — sutraukti į column */
  .dm-top-bar {
    flex-direction: column !important;
    gap: 6px !important;
    align-items: flex-start !important;
    padding: 8px 16px !important;
  }
  .dm-top-bar > div { justify-content: flex-start !important; }

  /* Nav padding */
  nav#site-nav > div { padding: 12px 16px !important; }

  /* Sekcijų padding */
  section > div { padding-left: 16px !important; padding-right: 16px !important; }

  /* Hero */
  #pradzia { min-height: auto !important; }
  #pradzia h1 { font-size: 34px !important; }
  #pradzia p { font-size: 15.5px !important; }
  #pradzia a { padding: 14px 22px !important; font-size: 15px !important; }

  /* Bendra headline */
  h1 { font-size: 32px !important; line-height: 1.1 !important; }
  h2 { font-size: 26px !important; line-height: 1.15 !important; }
  h3 { font-size: 18px !important; }

  /* Kortelės — vieno stulpelio */
  .dm-grid-auto,
  section [style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }

  /* Trust counter tekstai */
  [data-count] { font-size: 34px !important; }

  /* Sticky CTA — mažesnis */
  body > div[style*="position:fixed"][style*="right:18px"] {
    right: 12px !important;
    bottom: 12px !important;
  }
  body > div[style*="position:fixed"][style*="right:18px"] button {
    padding: 12px 18px !important;
    font-size: 14px !important;
  }

  /* Footer grid — vienas stulpelis */
  footer > div:first-child {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 40px 16px 26px !important;
  }

  /* Skaičiuokle CTA — sutrumpinti padding */
  #skaiciuokle > div > div { padding: 30px 22px !important; }

  /* Formos — full-width */
  input, textarea, select { font-size: 15px !important; }
}

@media (max-width: 480px) {
  /* Filter mygtukai gali sluoksniuotis */
  [data-filter] {
    font-size: 13px !important;
    padding: 8px 14px !important;
  }

  /* Galerija — mažesnės eilutės */
  #darbai [style*="grid-auto-rows:220px"] { grid-auto-rows: 180px !important; }
}

/* ==========================================================================
   SKAIČIUOKLĖS OPTION KORTELĖ SU NUOTRAUKA
   ========================================================================== */
.dm-opt-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  border-radius: 14px;
  border: 2px solid #e3ded3;
  background: #ffffff;
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  overflow: hidden;
  padding: 0;
}
.dm-opt-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.dm-opt-card.is-selected {
  border-color: var(--accent, #ffbd1f);
  background: rgba(255,189,31,.10);
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.dm-opt-card .dm-opt-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f0ebe0 center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,.06);
  overflow: hidden;
}
.dm-opt-card .dm-opt-img img,
.dm-opt-card .dm-opt-img svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dm-opt-card .dm-opt-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.dm-opt-card .dm-opt-swatch {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.12);
}
.dm-opt-card .dm-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.dm-opt-card .dm-opt-title {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.25;
}
.dm-opt-card .dm-opt-sub {
  font-size: 12.5px;
  color: #6b6862;
  line-height: 1.35;
}
.dm-opt-card .dm-opt-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cfcabd;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-opt-card.is-selected .dm-opt-radio {
  border-color: var(--accent, #ffbd1f);
  background: var(--accent, #ffbd1f);
}
.dm-opt-card.is-selected .dm-opt-radio::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1a1a1a;
  display: block;
}

/* Grid for option cards inside calculator */
.dm-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
@media (max-width: 520px) {
  .dm-opt-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
  .dm-opt-card .dm-opt-title { font-size: 14px; }
  .dm-opt-card .dm-opt-sub { font-size: 12px; }
  .dm-opt-card .dm-opt-body { padding: 10px 12px; }
}

/* ==========================================================================
   KATEGORIJŲ MENIU NAVIGACIJOJE
   ========================================================================== */
.dm-cats { position: relative; }
.dm-cats-toggle:hover { color: #ffffff; background: rgba(255,255,255,.05); }

.dm-cats-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: -16px;
  display: none;
  gap: 30px;
  background: #1f1f1f;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 26px 60px rgba(0,0,0,.45);
  z-index: 70;
  min-width: 540px;
}
.dm-cats:hover .dm-cats-panel,
.dm-cats:focus-within .dm-cats-panel { display: flex; }

/* Nematomas tiltelis, kad pelė nespėtų „iškristi“ tarp mygtuko ir lango */
.dm-cats-panel::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.dm-cats-col { display: flex; flex-direction: column; gap: 3px; min-width: 230px; }
.dm-cats-head {
  color: #ffbd1f;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 7px;
}
.dm-cats-item {
  color: #cdcbc5;
  text-decoration: none;
  font-size: 14.5px;
  padding: 7px 8px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dm-cats-item:hover { background: rgba(255,255,255,.06); color: #ffffff; }
.dm-cats-item span { color: #807c75; font-size: 12.5px; font-weight: 700; }

@media (max-width: 900px) { .dm-cats-panel { display: none !important; } }

/* --- Filtrų juosta prekių sąraše --- */
.dm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
}
.dm-filters a {
  background: transparent;
  color: #57534b;
  border: 1.5px solid rgba(0,0,0,.16);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: all .2s;
}
.dm-filters a:hover { border-color: #a9740a; color: #a9740a; }
.dm-filters a.is-active {
  background: #ffbd1f;
  border-color: #ffbd1f;
  color: #1a1a1a;
}

/* ==========================================================================
   TEKSTINIŲ PUSLAPIŲ TIPOGRAFIJA
   ========================================================================== */
.dm-prose { color: #3f3b35; font-size: 16.5px; line-height: 1.7; }
.dm-prose > *:first-child { margin-top: 0; }
.dm-prose h2 {
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 800;
  color: #1c1b19;
  letter-spacing: -.01em;
  margin: 38px 0 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.dm-prose h3 { font-size: 19px; font-weight: 800; color: #1c1b19; margin: 26px 0 10px; }
.dm-prose p { margin: 0 0 16px; }
.dm-prose ul, .dm-prose ol { margin: 0 0 18px; padding-left: 22px; }
.dm-prose li { margin: 0 0 8px; }
.dm-prose a { color: #a9740a; }
.dm-prose strong { color: #1c1b19; }
.dm-prose em { color: #6b6862; }
.dm-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 22px;
  font-size: 15px;
}
.dm-prose th, .dm-prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.07); }
.dm-prose thead th { background: #faf8f4; font-weight: 800; color: #1c1b19; }
.dm-prose tbody tr:last-child th, .dm-prose tbody tr:last-child td { border-bottom: none; }
.dm-prose figure { margin: 0 0 22px; overflow-x: auto; }
.dm-pagelinks { display: flex; gap: 8px; font-weight: 700; font-size: 14px; margin-top: 26px; }
