/* ===== Kolesa Kaplja - design system ===== */
:root {
  --ink: #0b0b0c;
  --paper: #ffffff;
  --paper-soft: #f4f3f1;
  --red: #e8321b;
  --red-deep: #b5220f;
  --glass-1: #7fd4ff;
  --glass-2: #c99bff;
  --glass-3: #ffd166;
  --line: #d9d7d3;
  --shadow: 0 18px 40px -20px rgba(0,0,0,0.35);
  --radius: 18px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
  --measure: 68ch;
  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  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); line-height: 1.1; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper);
  padding: 0.6em 1em; z-index: 200;
}
.skip-link:focus { left: 1em; top: 1em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---- Layout helpers ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal--left { transform: translateX(-28px); }
.reveal--left.in-view { transform: none; }
.reveal--scale { transform: scale(0.94); }
.reveal--scale.in-view { transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.6em; border-radius: 999px; border: 2px solid var(--ink);
  font-weight: 600; cursor: pointer; background: transparent; color: var(--ink);
  min-height: 44px; position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--sweep::before {
  content: ""; position: absolute; inset: 0; width: 100%; left: -100%;
  background: var(--red); z-index: -1; transition: left 0.35s ease;
}
.btn--sweep:hover::before, .btn--sweep:focus-visible::before { left: 0; }
.btn--sweep:hover, .btn--sweep:focus-visible { color: var(--paper); border-color: var(--red); }
.btn--small { padding: 0.55em 1.1em; font-size: 0.9rem; min-height: 40px; }
.btn--ghost-dark { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn--ghost-dark:hover { background: var(--paper); color: var(--ink); }
.btn--added { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: var(--container); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.15rem; }
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__word strong { color: var(--red); }
.logo__word--light { color: var(--paper); }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { font-weight: 600; font-size: 0.95rem; position: relative; padding-bottom: 4px; }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--red); transition: width 0.3s ease; }
.site-nav a:hover::after, .site-nav a.is-active::after { width: 100%; }
.site-nav a.is-active { color: var(--red); }
.nav-cart { display: flex; align-items: center; gap: 6px; }
.cart-count { background: var(--red); color: var(--paper); border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; padding: 0 5px; }
.cart-count--bump { animation: bump 0.4s ease; }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 85vw);
    background: var(--ink); flex-direction: column; align-items: flex-start; justify-content: center;
    padding: 24px; gap: 22px; margin-left: 0; z-index: 150;
    transform: translateX(100%); visibility: hidden; transition: transform 0.35s ease;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }
  .site-nav a { color: var(--paper); font-size: 1.1rem; }
}

/* ---- Hero / page-hero ---- */
.hero { position: relative; padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 10vw, 96px); overflow: hidden; }
.hero__headline { font-size: clamp(2.6rem, 7vw, 5rem); margin: 0 0 0.4em; max-width: 14ch; }
.hero__underline { position: relative; white-space: nowrap; }
.hero__underline svg { position: absolute; left: 0; bottom: -0.12em; width: 100%; height: 0.3em; overflow: visible; }
.hero__underline path { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.2s ease forwards 0.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.page-hero { background: var(--ink); color: var(--paper); padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 6vw, 64px); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); max-width: 18ch; }
.page-hero p { max-width: 60ch; opacity: 0.85; }

/* ---- Breadcrumbs ---- */
.breadcrumbs { font-size: 0.85rem; color: #888; display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1em; }
.breadcrumbs a { text-decoration: underline; text-decoration-color: var(--line); }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }

/* ---- Prose / legal content ---- */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.2em; font-size: 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.legal-toc { background: var(--paper-soft); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 2em; }
.legal-toc h2 { margin-top: 0; font-size: 1.1rem; }
.legal-toc ol { padding-left: 1.2em; }

