/* ==========================================================================
   CLOOCKOT — dizajn sistem
   Svetla elegancija: ivory pozadina, tamni tekst, zlatni akcenti,
   serif naslovi (Playfair Display) + Inter za UI.
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1c1a17;
  --ink-soft: #43403a;
  --muted: #85806f;
  --gold: #b08d57;
  --gold-dark: #94743f;
  --gold-pale: #f3ede2;
  --border: #e7e2d9;
  --danger: #b3261e;
  --success: #2e7d32;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(28, 26, 23, .06);
  --shadow-md: 0 10px 30px rgba(28, 26, 23, .10);
  --shadow-lg: 0 24px 60px rgba(28, 26, 23, .16);
  --max: 1200px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Birač jezika i valute u zaglavlju */
.locale-switch {
  display: flex;
  gap: 6px;
  align-items: center;
}
.locale-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  font: 600 12px/1 var(--font-body);
  letter-spacing: .5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.locale-switch select:hover,
.locale-switch select:focus-visible {
  border-color: var(--gold);
  color: var(--gold-dark);
  outline: none;
}
@media (max-width: 720px) {
  .locale-switch select { padding: 4px 6px; font-size: 11px; }
}

/* PWA install prompt */
.install-prompt {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--ink);
  color: #fff;
  padding: 16px;
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .2);
  animation: slideUp .3s ease;
}
.install-prompt-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.install-prompt-content > div:first-child {
  flex: 1;
}
.install-prompt-content strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.install-prompt-content p {
  margin: 0;
  font-size: 13px;
  color: #b9b3a6;
}
.install-prompt-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}
.btn-gold.btn-sm {
  background: var(--gold);
  color: #fff;
}
.btn-gold.btn-sm:hover {
  background: var(--gold-dark);
}
.btn-light.btn-sm {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
}
.btn-light.btn-sm:hover {
  background: rgba(255, 255, 255, .15);
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 600px) {
  .install-prompt-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .install-prompt-actions {
    width: 100%;
  }
  .install-prompt-actions button {
    flex: 1;
  }
}

::selection { background: var(--gold); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cfc8ba; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Elementi koji "uplivavaju" pri skrolu (JS dodaje .reveal / .revealed) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .8, .36, 1);
}
.reveal.revealed { opacity: 1; transform: none; }

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .2px;
  margin: 0 0 .5em;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}

