:root {
  --accent: #c9a27e;
  --on-accent: #120e0a;
  --bg: #0c0b0a;
  --bg2: #141210;
  --fg: #f4efe9;
  --muted: #a39b92;
  --line: rgba(255, 255, 255, .1);
  --card: rgba(255, 255, 255, .04);
  --card-hi: rgba(255, 255, 255, .08);
  --display: "Fraunces", Georgia, serif;
  --display-weight: 400;
  --display-case: none;
  --display-track: -0.02em;
  --body: "Inter", system-ui, sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body[data-theme="light"] {
  --bg: #f5f1eb;
  --bg2: #ebe5dc;
  --fg: #171411;
  --muted: #6f665d;
  --line: rgba(0, 0, 0, .1);
  --card: rgba(255, 255, 255, .6);
  --card-hi: #fff;
}
body[data-font="modern"] { --display: "Space Grotesk", system-ui, sans-serif; --display-weight: 500; --display-track: -0.04em; }
body[data-font="barber"] { --display: "Oswald", Impact, sans-serif; --display-weight: 600; --display-case: uppercase; --display-track: 0.01em; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .5s, color .5s;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; }
h2, h1 { font-family: var(--display); font-weight: var(--display-weight); text-transform: var(--display-case); letter-spacing: var(--display-track); }
em { font-style: italic; color: var(--accent); }
body[data-font="barber"] em { font-style: normal; }
.muted { color: var(--muted); font-size: 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; color: var(--accent); margin: 0 0 14px; font-weight: 600; }
.hp { position: absolute; left: -9999px; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Dugmad ---------- */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--b); background: var(--b); color: var(--on-accent);
  font: 600 15px var(--body); text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s, background .3s, color .3s;
}
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); font-size: 20px; cursor: pointer; transition: .2s; }
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Gornja traka ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 12px max(16px, env(safe-area-inset-left)); transition: background .3s, backdrop-filter .3s, transform .4s var(--ease);
}
.topbar.solid { background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 18px; font-weight: var(--display-weight); text-transform: var(--display-case); }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 15px; flex: none; }
.brand-logo img, .hero-logo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92svh; display: grid; place-items: center; text-align: center; padding: 110px 20px 90px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, var(--bg)) 0%, var(--bg) 60%); }
.hero-bg.has-photo { background-size: cover; background-position: center; animation: kenburns 24s ease-in-out infinite alternate; }
.hero-bg.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.35) 40%, var(--bg) 100%); }
.hero-bg.has-photo .aurora, .hero-bg.has-photo .hero-lines { display: none; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-1%, -1%); } }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; }
body[data-theme="light"] .aurora { mix-blend-mode: multiply; opacity: .35; }
.a1 { width: 55vmax; height: 55vmax; left: -15vmax; top: -15vmax; background: var(--accent); animation: float1 18s ease-in-out infinite alternate; }
.a2 { width: 40vmax; height: 40vmax; right: -12vmax; top: 10vh; background: color-mix(in srgb, var(--accent) 50%, #6b2f4a); animation: float2 22s ease-in-out infinite alternate; }
.a3 { width: 35vmax; height: 35vmax; left: 25vw; bottom: -20vmax; background: color-mix(in srgb, var(--accent) 40%, #1d3b5c); animation: float1 26s ease-in-out infinite alternate-reverse; }
@keyframes float1 { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes float2 { to { transform: translate(-16vw, 18vh) scale(.85); } }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--fg); opacity: .08; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-inner { max-width: 900px; }
.hero-logo { width: 112px; height: 112px; margin: 0 auto 26px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--card-hi); border: 1px solid var(--line); font: 600 42px var(--display); color: var(--accent); box-shadow: 0 20px 60px -20px rgba(0,0,0,.6); opacity: 0; animation: pop 1s var(--ease) .1s forwards; }
.hero-title { font-size: clamp(46px, 11vw, 128px); line-height: .95; margin-bottom: 20px; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.hero-title .w > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero-tag { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 560px; margin: 0 auto 34px; opacity: 0; animation: fade 1s ease .7s forwards; }
.hero .eyebrow { opacity: 0; animation: fade 1s ease .3s forwards; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fade 1s ease .9s forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid var(--line); border-radius: 20px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Traka sa uslugama ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: var(--bg2); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track span { font: var(--display-weight) clamp(26px, 4vw, 44px) var(--display); text-transform: var(--display-case); white-space: nowrap; padding: 0 24px; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 45%, transparent); }
.marquee-track span:nth-child(even) { color: var(--accent); -webkit-text-stroke: 0; font-size: 22px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sekcije ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 100px 20px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section h2 { font-size: clamp(36px, 6vw, 64px); line-height: 1.02; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Zakazivanje ---------- */
.booking { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.step { min-width: 0; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); transition: opacity .4s, border-color .4s; }
.step.locked { opacity: .4; pointer-events: none; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.step-head h3 { font: 600 18px var(--body); }
.step-n { font: 500 13px var(--body); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px; padding: 3px 9px; }
.step-head .month { color: var(--muted); font-size: 14px; text-transform: capitalize; margin-left: auto; }
.strip-nav { display: flex; gap: 6px; }

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; align-items: start; }
.svc {
  text-align: left; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  cursor: pointer; font: inherit; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; position: relative; overflow: hidden;
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.svc:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: translateY(-2px); }
.svc.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.svc.on::before { content: "✓"; position: absolute; right: 12px; bottom: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.svc b { font-weight: 600; }
.svc .price { color: var(--accent); font-weight: 600; white-space: nowrap; }
.svc small { color: var(--muted); grid-column: 1 / -1; font-size: 13px; }
.svc .dur { color: var(--muted); font-size: 13px; }

.dates { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: 0 0 auto; width: 68px; padding: 12px 0 10px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  cursor: pointer; font: inherit; scroll-snap-align: start; display: grid; gap: 2px; justify-items: center; transition: .25s var(--ease);
}
.date .dn { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.date .dd { font: 500 24px var(--display); }
.date .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.date:disabled { opacity: .3; cursor: default; }
.date:disabled .dot { background: transparent; }
.date:not(:disabled):hover { border-color: var(--accent); transform: translateY(-2px); }
.date.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.date.on .dn { color: inherit; opacity: .75; }
.date.on .dot { background: var(--on-accent); }

.tgroup + .tgroup { margin-top: 18px; }
.tgroup h5 { margin: 0 0 10px; font: 500 12px var(--body); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.time {
  padding: 11px 0; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: 500 15px var(--body);
  cursor: pointer; transition: .2s var(--ease); opacity: 0; animation: fade .5s var(--ease) forwards;
}
.time:hover { border-color: var(--accent); color: var(--accent); }
.time.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.empty { color: var(--muted); padding: 10px 0; }

.summary {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 60; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line); box-shadow: 0 20px 50px -15px rgba(0,0,0,.6); animation: slideup .5s var(--ease);
}
.summary b { display: block; font-size: 15px; }
.summary span { color: var(--muted); font-size: 13px; }
@keyframes slideup { from { transform: translateY(120%); opacity: 0; } }

/* ---------- O nama ---------- */
.about-grid { display: grid; gap: 40px; grid-template-columns: 1.1fr 1fr; align-items: start; }
.lead { color: var(--muted); font-size: 18px; margin-top: 20px; white-space: pre-line; }
.info { display: grid; gap: 12px; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--card); }
.info-card h4 { font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin-bottom: 10px; }
.info-card p { margin: 0 0 6px; }
.info-card a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 4px; }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: 15px; }
.hours li.today { color: var(--fg); font-weight: 600; }
.hours li.today span:first-child::after { content: " · danas"; color: var(--accent); font-weight: 500; }

.footer { text-align: center; padding: 50px 20px 120px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer p { margin: 0 0 8px; }
.powered { text-decoration: none; opacity: .7; }
.powered:hover { opacity: 1; color: var(--accent); }

/* ---------- Dijalog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 24px; padding: 0; width: min(500px, calc(100% - 24px)); max-height: calc(100% - 24px);
  background: var(--bg2); color: var(--fg); box-shadow: 0 40px 120px -20px rgba(0,0,0,.8);
}
dialog[open] { animation: pop .45s var(--ease); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
#form, .success { padding: 30px 26px 26px; position: relative; }
.dlg-x { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; }
dialog h3 { font: var(--display-weight) 30px/1.1 var(--display); text-transform: var(--display-case); margin-bottom: 6px; }
.dlg-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label small { opacity: .7; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font: 16px var(--body); transition: border-color .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--fg); font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.form-error { color: #ff8a7a; min-height: 1.2em; font-size: 14px; margin: 4px 0 10px; }
.success { text-align: center; }
.success p { color: var(--muted); }
.success-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.demo-note { font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; padding: 8px; }
.check-anim { width: 76px; height: 76px; margin: 6px auto 16px; display: block; }
.check-anim circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .8s var(--ease) forwards; }
.check-anim path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.notfound { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: 20px; gap: 12px; }
.notfound h1 { font-size: 44px; }
.notfound p { color: var(--muted); }
body.loading main, body.loading .marquee, body.loading .footer { visibility: hidden; }
body.missing > :not(.notfound):not(.grain):not(script) { display: none !important; }

/* Ugrađeno u telefon na landing stranici */
body.embed .topbar { position: absolute; }
body.embed .hero { min-height: 640px; }

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 16px; }
  .step { padding: 18px 14px; }
  .services { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .hero-logo { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   DIZAJNI (šabloni) — body[data-tpl]: noir (osnovni), atelier, studio, barber, blossom
   ===================================================================== */
.pole, .sparkles, .hero-figure { display: none; }

/* ---------- ATELIER: editorijalni, svetao, luk sa fotografijom ---------- */
body[data-tpl="atelier"] { --display: "Fraunces", Georgia, serif; --display-weight: 300; --display-case: none; --display-track: -0.035em; }
body[data-tpl="atelier"][data-theme="light"] { --bg: #f2ece3; --bg2: #e9e0d3; --fg: #1f1a16; --muted: #776b60; --line: rgba(31,26,22,.14); --card: rgba(255,255,255,.5); --card-hi: #fffaf3; }
body[data-tpl="atelier"][data-theme="dark"] { --bg: #17130f; --bg2: #201a15; --fg: #f1e9df; --muted: #a59789; --line: rgba(241,233,223,.13); --card: rgba(255,255,255,.035); }
body[data-tpl="atelier"] .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); text-align: left; gap: 5vw; padding-inline: max(20px, 6vw); place-items: center start; }
body[data-tpl="atelier"] .hero-bg { background: var(--bg); }
body[data-tpl="atelier"] .hero-bg.has-photo { background-image: none !important; animation: none; }
body[data-tpl="atelier"] .hero-bg.has-photo::after { display: none; }
body[data-tpl="atelier"] .aurora, body[data-tpl="atelier"] .hero-lines, body[data-tpl="atelier"] .scroll-hint { display: none; }
body[data-tpl="atelier"] .hero-logo { margin: 0 0 30px; width: 76px; height: 76px; font-size: 28px; }
body[data-tpl="atelier"] .hero-title { font-size: clamp(54px, 8.4vw, 128px); }
body[data-tpl="atelier"] .hero-title .w:nth-child(2n) > span { font-style: italic; color: var(--accent); }
body[data-tpl="atelier"] .hero-tag { margin-left: 0; }
body[data-tpl="atelier"] .hero-cta { justify-content: flex-start; }
body[data-tpl="atelier"] .eyebrow::before { content: ""; display: inline-block; width: 42px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 14px; }
body[data-tpl="atelier"] .hero-figure {
  display: grid; place-items: center; width: min(440px, 100%); aspect-ratio: 3 / 4; justify-self: center; border-radius: 999px 999px 0 0; overflow: hidden;
  background: linear-gradient(165deg, var(--accent), color-mix(in srgb, var(--accent) 35%, var(--bg2))) center / cover no-repeat;
  outline: 1px solid rgba(255,255,255,.55); outline-offset: -16px; animation: archIn 1.5s var(--ease) .25s both;
}
body[data-tpl="atelier"] .hero-figure.photo .fig-mono { display: none; }
.fig-mono { font: italic 300 clamp(70px, 9vw, 140px) var(--display); color: var(--on-accent); opacity: .55; }
@keyframes archIn { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
body[data-tpl="atelier"] .btn, body[data-tpl="atelier"] .svc, body[data-tpl="atelier"] .step, body[data-tpl="atelier"] .info-card,
body[data-tpl="atelier"] .date, body[data-tpl="atelier"] .time, body[data-tpl="atelier"] input, body[data-tpl="atelier"] textarea { border-radius: 3px; }
body[data-tpl="atelier"] .btn { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
body[data-tpl="atelier"] .marquee-track span { color: var(--fg); -webkit-text-stroke: 0; font-style: italic; }
body[data-tpl="atelier"] .marquee-track span:nth-child(even) { color: var(--accent); }

/* ---------- STUDIO: moderan, oštar, veliki grotesk ---------- */
body[data-tpl="studio"] { --display: "Space Grotesk", system-ui, sans-serif; --display-weight: 700; --display-case: uppercase; --display-track: -0.055em; }
body[data-tpl="studio"][data-theme="light"] { --bg: #f3f3ef; --bg2: #e8e8e2; --fg: #0d0d0c; --muted: #5f5f59; --line: rgba(0,0,0,.14); --card: #ffffff; --card-hi: #fff; }
body[data-tpl="studio"][data-theme="dark"] { --bg: #0b0b0b; --bg2: #141414; --fg: #f2f2ee; --muted: #9b9b94; --line: rgba(255,255,255,.14); --card: #121212; }
body[data-tpl="studio"] em { font-style: normal; background: var(--accent); color: var(--on-accent); padding: 0 .15em; }
body[data-tpl="studio"] .hero { text-align: left; place-items: end start; padding-inline: max(20px, 4vw); }
body[data-tpl="studio"] .hero-inner { max-width: none; }
body[data-tpl="studio"] .hero-bg {
  background-color: var(--bg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px; animation: gridPan 40s linear infinite;
}
body[data-tpl="studio"] .hero-bg::before { content: ""; position: absolute; right: 7vw; top: 16%; width: min(30vw, 380px); aspect-ratio: 1; background: var(--accent); animation: block 9s var(--ease) infinite alternate; }
body[data-tpl="studio"] .hero-bg.has-photo::before { display: none; }
@keyframes gridPan { to { background-position: 88px 88px; } }
@keyframes block { 0% { transform: translate(0, 0) rotate(0); border-radius: 0; } 50% { border-radius: 50%; } 100% { transform: translate(-6vw, 8vh) rotate(90deg); border-radius: 0; } }
body[data-tpl="studio"] .aurora, body[data-tpl="studio"] .hero-lines, body[data-tpl="studio"] .scroll-hint { display: none; }
body[data-tpl="studio"] .hero-logo { margin: 0 0 28px; width: 64px; height: 64px; border-radius: 0; font-size: 22px; }
body[data-tpl="studio"] .hero-title { font-size: clamp(56px, 13vw, 210px); line-height: .84; margin-bottom: 26px; }
body[data-tpl="studio"] .hero-tag { margin-left: 0; font-size: 18px; color: var(--fg); }
body[data-tpl="studio"] .hero-cta { justify-content: flex-start; }
body[data-tpl="studio"] .eyebrow { color: var(--fg); }
body[data-tpl="studio"] .eyebrow::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 10px; }
body[data-tpl="studio"] :is(.btn, .svc, .step, .info-card, .date, .time, input, textarea, .summary, dialog, .icon-btn, .step-n, .brand-logo, .hero-logo) { border-radius: 0; }
body[data-tpl="studio"] .btn-lg::before { content: "→"; order: 2; }
body[data-tpl="studio"] .marquee { background: var(--accent); border: 0; }
body[data-tpl="studio"] .marquee-track span { color: var(--on-accent); -webkit-text-stroke: 0; }
body[data-tpl="studio"] .marquee-track span:nth-child(even) { color: var(--on-accent); }
body[data-tpl="studio"] .section h2 { font-size: clamp(40px, 7vw, 84px); }

/* ---------- BARBER CLASSIC: vintage, rampa sa stubom ---------- */
body[data-tpl="barber"] { --display: "Oswald", Impact, sans-serif; --display-weight: 600; --display-case: uppercase; --display-track: 0.02em; }
body[data-tpl="barber"][data-theme="dark"] { --bg: #14100d; --bg2: #1c1612; --fg: #f1e6d6; --muted: #a8987f; --line: rgba(241,230,214,.14); --card: rgba(241,230,214,.04); }
body[data-tpl="barber"][data-theme="light"] { --bg: #efe5d4; --bg2: #e4d6bf; --fg: #23180f; --muted: #6f5f4b; --line: rgba(35,24,15,.16); --card: rgba(255,255,255,.4); }
body[data-tpl="barber"] em { font-style: normal; }
body[data-tpl="barber"] .hero-bg { background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--accent) 16%, var(--bg)), var(--bg)), repeating-linear-gradient(45deg, transparent 0 18px, rgba(128,128,128,.05) 18px 36px); }
body[data-tpl="barber"] .aurora, body[data-tpl="barber"] .hero-lines { display: none; }
body[data-tpl="barber"] .pole {
  display: block; position: absolute; top: 0; bottom: 0; left: max(14px, 5vw); width: 22px; z-index: 0; border-radius: 0 0 14px 14px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #f4efe6 14px 28px, #24456e 28px 42px, #f4efe6 42px 56px);
  background-size: 100% 79.2px; animation: pole 2.2s linear infinite; box-shadow: inset -6px 0 10px rgba(0,0,0,.35), 0 0 30px -6px var(--accent); opacity: .9;
}
body[data-tpl="barber"] .pole.r { left: auto; right: max(14px, 5vw); }
@keyframes pole { to { background-position: 0 79.2px; } }
body[data-tpl="barber"] .hero-logo { box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--accent), 0 0 0 16px var(--bg), 0 0 0 17px color-mix(in srgb, var(--accent) 40%, transparent); }
body[data-tpl="barber"] .hero-title { font-size: clamp(56px, 12vw, 150px); line-height: .9; }
body[data-tpl="barber"] .eyebrow::before, body[data-tpl="barber"] .eyebrow::after { content: "✂"; margin: 0 12px; }
body[data-tpl="barber"] :is(.btn, .svc, .step, .info-card, .date, .time, input, textarea) { border-radius: 4px; }
body[data-tpl="barber"] .btn { text-transform: uppercase; letter-spacing: .1em; font-size: 14px; }
body[data-tpl="barber"] .svc { border-style: dashed; }
body[data-tpl="barber"] .marquee-track span { font-size: clamp(30px, 5vw, 54px); }

/* ---------- BLOSSOM: nežan, pastelni, za beauty i nokte ---------- */
body[data-tpl="blossom"] { --display: "Fraunces", Georgia, serif; --display-weight: 300; --display-case: none; --display-track: -0.02em; }
body[data-tpl="blossom"][data-theme="light"] { --bg: #fbf2ef; --bg2: #f5e5df; --fg: #3b2530; --muted: #8a6d77; --line: rgba(59,37,48,.12); --card: rgba(255,255,255,.7); --card-hi: #fff; }
body[data-tpl="blossom"][data-theme="dark"] { --bg: #22161c; --bg2: #2b1c24; --fg: #f8e9ee; --muted: #c4a4af; --line: rgba(248,233,238,.12); --card: rgba(255,255,255,.05); }
body[data-tpl="blossom"] .hero-bg { background: var(--bg); }
body[data-tpl="blossom"] .hero-lines { display: none; }
body[data-tpl="blossom"] .aurora { mix-blend-mode: normal; opacity: .5; filter: blur(60px); }
body[data-tpl="blossom"] .a2 { background: #f5a9bf; }
body[data-tpl="blossom"] .a3 { background: #c9b8f3; }
body[data-tpl="blossom"] .hero-title { font-style: italic; }
body[data-tpl="blossom"] .hero-logo { border: 6px solid var(--card-hi); box-shadow: 0 20px 50px -18px color-mix(in srgb, var(--accent) 70%, transparent); }
body[data-tpl="blossom"] .sparkles { display: block; position: absolute; inset: 0; pointer-events: none; }
body[data-tpl="blossom"] .sparkles i { position: absolute; width: 18px; height: 18px; background: var(--accent); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: twinkle 3.2s ease-in-out infinite; }
body[data-tpl="blossom"] .sparkles i:nth-child(1) { left: 14%; top: 22%; }
body[data-tpl="blossom"] .sparkles i:nth-child(2) { left: 82%; top: 18%; width: 12px; height: 12px; animation-delay: .6s; }
body[data-tpl="blossom"] .sparkles i:nth-child(3) { left: 74%; top: 70%; animation-delay: 1.2s; }
body[data-tpl="blossom"] .sparkles i:nth-child(4) { left: 20%; top: 76%; width: 10px; height: 10px; animation-delay: 1.8s; }
body[data-tpl="blossom"] .sparkles i:nth-child(5) { left: 50%; top: 10%; width: 9px; height: 9px; animation-delay: 2.4s; }
body[data-tpl="blossom"] .sparkles i:nth-child(6) { left: 90%; top: 46%; width: 14px; height: 14px; animation-delay: .9s; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
body[data-tpl="blossom"] :is(.svc, .step, .info-card) { border-radius: 28px; }
body[data-tpl="blossom"] .date { border-radius: 999px; padding-block: 14px 12px; }
body[data-tpl="blossom"] .time { border-radius: 999px; }
body[data-tpl="blossom"] .btn { box-shadow: 0 12px 30px -14px var(--accent); }
body[data-tpl="blossom"] .marquee-track span { color: var(--accent); -webkit-text-stroke: 0; font-style: italic; }
body[data-tpl="blossom"] .marquee-track span:nth-child(even) { color: var(--fg); }

@media (max-width: 820px) {
  body[data-tpl="atelier"] .hero { grid-template-columns: 1fr; padding-top: 100px; }
  body[data-tpl="atelier"] .hero-figure { width: min(210px, 58%); order: -1; max-height: 34vh; }
  body[data-tpl="atelier"] .hero-logo { width: 64px; height: 64px; font-size: 22px; margin-bottom: 14px; }
  body[data-tpl="atelier"] .hero { padding-top: 84px; }
  body[data-tpl="studio"] .hero-bg::before { width: 46vw; top: 12%; }
  body[data-tpl="barber"] .pole { width: 10px; left: 6px; }
  body[data-tpl="barber"] .pole.r { right: 6px; }
}

/* =================== GALERIJA SALONA I SLIKE USLUGA =================== */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; max-width: 1180px; margin: 0 auto; }
.gallery .ph { position: relative; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; border: 0; padding: 0; background: var(--card); opacity: 0; transform: translateY(30px) scale(.98); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.gallery.in .ph { opacity: 1; transform: none; }
.gallery .ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease), filter .6s; }
.gallery .ph:hover img { transform: scale(1.06); }
.gallery .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35)); opacity: 0; transition: opacity .4s; }
.gallery .ph:hover::after { opacity: 1; }
.gallery .ph:first-child { grid-column: span 2; grid-row: span 2; }
.gallery.n1 { grid-template-columns: 1fr; grid-auto-rows: 460px; }
.gallery.n1 .ph:first-child, .gallery.n2 .ph:first-child { grid-column: auto; grid-row: auto; }
.gallery.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 420px; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n3 .ph:first-child { grid-column: auto; }
.gallery.n4 .ph:nth-child(4) { grid-column: span 2; }
.gallery .count { position: absolute; right: 12px; bottom: 12px; z-index: 1; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); }

.svc .svc-ph { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 6px; margin: -6px -8px 10px; }
.svc .svc-ph span { display: block; height: 130px; border-radius: 10px; background: var(--card) center / cover no-repeat; cursor: zoom-in; transition: transform .6s var(--ease), filter .4s; }
.svc:hover .svc-ph span { filter: brightness(1.05); }
.svc .svc-ph span:hover { transform: scale(1.02); }

.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 24px; background: rgba(8,7,6,.92); backdrop-filter: blur(10px); animation: lbIn .35s var(--ease); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: lbImg .45s var(--ease); }
.lightbox figcaption { color: #d8d2cb; font-size: 14px; }
.lb-nav, .lb-x { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; font-size: 26px; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.lb-nav:hover, .lb-x:hover { background: rgba(255,255,255,.16); }
.lb-x { position: absolute; top: 16px; right: 16px; }
.lb-nav[disabled] { visibility: hidden; }
@keyframes lbIn { from { opacity: 0; } }
@keyframes lbImg { from { opacity: 0; transform: scale(.96); } }

body[data-tpl="studio"] :is(.gallery .ph, .svc .svc-ph span, .lightbox img) { border-radius: 0; }
body[data-tpl="studio"] .gallery { gap: 4px; }
body[data-tpl="atelier"] .gallery .ph:first-child { border-radius: 999px 999px 6px 6px; }
body[data-tpl="atelier"] :is(.gallery .ph:not(:first-child), .svc .svc-ph span) { border-radius: 4px; }
body[data-tpl="barber"] .gallery .ph img { filter: saturate(.85) contrast(1.05); }
body[data-tpl="barber"] .gallery .ph:hover img { filter: none; }
body[data-tpl="barber"] :is(.gallery .ph, .svc .svc-ph span) { border-radius: 4px; }
body[data-tpl="blossom"] .gallery .ph { border-radius: 32px; }
body[data-tpl="blossom"] .svc .svc-ph span { border-radius: 20px; }

@media (max-width: 820px) {
  .gallery, .gallery.n1, .gallery.n2, .gallery.n3 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .ph { flex: 0 0 82%; height: 360px; scroll-snap-align: center; }
  .gallery.n1 .ph { flex-basis: 100%; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 10px 20px; }
  .lb-nav { position: absolute; bottom: 24px; }
  .lb-nav.prev { left: calc(50% - 60px); } .lb-nav.next { right: calc(50% - 60px); }
  .lightbox img { max-height: 72vh; }
}
.svc .svc-ph span { position: relative; cursor: pointer; }
.svc .svc-ph .zoom { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; background: rgba(10,9,8,.6); color: #fff; backdrop-filter: blur(4px); cursor: zoom-in; transition: transform .2s; }
.svc .svc-ph .zoom:hover { transform: scale(1.1); }
