/* ==========================================================================
   Hidroterm — page scaffolding, inner hero banners, shared page furniture
   ========================================================================== */

.page{position:relative;z-index:2;}
main{display:block;}

/* Grid/flex deca podrazumevano imaju min-width:auto, pa ih široki sadržaj
   (tabele, redovi sličica, dugački nazivi) gura preko ivice ekrana. */
.pd-grid>*,.shop-layout>*,.cart-layout>*,.split>*,.acc-layout>*,
.cfg-wrap>*,.statpanel .sp-in>*,.sec-head>*,.auth-wrap>*,.field-row>*{
  min-width:0;
}
.pd-info,.pd-gallery{max-width:100%;}

/* Content sits below the fixed navbar on every page except the home hero,
   which deliberately runs underneath it. */
body:not(.has-full-hero) main{padding-top:var(--nav-h);}
body{padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px));}
@media (min-width:1024px){body{padding-bottom:0;}}

/* ================================================== SURFACE VARIANTS */
/* Tamne površine nose po dva vrlo tiha izvora svetla. Bez njih velika
   sekcija sa dosta vazduha izgleda kao prazna crna zona, a ne kao prostor —
   gradijent je ispod praga svesne pažnje, ali oko odmah vidi dubinu. */
.surface-deep{
  background:
    radial-gradient(64% 46% at 82% 4%,rgba(28,56,106,.16),transparent 62%),
    radial-gradient(70% 50% at 10% 96%,rgba(47,94,126,.1),transparent 64%),
    var(--ink-950);
}
.surface-dark{
  background:
    radial-gradient(66% 48% at 14% 2%,rgba(47,94,126,.15),transparent 62%),
    radial-gradient(58% 44% at 90% 34%,rgba(28,56,106,.17),transparent 64%),
    var(--ink-900);
}
.surface-mid{
  background:
    radial-gradient(60% 40% at 88% 6%,rgba(74,120,146,.14),transparent 62%),
    linear-gradient(180deg,var(--ink-900),var(--ink-800));
}
.surface-petrol{background:linear-gradient(175deg,#12294B 0%,#1B3C60 55%,#24506E 100%);}
.surface-light{
  background:linear-gradient(180deg,var(--foam-50),#E3EDF1);
  color:var(--on-light);
}
.surface-light .lead,.surface-light .muted{color:var(--on-light-dim);}
.surface-light .faint{color:var(--on-light-faint);}
.surface-light .sec-label{color:var(--on-light-faint);}
.surface-light .hairline{background:var(--line-ink);}
.surface-light .rich{color:var(--on-light-dim);}
.surface-light .rich h2,.surface-light .rich h3,.surface-light .rich h4,
.surface-light .rich strong{color:var(--on-light);}
.surface-light .rich a{color:var(--navy-700);text-decoration-color:rgba(28,56,106,.4);}
.surface-light .rich th,.surface-light .rich td{border-bottom-color:var(--line-ink);}
.surface-light .crumbs{color:var(--on-light-faint);}
.surface-light .crumbs a:hover{color:var(--navy-700);}
.surface-light .acc-item{border-bottom-color:var(--line-ink);}
.surface-light .acc-btn{color:var(--on-light);}
.surface-light .acc-btn .acc-ico{border-color:rgba(11,26,51,.2);}
.surface-light .acc-btn[aria-expanded="true"] .acc-ico{background:var(--navy-700);color:var(--cream-50);}
.surface-light .spec-table tr{border-bottom-color:var(--line-ink);}
.surface-light .spec-table th{color:var(--on-light-dim);}
.surface-light .spec-table td{color:var(--on-light);}

/* ================================================== INNER HERO BANNER */
.inner-hero{
  position:relative;
  min-height:68svh;
  display:flex;align-items:flex-end;
  overflow:hidden;isolation:isolate;
  padding-top:calc(var(--nav-h) + 2rem);
  padding-bottom:clamp(3.5rem,7vw,6rem);
}
@media (max-width:767px){.inner-hero{min-height:56svh;}}
.inner-hero.is-compact{min-height:36svh;padding-bottom:clamp(2rem,4vw,3rem);}
@media (max-width:767px){.inner-hero.is-compact{min-height:34svh;}}

.inner-hero .ih-media{position:absolute;inset:0;z-index:0;}
.inner-hero .ih-media picture{position:absolute;inset:0;display:block;}
.inner-hero .ih-media img{width:100%;height:100%;object-fit:cover;filter:var(--grade-image-filter);}
/* Gradaciju nosi zajednička `.photo-grade` — iste vrednosti kao slajder na
   početnoj. Baner je ranije imao svoj, hladniji preliv.
   Razlika je samo u rasporedu: ovde ceo blok teksta (putanja, naslov, uvod)
   stoji uz dno, pa podnožni veo mora da počne više nego na početnoj. */
.inner-hero .photo-grade{--grade-s2:30%;--grade-s3:66%;--grade-bed:transparent;}
.inner-hero.is-compact .photo-grade{--grade-s2:24%;--grade-s3:62%;}
@media (max-width:767px){
  /* Na telefonu blok teksta zauzima gotovo pola banera, pa podnožni veo
     mora da krene više — putanja je inače padala na 3.8:1. */
  .inner-hero .photo-grade{--grade-s2:22%;--grade-s3:54%;}
  .inner-hero.is-compact .photo-grade{--grade-s2:18%;--grade-s3:50%;}
}
/* Putanja je mono tekst od 10px preko fotografije; na podrazumevanoj
   prigušenoj boji pada ispod 4.5:1. Na fotografiji ide puna boja. */
.inner-hero .crumbs{color:rgba(245,240,230,.9);text-shadow:var(--grade-text-shadow);}
.inner-hero .crumbs [aria-current]{color:var(--cream-50);}
.inner-hero h1{text-shadow:var(--grade-text-shadow);}
.inner-hero .ih-lead{text-shadow:var(--grade-text-shadow);}
.inner-hero .container,.inner-hero .container-wide{position:relative;z-index:3;}
.inner-hero h1{margin-top:.75rem;}
.inner-hero .ih-lead{margin-top:1rem;max-width:56ch;color:rgba(245,241,232,.95);font-size:clamp(.9375rem,.4vw + .85rem,1.0625rem);}

/* ======================================================= PAGE HEADERS */
.page-head{padding-block:clamp(2rem,4vw,3rem) clamp(1.5rem,3vw,2.5rem);}
.page-head h1{margin-top:.85rem;}

/* ============================================================== SPLIT */
.split{display:grid;gap:clamp(1.5rem,4vw,3.5rem);grid-template-columns:1fr;align-items:start;}
@media (min-width:900px){
  .split{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  .split.is-sidebar{grid-template-columns:280px minmax(0,1fr);}
  .split.is-sidebar-right{grid-template-columns:minmax(0,1fr) 340px;}
}

/* =========================================================== AUTH PAGE */
.auth-wrap{display:grid;grid-template-columns:1fr;min-height:100svh;}
@media (min-width:900px){.auth-wrap{grid-template-columns:minmax(0,1fr) minmax(480px,44%);}}
.auth-media{position:relative;overflow:hidden;display:none;isolation:isolate;}
@media (min-width:900px){.auth-media{display:block;}}
.auth-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:var(--grade-image-filter);}
/* Panel nema sekciju ispod sebe, pa poslednji pojas ostaje boja vela. */
.auth-media .photo-grade{--grade-foot:var(--grade-veil-bottom);}
.auth-media .am-copy{position:absolute;left:0;right:0;bottom:0;padding:clamp(2rem,4vw,3.5rem);z-index:2;}
.auth-panel{
  display:flex;flex-direction:column;justify-content:center;
  padding:calc(var(--nav-h) + 2rem) var(--gutter) 3rem;
  background:var(--ink-900);
}
.auth-card{width:100%;max-width:440px;margin-inline:auto;}

/* ========================================================== STEPPER */
.stepper{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:clamp(1.5rem,3vw,2.5rem);}
.stepper li{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:var(--text-faint);}
.stepper li+li::before{content:'';width:18px;height:1px;background:var(--line);}
.stepper .s-dot{
  width:24px;height:24px;border-radius:50%;display:grid;place-items:center;
  border:1px solid var(--glass-border);
  font-family:var(--font-mono);font-size:.5625rem;flex:0 0 24px;
  transition:background var(--t-ui),color var(--t-ui),border-color var(--t-ui);
}
.stepper li.is-done .s-dot{background:var(--petrol-500);border-color:var(--petrol-500);color:var(--cream-50);}
.stepper li.is-on .s-dot{background:var(--cream-50);border-color:var(--cream-50);color:var(--ink-900);}
.stepper li.is-on{color:var(--text);font-weight:600;}
.stepper .s-lbl{display:none;}
@media (min-width:640px){.stepper .s-lbl{display:inline;}}

/* progress bar */
.progbar{height:2px;background:var(--line);border-radius:2px;overflow:hidden;margin-bottom:1.5rem;}
.progbar i{display:block;height:100%;background:var(--cream-50);transition:width 420ms var(--ease-out);}

/* ====================================================== ORDER SUMMARY */
.summary{
  position:sticky;top:calc(var(--nav-h) + 1rem);
  max-height:calc(100svh - var(--nav-h) - 2rem - var(--dock-clear));
  overflow-y:auto;overscroll-behavior:contain;
}
.sum-row{display:flex;justify-content:space-between;gap:1rem;font-size:.875rem;padding-block:.45rem;}
.sum-row .sr-v{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap;}
.sum-total{
  display:flex;justify-content:space-between;gap:1rem;align-items:baseline;
  padding-top:.85rem;margin-top:.5rem;border-top:1px solid var(--line);
}
.sum-total .st-l{font-size:.9375rem;font-weight:600;}
.sum-total .st-v{font-size:1.375rem;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums;}

/* line item */
.line{display:flex;gap:.85rem;padding-block:1rem;border-bottom:1px solid var(--line);}
.line-media{
  width:72px;height:72px;flex:0 0 72px;border-radius:var(--r-sm);
  --stage-pad:8%;
}
.line-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem;}
.line-name{font-size:.875rem;font-weight:500;line-height:1.35;}
.line-var{font-family:var(--font-mono);font-size:.625rem;color:var(--text-faint);letter-spacing:.08em;}
.line-foot{display:flex;align-items:center;gap:.75rem;margin-top:auto;padding-top:.5rem;flex-wrap:wrap;}
.line-price{margin-left:auto;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;}

/* ============================================================ VAT NOTE */
.vat-note{font-size:.75rem;color:var(--text-faint);}

/* ======================================================== STICKY BUY */
.buybar{
  position:fixed;left:0;right:0;z-index:var(--z-sticky);
  bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom,0px));
  display:flex;align-items:center;gap:.85rem;
  padding:.7rem var(--gutter);
  background:rgba(8,20,38,.95);border-top:1px solid var(--line);
  transform:translateY(102%);transition:transform 380ms var(--ease-out);
}
@supports ((backdrop-filter:blur(1px))){.buybar{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);}}
.buybar.is-on{transform:translateY(0);}
@media (min-width:1024px){.buybar{display:none;}}
.buybar .bb-price{font-size:1.0625rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2;}
.buybar .bb-sub{font-size:.625rem;color:var(--text-faint);}
.buybar .btn{flex:1;max-width:220px;margin-left:auto;}

