/* ===== Kosare Veselje — Nordic Carved design system ===== */
:root {
  --ink: #141414;
  --paper: #f4f1ea;
  --paper-2: #eae5db;
  --slate: #3a4048;
  --ice: #d7dee2;
  --red: #e8232a;
  --red-dark: #b4181d;
  --line: rgba(20,20,20,0.14);
  --radius: 2px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --maxw: 1240px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-2); }
ul { margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ===== Layout helpers ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-3); }
.stack-v { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); } .mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); }
.section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }

/* ===== Reveal / motion ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { transition: none !important; opacity: 1 !important; transform: none !important; }
  .cart-count.bump, .ticker-track { animation: none !important; }
}

/* ===== Header ===== */
.sprite-defs { position: absolute; width: 0; height: 0; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: var(--space-2) var(--space-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.logo { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); }
.logo-mark { flex: none; }
.logo-word { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -0.01em; }
.logo-accent { color: var(--red); }
.nav-toggle {
  display: none; background: none; border: none; color: var(--ink); cursor: pointer;
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.site-nav { display: flex; align-items: center; gap: var(--space-3); font-size: 0.95rem; }
.site-nav a { position: relative; padding: 0.3rem 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--red);
  transition: width .25s ease;
}
.site-nav a:hover::after, .site-nav a.is-active::after { width: 100%; }
.site-nav a.is-active { color: var(--red-dark); }
.nav-cart { display: flex; align-items: center; gap: 0.3rem; }
.cart-count {
  background: var(--red); color: #fff; border-radius: 999px; font-size: 0.7rem;
  min-width: 1.3rem; height: 1.3rem; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 0.3rem;
}
.cart-count.bump { animation: bump 0.4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--ink); color: var(--paper); flex-direction: column; align-items: flex-start;
    padding: var(--space-5) var(--space-3); gap: var(--space-2);
    transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s ease;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }
  .site-nav a::after { background: var(--red); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  position: relative; overflow: hidden; isolation: isolate;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius); border: 1.5px solid var(--ink);
  cursor: pointer; min-height: 44px; transition: color .3s ease, border-color .3s ease;
  text-align: center;
}
.btn::before {
  content: ""; position: absolute; inset: 0; width: 100%; left: -100%;
  background: var(--ink); z-index: -1; transition: left .3s ease;
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary::before { background: var(--red-dark); }
.btn-primary:hover::before, .btn-primary:focus-visible::before { left: 0; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-dark::before { background: var(--red); }
.btn-dark:hover::before { left: 0; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: #fff; }
.btn-ghost:hover::before { left: 0; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; min-height: 36px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ===== Hero (home) ===== */
.hero {
  padding: var(--space-4) 0 var(--space-5);
  display: grid; grid-template-columns: 1fr; gap: var(--space-4);
  position: relative;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; }
}
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5.5rem); line-height: 0.98; margin: 0 0 var(--space-2);
}
.hero-title em { font-style: normal; color: var(--red); }
.hero-lede { font-size: 1.15rem; max-width: 34ch; color: var(--slate); }
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
.hero-visual { position: relative; aspect-ratio: 4/5; }
.hero-visual .hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius); filter: grayscale(0.15) contrast(1.05);
}
.hero-visual .hero-svg { position: absolute; z-index: 2; }
.hero-visual .hero-svg-top { top: -8%; right: -8%; width: 45%; }
.hero-visual .hero-svg-bottom { bottom: -6%; left: -10%; width: 40%; }

/* Ticker */
.ticker {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--ink); color: var(--paper); white-space: nowrap;
}
.ticker-track {
  display: inline-flex; gap: 2.5rem; padding: 0.75rem 0;
  animation: ticker 26s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem; }
.ticker-track span::after { content: "•"; margin-left: 2.5rem; color: var(--red); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Cards ===== */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 30px -18px rgba(20,20,20,0.35); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.07); }
.card-body { padding: var(--space-2); }
.card-badge {
  position: absolute; top: 0.7rem; left: 0.7rem; background: var(--red); color: #fff;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem; border-radius: var(--radius); z-index: 2;
}
.card-price { font-family: var(--font-mono); font-size: 1.1rem; }
.card-price .old { text-decoration: line-through; opacity: 0.5; margin-right: 0.4rem; font-size: 0.9rem; }

/* Product strip (mobile horizontal scroll-snap) */
.product-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-3);
}
@media (max-width: 700px) {
  .product-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--space-2);
    padding-bottom: var(--space-1); -webkit-overflow-scrolling: touch;
  }
  .product-strip .card { flex: 0 0 72%; scroll-snap-align: start; }
}

/* ===== Signature feature: Košarna Svetovalka ===== */
.fit-finder {
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: var(--space-4); position: relative; overflow: hidden;
}
.fit-finder h2 { color: var(--paper); }
.fit-finder .field label { color: var(--ice); }
.fit-finder-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-3) 0; }
@media (max-width: 600px) { .fit-finder-grid { grid-template-columns: 1fr; } }
.fit-finder input { width: 100%; }
.fit-result { margin-top: var(--space-3); display: grid; gap: 0.75rem; }
.fit-result-item {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.8rem 1rem; border: 1px solid rgba(244,241,234,0.2); border-radius: var(--radius);
}
.fit-result-item.is-fit { border-color: var(--red); background: rgba(232,35,42,0.1); }
.fit-tag { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; }
.fit-tag.yes { color: var(--red); }
.fit-tag.no { color: var(--ice); opacity: 0.6; }