/* ==========================================================================
   DUGMAD
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 14px/1 var(--font-body);
  letter-spacing: .4px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(148, 116, 63, .35); }

.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(148, 116, 63, .45); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

.btn-light { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-light:hover { border-color: var(--ink); }

.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.announce {
  position: relative;
  background: var(--ink);
  color: #d8d2c6;
  font-size: 12.5px;
  letter-spacing: .6px;
  text-align: center;
  height: 36px;
  overflow: hidden;
}
.announce b { color: var(--gold); font-weight: 600; }
/* rotirajuće poruke — jedna vidljiva, ostale sakrivene */
.announce-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.announce-msg.is-active { opacity: 1; transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: .5px;
  display: inline-flex;
  align-items: baseline;
}
.brand .ot {
  color: var(--gold);
  transition: color .25s;
}
.brand:hover .ot { color: var(--gold-dark); }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .2s;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.user-chip a { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.user-chip a:hover { text-decoration: underline; }
.user-chip .divider { color: var(--border); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg { width: 19px; height: 19px; }

.badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  padding: 0 11px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   PORUKE (Django messages)
   ========================================================================== */
.flash-stack { max-width: var(--max); margin: 16px auto 0; padding: 0 20px; }
.flash {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
  border: 1px solid;
}
.flash.success { background: #eef6ee; border-color: #cfe6cf; color: var(--success); }
.flash.error   { background: #fdefee; border-color: #f3cfcd; color: var(--danger); }
.flash.info    { background: var(--gold-pale); border-color: var(--border); color: var(--gold-dark); }
.flash button { background: none; border: none; cursor: pointer; font-size: 16px; color: inherit; opacity: .6; }
.flash button:hover { opacity: 1; }

/* ==========================================================================
   HERO (početna)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 80px;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(176, 141, 87, .13), transparent 70%),
    radial-gradient(500px 350px at 5% 90%, rgba(176, 141, 87, .07), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-dark);
}
.hero p.lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ink);
}
.hero-stats .stat span { font-size: 13px; color: var(--muted); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-arch {
  width: min(400px, 88%);
  aspect-ratio: 4 / 5.1;
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
  background: var(--gold-pale);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-arch img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -30px -10px auto auto;
  width: 130px; height: 130px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: .5;
}
.hero-visual::after {
  content: "";
  position: absolute;
  bottom: -46px; right: 8%;
  width: 84px; height: 84px;
  border: 1px dashed var(--gold);
  border-radius: 50%;
  opacity: .45;
  animation: spin 40s linear infinite;
}
.hero-arch::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: inherit;
  pointer-events: none;
}
.hero-card {
  position: absolute;
  bottom: 26px;
  left: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 12px 18px;
  font-size: 13px;
}
.hero-card b { display: block; font-size: 14px; }
.hero-card span { color: var(--gold-dark); font-weight: 600; }

/* Traka sa brendovima */
.brand-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
}
.brand-strip .row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  flex-wrap: wrap;
}
.brand-strip span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .25s, transform .25s;
  cursor: default;
}
.brand-strip span:hover { color: var(--gold-dark); transform: translateY(-2px); }

/* "Nezvanična nagrada" — duhoviti social-proof bedž u hero sekciji */
.hero-award {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(176, 141, 87, .12), rgba(176, 141, 87, .04));
  border: 1px solid rgba(176, 141, 87, .35);
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(176, 141, 87, .12);
}
.hero-award b { color: var(--gold-dark); }
.hero-award em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.ha-trophy {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(176, 141, 87, .4));
  animation: trophyPop 3s ease-in-out infinite;
}
@keyframes trophyPop {
  0%, 100% { transform: none; }
  50% { transform: translateY(-3px) rotate(-6deg); }
}
@media (max-width: 600px) {
  .hero-award { border-radius: var(--radius); }
}

/* ==========================================================================
   SEKCIJE
   ========================================================================== */
.section { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0; }
.section-head .link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: .4px;
}
.section-head .link-more:hover { text-decoration: underline; }