/* ============================================================== MASONRY
   Zid slaže CSS kolonama, a visina svake pločice dolazi iz odnosa stranica
   upisanog u podatke (--ar). Ranije je raspored merio `img.naturalHeight`,
   pa je cela galerija imala visinu nula dok se slike ne učitaju. */
.masonry{
  column-count:3;column-gap:clamp(.6rem,1.4vw,1rem);
}
@media (max-width:1023px){.masonry{column-count:2;}}
@media (max-width:539px){.masonry{column-count:1;}}

.work-tile{
  position:relative;display:block;width:100%;padding:0;
  break-inside:avoid;
  margin-bottom:clamp(.6rem,1.4vw,1rem);
  overflow:hidden;border-radius:var(--r-md);
  background:var(--ink-800);border:1px solid var(--line);cursor:zoom-in;
  text-align:left;isolation:isolate;
  transition:border-color var(--t-ui) var(--ease-out);
}
.work-tile:hover{border-color:rgba(238,244,245,.3);}
.work-tile .work-media{display:block;width:100%;aspect-ratio:var(--ar,4/3);}
.work-tile img{
  width:100%;height:100%;object-fit:cover;filter:saturate(.9);
  transition:transform 900ms var(--ease-out),filter 600ms var(--ease-out);
}
.work-tile:hover img{transform:scale(1.05);filter:saturate(1);}
.work-tile::after{
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,transparent 45%,rgba(5,14,28,.85) 100%);
  opacity:0;transition:opacity var(--t-slow) var(--ease-out);
}
.work-tile:hover::after,.work-tile:focus-visible::after{opacity:1;}
.work-tile .work-cap{
  position:absolute;left:0;right:0;bottom:0;z-index:2;
  display:flex;flex-direction:column;gap:.2rem;padding:1.5rem .9rem .8rem;
  opacity:0;transform:translateY(8px);
  transition:opacity var(--t-slow) var(--ease-out),transform var(--t-slow) var(--ease-out);
}
.work-tile:hover .work-cap,.work-tile:focus-visible .work-cap{opacity:1;transform:none;}
@media (hover:none){
  .work-tile .work-cap{opacity:1;transform:none;}
  .work-tile::after{opacity:1;}
}
.work-cap .wc-t{font-size:.8125rem;font-weight:600;line-height:1.3;color:var(--cream-50);}
.work-cap .wc-m{
  font-family:var(--font-mono);font-size:.5625rem;letter-spacing:.1em;
  color:var(--mist-200);text-transform:uppercase;
}