/* ===== Forms ===== */
.form-grid { display: grid; gap: var(--space-2); }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.75rem 0.9rem; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); accent-color: var(--red); min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--red); }
.field-error { color: var(--red-dark); font-size: 0.85rem; min-height: 1.2em; }
.form-feedback { font-size: 0.9rem; min-height: 1.2em; }
.form-feedback.is-ok { color: #2a7a3a; }
.form-feedback.is-error { color: var(--red-dark); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter-row input { flex: 1; min-width: 10rem; }

/* ===== Footer ===== */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: var(--space-5); }
.footer-divider { width: 100%; height: 20px; display: block; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: var(--space-4) var(--space-3);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4);
}
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; } }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { padding: 0.15rem 0; }
.footer-tag { font-size: 0.9rem; color: var(--slate); }
.footer-mail { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.footer-bottom { text-align: center; padding: var(--space-2) 0; font-size: 0.8rem; color: var(--slate); border-top: 1px solid var(--line); }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed; left: var(--space-2); right: var(--space-2); bottom: var(--space-2); z-index: 80;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 46ch; }
.cookie-banner a { color: var(--ice); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.6rem; }
.cookie-banner .btn-ghost { color: var(--paper); border-color: var(--paper); }

/* ===== Inner-page components (for the second writer) ===== */
.page-hero {
  padding: var(--space-4) 0 var(--space-3); border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-hero p { color: var(--slate); max-width: 56ch; }

.breadcrumbs { font-size: 0.85rem; color: var(--slate); padding: var(--space-2) 0; }
.breadcrumbs a { text-decoration: underline; }
.breadcrumbs span { margin: 0 0.4rem; }

.prose { max-width: 70ch; font-size: 1.02rem; }
.prose h2 { margin-top: var(--space-4); font-size: 1.5rem; }
.prose h3 { margin-top: var(--space-3); font-size: 1.15rem; }
.prose ul, .prose ol { margin: 0 0 var(--space-2); padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { text-decoration: underline; color: var(--red-dark); }

.legal-toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
.legal-toc li { list-style: none; }
.legal-toc a { text-decoration: underline; }

.notice { border-left: 3px solid var(--red); background: var(--paper-2); padding: var(--space-2); border-radius: var(--radius); font-size: 0.95rem; }
.notice-success { border-left-color: #2a7a3a; }

.faq-item { border-bottom: 1px solid var(--line); padding: var(--space-2) 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--red); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: 0.6rem; color: var(--slate); }

.product-detail { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.product-detail .media { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.product-detail .media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .meta-list { border-top: 1px solid var(--line); margin-top: var(--space-2); }
.product-detail .meta-list dt { font-weight: 600; float: left; width: 9rem; color: var(--slate); }
.product-detail .meta-list dd { margin: 0 0 0.5rem 9rem; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.cart-summary { background: var(--paper-2); border-radius: var(--radius); padding: var(--space-3); display: grid; gap: 0.6rem; }
.cart-summary .row { display: flex; justify-content: space-between; }
.cart-summary .total { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }

.contact-layout { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-layout { grid-template-columns: 1fr 1fr; } }
.contact-info { display: grid; gap: var(--space-2); align-content: start; }
.contact-info .row { display: flex; gap: 0.75rem; align-items: flex-start; }
.contact-info svg { flex: none; color: var(--red); margin-top: 0.1rem; }

/* decorative */
.divider-rune { width: 100%; height: 40px; display: block; margin: var(--space-4) 0; }
.seal { width: 96px; height: 96px; }
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: 0.05; z-index: 1; mix-blend-mode: multiply; }

/* COMPONENTS:
.container - centered max-width content wrapper
.grid-2 / .grid-3 / .grid-4 - responsive layout grids
.section / .section-tight - vertical page rhythm padding
.reveal / .reveal-stagger - scroll-reveal animation hooks
.site-header / .header-inner / .logo / .logo-mark / .logo-word / .logo-accent - header & logo
.nav-toggle / .site-nav / .nav-cart / .cart-count - navigation & cart indicator
.btn / .btn-primary / .btn-dark / .btn-ghost / .btn-block / .btn-sm - button variants with fill-sweep hover
.hero / .hero-title / .hero-lede / .hero-actions / .hero-visual / .hero-photo / .hero-svg - home hero composition
.ticker / .ticker-track - continuous scrolling product name ticker
.card / .card-media / .card-body / .card-badge / .card-price - product card
.product-strip - responsive grid, becomes scroll-snap strip on mobile
.fit-finder / .fit-finder-grid / .fit-result / .fit-result-item / .fit-tag - Košarna Svetovalka signature feature
.form-grid / .field / .field-error / .form-feedback / .hp-field - form components
.newsletter-form / .newsletter-row - footer newsletter signup
.site-footer / .footer-inner / .footer-col / .footer-links / .footer-tag / .footer-mail / .footer-bottom - footer
.cookie-banner / .cookie-actions - cookie consent banner
.page-hero - inner page header band
.breadcrumbs - breadcrumb trail
.prose - long-form legal/text content with readable measure
.legal-toc - table of contents box for legal pages
.notice / .notice-success - callout box
.faq-item - details/summary FAQ accordion item
.product-detail / .meta-list - product page detail layout
.cart-table / .cart-summary - cart & checkout tables
.contact-layout / .contact-info - contact page layout
.divider-rune / .seal / .grain-overlay - decorative SVG elements
.sr-only - visually hidden accessible text
*/

.hero-copy {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

@media (max-width: 520px) {
  .hero-copy {
    font-size: 1rem;
  }
}

.fit-result-item {
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.fit-result-item.is-fit {
  border-color: var(--red);
  background: rgba(232, 35, 42, 0.05);
}

.fit-tag.yes {
  background: var(--paper-2);
  color: var(--slate);
}

.fit-tag.no {
  background: var(--red);
  color: var(--paper);
}

.gap-4 {
  gap: var(--space-4);
}

.full-width {
  width: 100%;
}

.qty-input {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}