/* ---- Notice ---- */
.notice { border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); background: var(--paper-soft); margin: 1.5em 0; }
.notice--warn { border-color: var(--red); background: #fdeceb; }
.notice--ok { border-color: #2f8f4e; background: #eaf7ef; }

/* ---- Cards (map-pinned content) ---- */
.map-board { position: relative; background: var(--paper-soft); border-radius: 28px; padding: clamp(24px, 4vw, 48px); overflow: hidden; }
.map-board::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image: radial-gradient(circle at 12% 18%, rgba(0,0,0,0.05) 0, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(0,0,0,0.05) 0, transparent 40%);
}
.pin-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pin-card:hover { transform: translateY(-6px) rotate(-0.3deg); }
.pin-card__pin { position: absolute; top: -14px; left: 20px; width: 28px; height: 28px; color: var(--red); }

/* ---- Product cards ---- */
.product-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(280px, 80vw); gap: 20px; overflow-x: auto; padding: 4px 4px 20px; scroll-snap-type: x mandatory; }
.product-strip .product-card { scroll-snap-align: start; }
@media (min-width: 760px) {
  .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
  .product-strip { grid-auto-flow: row; grid-auto-columns: unset; overflow: visible; }
}
.product-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); }
.product-card__media { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: var(--paper); font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; }
.product-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-deep); font-weight: 700; }
.product-card__body h3 { font-size: 1.15rem; margin: 0; }
.product-card__body p { font-size: 0.92rem; color: #555; margin: 0; flex: 1; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.product-card__price { font-weight: 700; }

/* ---- Product detail ---- */
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__specs { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 16px; background: var(--paper-soft); border-radius: var(--radius); margin: 1.2em 0; }
.product-detail__specs li { display: flex; flex-direction: column; font-size: 0.9rem; }
.product-detail__specs strong { font-size: 1rem; }
.product-detail__price { font-size: 1.8rem; font-family: var(--font-display); }

/* ---- Forms ---- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  padding: 0.75em 0.9em; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; accent-color: var(--red);
  background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field-error { color: var(--red-deep); font-size: 0.82rem; min-height: 1.2em; }
.field-row { display: flex; gap: 10px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { font-size: 0.9rem; margin-top: 8px; min-height: 1.2em; }
.form-msg--ok { color: #2f8f4e; }
.form-msg--error { color: var(--red-deep); }

/* ---- Cart ---- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2em; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart-table img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.cart-table__qty { width: 64px; padding: 6px; border: 1.5px solid var(--line); border-radius: 8px; }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--paper-soft); border-radius: var(--radius); padding: 24px; }
.cart-summary__row { display: flex; justify-content: space-between; padding: 6px 0; }
.cart-summary__row--total { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.cart-empty { text-align: center; padding: 48px 0; }

/* ---- FAQ ---- */
.faq { max-width: var(--measure); margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--red); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 16px; color: #444; }

/* ---- Contact layout ---- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-card svg { color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: 8px; position: relative; }
.footer-divider { width: 100%; height: 30px; display: block; }
.site-footer__inner { max-width: var(--container); margin: 0 auto; padding: 24px 24px 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.4fr; gap: 24px; }
@media (max-width: 880px) { .site-footer__inner { grid-template-columns: repeat(2, 1fr); } }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 { font-size: 0.95rem; margin-bottom: 4px; }
.footer-col a { opacity: 0.8; font-size: 0.92rem; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-email a { text-decoration: underline; }
.footer-newsletter input[type="email"] { flex: 1; min-width: 0; padding: 0.7em 0.9em; border-radius: 10px; border: none; }
.footer-newsletter .field-row { flex-wrap: wrap; }
.footer-newsletter .btn { border-color: var(--paper); color: var(--paper); }
.footer-newsletter .btn--sweep:hover { color: var(--paper); }
.site-footer__bottom { text-align: center; font-size: 0.82rem; opacity: 0.65; padding: 16px 0 28px; }

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 560px; margin: 0 auto;
  background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 18px 22px;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow); z-index: 200;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; flex: 1 1 240px; }
.cookie-banner p a { text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; }

/* ---- Grain overlay ---- */
.grain { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: 0.045; z-index: 1; mix-blend-mode: multiply; }

/* ---- Route finder (signature feature) ---- */
.route-finder { background: var(--ink); color: var(--paper); border-radius: 28px; padding: clamp(24px, 4vw, 48px); position: relative; overflow: hidden; }
.route-finder__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .route-finder__grid { grid-template-columns: 1fr; } }
.route-finder fieldset { border: none; padding: 0; margin: 0 0 18px; }
.route-finder legend { font-weight: 700; margin-bottom: 8px; }
.route-finder .choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.route-finder .choice-row label { border: 1.5px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 0.5em 1.1em; cursor: pointer; font-size: 0.9rem; }
.route-finder .choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.route-finder .choice-row input:checked + span { color: var(--ink); }
.route-finder .choice-row label:has(input:checked) { background: var(--glass-3); border-color: var(--glass-3); }
.route-finder__result { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius); padding: 22px; min-height: 180px; }
.route-finder__result h3 { color: var(--glass-3); }
.route-finder__result .result-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; opacity: 0.85; margin-top: 10px; }

/* ---- Prismatic decorations ---- */
.facet { position: absolute; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15)); }

/* COMPONENTS:
.container - centered max-width wrapper
.section - vertical page rhythm spacing
.grid / .grid--2 / .grid--3 / .grid--4 - responsive grid layouts
.reveal / .reveal--left / .reveal--scale / .in-view - scroll-reveal animation states
.btn / .btn--primary / .btn--sweep / .btn--small / .btn--ghost-dark / .btn--added - button variants
.site-header / .site-header__inner / .logo / .logo__mark / .logo__word - header & logo
.site-nav / .nav-cart / .cart-count / .nav-toggle - navigation and cart badge
.hero / .hero__headline / .hero__underline - home hero with animated underline
.page-hero - dark hero banner for inner pages
.breadcrumbs - breadcrumb trail for inner pages
.prose - readable long-form legal/text content
.legal-toc - table of contents box for legal pages
.notice / .notice--warn / .notice--ok - callout boxes
.map-board / .pin-card / .pin-card__pin - map-like pinned card composition
.product-strip / .product-grid - product listing layouts (mobile scroll-snap / desktop grid)
.product-card / .product-card__media / .product-card__body / .product-card__badge - catalog product card
.product-detail / .product-detail__media / .product-detail__specs / .product-detail__price - product page layout
.form-grid / .field / .field--full / .field-error / .field-row / .hp-field / .form-msg - form system
.cart-table / .cart-summary / .cart-empty - cart and checkout layout
.faq / .faq-item - accordion FAQ built on details/summary
.contact-layout / .contact-card - contact page split layout
.site-footer / .footer-col / .footer-newsletter - footer layout and newsletter form
.cookie-banner / .cookie-banner__actions - cookie consent banner
.grain - fixed full-viewport grain texture overlay
.route-finder / .route-finder__grid / .route-finder__result - signature "Pot-iskalec" feature
.facet - absolutely positioned decorative SVG shapes
*/

/* ---- Brand footer column ---- */
.footer-col--brand {
  /* Inherits .footer-col flex layout */
}

/* ---- Quantity input ---- */
.qty-input {
  width: 64px;
  padding: 6px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font: inherit;
  accent-color: var(--red);
  text-align: center;
}

.qty-input:focus {
  border-color: var(--red);
  outline: none;
}

/* ---- Remove item button ---- */
.btn-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.6em;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.btn-remove:hover {
  color: var(--red);
  text-decoration-color: var(--red);
}

.btn-remove:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