/* ============================================================== TILES */
.tiles{display:grid;gap:clamp(.7rem,1.6vw,1.1rem);grid-template-columns:repeat(auto-fill,minmax(180px,1fr));}
.tile{
  display:flex;flex-direction:column;gap:.5rem;
  padding:1.15rem 1.1rem;min-height:120px;border-radius:var(--r-md);
  background:var(--glass-dark);border:1px solid var(--glass-border);
  transition:transform var(--t-slow) var(--ease-out),border-color var(--t-ui),background var(--t-ui);
}
.tile:hover{transform:translateY(-3px);border-color:rgba(238,244,245,.35);background:var(--glass-dark-strong);}
.tile .t-ico{width:26px;height:26px;color:var(--mist-300);}
.tile .t-name{font-size:.9375rem;font-weight:600;line-height:1.3;margin-top:auto;}
.tile .t-count{font-family:var(--font-mono);font-size:.625rem;color:var(--text-faint);letter-spacing:.1em;}

/* ========================================================= TIMELINE */
.timeline{position:relative;padding-left:2.5rem;}
.timeline::before{
  content:'';position:absolute;left:11px;top:6px;bottom:6px;width:1px;
  background:var(--line);
}
.timeline .tl-fill{
  position:absolute;left:11px;top:6px;width:1px;background:var(--cream-50);
  height:var(--fill,0%);transition:height 200ms linear;
}
.tl-item{position:relative;padding-bottom:2.25rem;}
.tl-item:last-child{padding-bottom:0;}
.tl-item::before{
  content:'';position:absolute;left:-2.5rem;top:5px;
  width:23px;height:23px;border-radius:50%;
  border:1px solid var(--glass-border);background:var(--ink-900);
  transition:background var(--t-slow),border-color var(--t-slow);
}
.tl-item.is-in::before{background:var(--cream-50);border-color:var(--cream-50);}
.tl-item .tl-n{
  position:absolute;left:-2.5rem;top:5px;width:23px;height:23px;
  display:grid;place-items:center;z-index:2;
  font-family:var(--font-mono);font-size:.5625rem;color:var(--text-faint);
  transition:color var(--t-slow);
}
.tl-item.is-in .tl-n{color:var(--ink-900);}
.tl-item h3{font-size:1.0625rem;font-weight:600;}
.tl-item p{font-size:.875rem;color:var(--text-dim);margin-top:.35rem;}