/* Pogodnosti */
.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.benefit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: box-shadow .25s, transform .25s;
}
.benefit:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.benefit .ico {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.benefit .ico svg { width: 20px; height: 20px; }
.benefit h3 { font-family: var(--font-body); font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.benefit p { margin: 0; font-size: 14px; color: var(--muted); }

/* CTA traka */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(36px, 6vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: clamp(24px, 3.2vw, 36px); margin: 0 0 6px; }
.cta-band p { margin: 0; color: #b9b3a6; font-size: 15px; }

/* ==========================================================================
   KARTICE PROIZVODA
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
  z-index: 2;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: #d9d2c4;
}

.img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;          /* uniforman format svih slika */
  background: #fff;
  padding: 22px;
  cursor: pointer;
}
.img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;           /* cela slika uvek vidljiva, bez sečenja */
  transition: transform .4s ease;
}
.card:hover .img-wrap img { transform: scale(1.05); }

.pill {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}
.pill.novo { background: var(--gold); color: #fff; }
.pill.polovno { background: #efece5; color: var(--ink-soft); }

.card .meta {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.card .brand-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.card .title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.card .title:hover { color: var(--gold-dark); }
.card .price {
  font-size: 17px;
  font-weight: 700;
  margin-top: 2px;
  color: var(--gold-dark);
}
.card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.card .card-actions .btn { flex: 1; }

/* ==========================================================================
   STRANICA SATOVI — toolbar, filteri
   ========================================================================== */
.page-head { padding: 44px 0 8px; }
.page-head .crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.page-head .crumbs a { color: inherit; text-decoration: none; }
.page-head .crumbs a:hover { color: var(--gold-dark); }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 4px; }
.page-head .sub { color: var(--muted); font-size: 15px; }

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-box svg {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: 400 14px var(--font-body);
  color: var(--ink);
}
.search-box input:focus { outline: none; border-color: var(--gold); }

.select-wrap select,
.price-inputs input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font: 500 14px var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.select-wrap select:focus { outline: none; border-color: var(--gold); }

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 14px var(--font-body);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.filter-toggle-btn:hover,
.filter-toggle-btn.active { background: var(--ink); color: #fff; }
.filter-toggle-btn svg { width: 17px; height: 17px; }
.filter-count-badge {
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  min-width: 20px; height: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.result-count { font-size: 13.5px; color: var(--muted); margin-left: auto; }

.filter-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}
.filter-panel.open { display: block; animation: fadeSlide .25s ease; }
.filter-panel-content { padding: 26px; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
}
.filter-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip input { margin: 0; cursor: pointer; accent-color: var(--gold-dark); }
.chip:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.price-inputs { display: flex; gap: 10px; }
.price-inputs label { flex: 1; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.price-inputs input { width: 100%; cursor: text; }
.price-inputs input:focus { outline: none; border-color: var(--gold); }

.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: var(--gold-pale);
  border: 1px solid var(--border);
  color: var(--gold-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.remove-filter {
  background: none; border: none;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  line-height: 1;
  opacity: .7;
}
.remove-filter:hover { opacity: 1; }
.clear-all-filters {
  background: none; border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h3 { font-size: 22px; color: var(--ink); }

/* ==========================================================================
   MODALI / KORPA (drawer)
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, .55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.open { display: flex; animation: fadeIn .2s ease; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 30px;
  text-align: center;
  animation: popIn .22s ease;
}
.modal-box h3 { font-size: 24px; margin-bottom: 8px; }
.modal-box p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 4px; }
.modal-box .modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.modal-box .modal-actions .btn { min-width: 110px; }

/* Modal proizvoda */
.product-modal-dialog {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: grid;
  /* minmax(0,…) je KLJUČNO — bez toga široke slike u galeriji razvuku modal van ekrana */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  animation: popIn .22s ease;
}
.product-modal-dialog > * { min-width: 0; }
.product-modal-media {
  position: relative;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
}
/* diskretan indikator učitavanja iza galerije — da modal nikad ne bude "prazno beo" */
.product-modal-media::before {
  content: "";
  position: absolute;
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.product-modal-media .swiper { position: relative; z-index: 1; width: 100%; }
.product-modal-media .swiper-slide img { background: #fff; }
.product-modal-body { padding: 28px; overflow-y: auto; }
.pm-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.pm-brand {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
}
.pm-name { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.pm-price { display: block; font-size: 24px; font-weight: 700; }
.pm-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.pm-close:hover { border-color: var(--ink); background: var(--bg); }
.pm-section { margin-bottom: 22px; }
.pm-section h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.specs { list-style: none; padding: 0; margin: 0; }
.specs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.specs li strong { color: var(--muted); font-weight: 500; flex-shrink: 0; }
.specs li span { text-align: right; }

/* Korpa — drawer sa desne strane */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(430px, 100vw);
  height: 100dvh;
  background: #fff;
  z-index: 1010;
  box-shadow: var(--shadow-lg);
  transform: translateX(105%);
  transition: transform .3s cubic-bezier(.22, .8, .36, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, .45);
  z-index: 1005;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-head h3 { margin: 0; font-size: 22px; }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 24px; }

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 72px; height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-title { font-weight: 600; font-size: 14px; }
.cart-item .ci-price { color: var(--muted); font-size: 13px; }
.cart-item .ci-total { font-weight: 700; font-size: 14px; white-space: nowrap; }
.qty-controls { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; }
.btn-qty {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: border-color .2s;
}
.btn-qty:hover { border-color: var(--ink); }
.btn-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  margin-left: 6px;
  opacity: .75;
}
.btn-remove:hover { opacity: 1; }

.cart-foot { padding: 18px 24px 24px; border-top: 1px solid var(--border); }
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 14px;
}
.cart-empty { text-align: center; color: var(--muted); padding: 48px 12px; }

/* Toast */
.notification {
  position: fixed;
  bottom: 22px; right: 22px;
  background: var(--ink);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  z-index: 1100;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: slideUp .3s ease;
}

/* ==========================================================================
   FORME (prijava / registracija)
   ========================================================================== */
.auth-wrap {
  min-height: calc(100dvh - 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 38px 36px;
}
.auth-card h1 { font-size: 30px; text-align: center; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 26px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: 400 14.5px var(--font-body);
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, .15);
}
.form-group .errorlist,
.auth-card .errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 12.5px;
}
.form-group .helptext { font-size: 12px; color: var(--muted); }

.auth-alt {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 22px;
}
.auth-alt a { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* ==========================================================================
   O NAMA / KONTAKT / PORUDŽBINE
   ========================================================================== */
.prose p { color: var(--ink-soft); font-size: 15.5px; }
.prose strong { color: var(--ink); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: start;
}
.about-imgs { display: grid; gap: 18px; }
.about-imgs img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.about-imgs img:first-child { aspect-ratio: 4/3; }
.about-imgs img:last-child { aspect-ratio: 16/9; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.quote-band {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.quote-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-style: italic;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.4;
}
.quote-band cite { font-style: normal; font-size: 13.5px; color: var(--gold-dark); letter-spacing: 2px; text-transform: uppercase; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.contact-card h3 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.contact-line .ico {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-line .ico svg { width: 18px; height: 18px; }
.contact-line b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.contact-line a, .contact-line span.val { font-size: 15px; color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-line a:hover { color: var(--gold-dark); }

/* Porudžbine */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 16px;
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.order-head .oid { font-weight: 700; font-size: 15.5px; }
.order-head .odate { color: var(--muted); font-size: 13.5px; }
.order-items { border-top: 1px solid var(--border); }
.order-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.order-row .qty { color: var(--muted); }
.order-total {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  font-size: 15.5px;
}
.order-total b { font-size: 17px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #b9b3a6;
  margin-top: 84px;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 44px;
}
.site-footer .brand { color: #fff; margin-bottom: 12px; display: inline-flex; }
.site-footer p { font-size: 14px; line-height: 1.7; margin: 0; }
.site-footer h4 {
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { color: #b9b3a6; text-decoration: none; font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   ANIMACIJE
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 44px 0 56px; }
  .hero-visual { order: -1; }
  .hero-arch { width: min(300px, 80%); }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-modal-dialog { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
  .product-modal-media { min-height: 260px; border-right: none; border-bottom: 1px solid var(--border); }
  .product-modal-media .swiper { height: 260px !important; }
  .pm-name { font-size: 21px; }
  .pm-price { font-size: 20px; }
}

@media (max-width: 820px) {
  .hamburger { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; left: 0;
    width: min(320px, 84vw);
    height: 100dvh;
    background: #fff;
    flex-direction: column;
    gap: 4px;
    padding: 88px 28px 28px;
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform .3s cubic-bezier(.22, .8, .36, 1);
    z-index: 950;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  .main-nav a.active::after { display: none; }
  .main-nav .nav-user { margin-top: 18px; display: grid; gap: 10px; }
  .user-chip { display: none; }             /* na mobilnom je u meniju */
  .main-nav .nav-user .user-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(28,26,23,.45);
    z-index: 940;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .nav-backdrop.open { opacity: 1; pointer-events: auto; }
}

@media (min-width: 821px) {
  .main-nav .nav-user { display: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-band { text-align: center; justify-content: center; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .img-wrap { padding: 12px; }
  .card .card-actions { flex-direction: column; }
  .auth-card { padding: 30px 22px; }
  .toolbar .result-count { width: 100%; margin-left: 0; }
}