/* ========================================================== MAP CARD */
.map-embed{
  position:relative;aspect-ratio:16/10;border-radius:var(--r-md);overflow:hidden;
  background:linear-gradient(140deg,#12294B,#24506E);
  display:grid;place-items:center;text-align:center;padding:1.5rem;
}
.map-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.map-embed .map-ph{display:flex;flex-direction:column;align-items:center;gap:.85rem;z-index:2;}
.map-embed .map-ph svg{width:34px;height:34px;color:var(--mist-200);}

/* ======================================================== VIDEO FACADE */
.video-facade{
  position:relative;aspect-ratio:16/9;border-radius:var(--r-md);overflow:hidden;
  background:var(--ink-800);cursor:pointer;display:grid;place-items:center;
}
.video-facade img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.video-facade iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}
.video-facade .vf-play{
  position:relative;z-index:2;width:72px;height:72px;border-radius:50%;
  display:grid;place-items:center;
  background:rgba(8,20,38,.75);border:1px solid var(--glass-border);color:var(--cream-50);
  transition:transform var(--t-slow) var(--ease-out),background var(--t-ui);
}
.video-facade:hover .vf-play{transform:scale(1.1);background:var(--red-700);}
.video-facade .vf-play svg{width:24px;height:24px;margin-left:3px;}

/* ============================================================ DOWNLOAD */
.dl-card{
  display:flex;align-items:center;gap:1rem;padding:1.15rem;
  border-radius:var(--r-md);background:var(--glass-dark);border:1px solid var(--glass-border);
  transition:transform var(--t-slow) var(--ease-out),border-color var(--t-ui);
}
.dl-card:hover{transform:translateY(-2px);border-color:rgba(238,244,245,.35);}
.dl-ico{
  width:46px;height:46px;flex:0 0 46px;border-radius:var(--r-sm);
  display:grid;place-items:center;background:rgba(210,71,75,.14);color:#E88F92;
  font-family:var(--font-mono);font-size:.5625rem;letter-spacing:.06em;
}
.dl-body{flex:1;min-width:0;}
.dl-body .dl-t{font-size:.9375rem;font-weight:600;line-height:1.3;}
.dl-body .dl-m{font-family:var(--font-mono);font-size:.625rem;color:var(--text-faint);letter-spacing:.1em;margin-top:.2rem;}
.dl-card .dl-arrow{width:18px;height:18px;color:var(--mist-300);flex:0 0 18px;}

/* ========================================================== 404 PAGE */
.err-wrap{min-height:calc(100svh - var(--nav-h));display:grid;place-items:center;text-align:center;padding-block:4rem;}
.err-code{
  font-family:var(--font-display);font-style:italic;
  font-size:clamp(6rem,22vw,16rem);line-height:.85;letter-spacing:-.04em;
}

/* ========================================================== PRICE NOTE */
.price-block{display:flex;flex-direction:column;gap:.3rem;}
.price-now{font-size:clamp(1.75rem,3vw,2.25rem);font-weight:700;letter-spacing:-.025em;font-variant-numeric:tabular-nums;line-height:1.1;}
.price-was{display:flex;align-items:center;gap:.6rem;}
.price-was .pw-old{font-size:1rem;color:var(--text-faint);text-decoration:line-through;font-variant-numeric:tabular-nums;}

/* ======================================================= COMPARE TABLE */
.cmp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.cmp-table{border-collapse:collapse;width:100%;min-width:640px;font-size:.875rem;}
.cmp-table th,.cmp-table td{padding:.8rem 1rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;}
.cmp-table thead th{vertical-align:bottom;width:240px;}
.cmp-table tbody th{
  font-weight:500;color:var(--text-dim);width:180px;position:sticky;left:0;
  background:var(--ink-900);z-index:2;
}
.cmp-table td{font-family:var(--font-mono);font-size:.75rem;color:var(--text);}
.cmp-table tr.is-diff td{background:rgba(210,71,75,.08);}
.cmp-table tr.is-diff th{color:var(--cream-50);}
