/* ===== Predilnica design system ===== */
:root {
  --paper: #f7f1e6;
  --paper-2: #efe6d8;
  --cream: #fbf7ef;
  --ink: #3d382f;
  --ink-soft: #6b6456;
  --grey: #8a8378;
  --rust: #b5673a;
  --rust-dark: #8f4d28;
  --lilac: #cdbfd4;
  --peach: #f0c9a6;
  --mint: #c7d4bd;
  --line: #ddd2bd;
  --radius: 14px;
  --shadow-1: 0 10px 30px -14px rgba(61, 56, 47, 0.35);
  --shadow-2: 0 2px 8px rgba(61, 56, 47, 0.12);
  --maxw: 1180px;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { 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);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; vertical-align: middle; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  position: relative; overflow: hidden;
  padding: 0.8rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 0.98rem; font-weight: 600; cursor: pointer; min-height: 44px;
  font-family: var(--font-body); isolation: isolate; transition: color 0.3s, border-color 0.3s;
}
.btn span, .btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  transition: left 0.35s ease; z-index: 0;
}
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary::before { background: var(--rust-dark); }
.btn-primary:hover::before { left: 0; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: #fff; }
.btn-ghost:hover::before { left: 0; }
.btn-ghost-dark { background: transparent; border-color: #fff; color: #fff; }
.btn-ghost-dark::before { background: #fff; }
.btn-ghost-dark:hover { color: var(--ink); }
.btn-ghost-dark:hover::before { left: 0; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.88rem; min-height: 38px; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 241, 230, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--maxw); margin: 0 auto; padding: 0.8rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; }
.logo-word { width: 118px; height: 16px; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: 0.95rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s; }
.main-nav a:hover, .main-nav a.is-active { border-color: var(--rust); color: var(--rust-dark); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { position: relative; display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.cart-count { position: absolute; top: 2px; right: 2px; background: var(--rust); color: #fff; font-size: 0.68rem; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.cart-count.bump { animation: bump 0.4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px; }
.nav-close { display: none; }
.nav-overlay { display: none; }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100%; width: min(80vw, 320px);
    background: var(--cream); z-index: 150; padding: 5rem 1.5rem 2rem;
    transform: translateX(100%); visibility: hidden; transition: transform 0.35s ease;
    box-shadow: var(--shadow-1);
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 1.4rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-close { display: inline-flex; position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: none; cursor: pointer; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(61, 56, 47, 0.4); z-index: 140; opacity: 0; visibility: hidden; transition: opacity 0.3s; }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }
}

/* ===== Hero ===== */
.hero {
  position: relative; padding: 4.5rem 0 5rem; overflow: hidden;
  background: linear-gradient(160deg, var(--cream), var(--paper-2));
}
.hero-parallax { position: relative; }
.hero-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); margin-bottom: 0.6rem; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36ch; }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1/1; }
.float-shape { position: absolute; transition: transform 0.2s ease-out; will-change: transform; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; max-width: 320px; margin: 0 auto; } }

/* ===== Section dividers / texture ===== */
.divider-rip { display: block; width: 100%; height: 44px; }
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: 0.05; z-index: 1; mix-blend-mode: multiply; }

/* ===== Page hero (inner pages) ===== */
.page-hero { padding: 3.2rem 0 2.4rem; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero .lede { color: var(--ink-soft); max-width: 60ch; }

.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.breadcrumbs a { text-decoration: underline; text-decoration-color: var(--line); }
.breadcrumbs a:hover { color: var(--rust-dark); }

/* ===== Sections / layout utilities ===== */
.section { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-alt { background: var(--paper-2); }
.section-title { text-align: left; max-width: 50ch; margin-bottom: 2rem; }
.section-title p { color: var(--ink-soft); }
.grid { display: grid; gap: 1.6rem; }
.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: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-md > * + * { margin-top: 1.2rem; }
.mt-0 { margin-top: 0 !important; }

/* ===== Horizontal scroll story (home) ===== */
.story-scroll {
  display: flex; gap: 1.6rem; overflow-x: auto; padding: 0.5rem 1.5rem 2rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.story-scroll::-webkit-scrollbar { height: 8px; }
.story-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.story-card {
  flex: 0 0 min(78vw, 360px); scroll-snap-align: start; background: var(--cream);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
}
.story-card img { width: 100%; height: 190px; object-fit: cover; }
.story-card .story-body { padding: 1.3rem; }
.story-card .story-num { font-family: var(--font-display); font-size: 2rem; color: var(--peach); display: block; }

/* ===== Cards (products/courses) ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem; }
.product-card {
  background: var(--cream); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-1); }
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 1.1rem 1.2rem 1.3rem; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.product-card .price { font-weight: 700; color: var(--rust-dark); margin: 0.4rem 0 0.8rem; }
.product-card .meta { font-size: 0.82rem; color: var(--ink-soft); }

/* mobile horizontal product strip */
@media (max-width: 640px) {
  .card-grid.scroll-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem; padding-bottom: 0.5rem;
  }
  .card-grid.scroll-strip .product-card { flex: 0 0 72vw; scroll-snap-align: start; }
}

/* ===== Dye Lab (signature feature) ===== */
.dye-lab { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-2); display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.dye-lab .field { margin-bottom: 1rem; }
.dye-swatch { width: 180px; height: 180px; border-radius: 50%; border: 6px solid var(--paper); box-shadow: var(--shadow-1); transition: background 0.4s ease; }
.dye-label { text-align: center; margin-top: 0.8rem; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 700px) { .dye-lab { grid-template-columns: 1fr; text-align: center; } }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.7rem 0.9rem; border: 1.5px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); accent-color: var(--rust); min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--rust); }
.field-error { color: #a33; font-size: 0.82rem; min-height: 1.1em; }
.form-msg { font-size: 0.9rem; min-height: 1.2em; }
.form-msg.is-success { color: #3a7d44; }
.form-msg.is-error { color: #a33; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.newsletter-form .field { flex-direction: row; gap: 0.6rem; }
.newsletter-form input { flex: 1; }

/* ===== Notices ===== */
.notice { border-radius: 10px; padding: 1rem 1.2rem; border: 1.5px solid var(--line); background: var(--paper-2); font-size: 0.92rem; }
.notice-info { border-color: var(--lilac); background: #f3eef7; }
.notice-success { border-color: #b9d6b4; background: #eef6ec; }
.notice-warn { border-color: var(--peach); background: #fbf0e3; }

/* ===== Prose (legal pages) ===== */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4rem; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.legal-toc { position: sticky; top: 90px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; font-size: 0.9rem; }
.legal-toc h2 { font-size: 1rem; margin-bottom: 0.6rem; }
.legal-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.legal-toc a { color: var(--ink-soft); }
.legal-toc a:hover { color: var(--rust-dark); }
@media (max-width: 800px) { .legal-layout { grid-template-columns: 1fr; } .legal-toc { position: static; } }

/* ===== Breadcrumb / FAQ ===== */
.faq-item { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--rust); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 0.8rem; color: var(--ink-soft); }

/* ===== Product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.product-detail .gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.product-detail .price { font-size: 1.6rem; font-weight: 700; color: var(--rust-dark); }
.qty-row { display: flex; align-items: center; gap: 0.8rem; }
.qty-row input { width: 70px; text-align: center; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }

/* ===== Cart / checkout ===== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 0.9rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-summary { background: var(--paper-2); border-radius: var(--radius); padding: 1.5rem; margin-top: 1.5rem; max-width: 360px; margin-left: auto; }
.cart-summary .total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; margin: 0.8rem 0; }
.remove-btn { background: none; border: none; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: 0.85rem; }

/* ===== Contact ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-info .info-row { display: flex; gap: 0.8rem; margin-bottom: 1rem; align-items: flex-start; }
.contact-info .icon { flex-shrink: 0; margin-top: 0.15rem; color: var(--rust); }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer { background: #2f2b24; color: #e9e2d2; padding-top: 3rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem 2.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-brand p { color: #c9c1ac; font-size: 0.92rem; }
.footer-mail { display: inline-flex; gap: 0.5rem; align-items: center; color: #e9e2d2; text-decoration: underline; }
.footer-col h3 { color: #fff; font-size: 0.95rem; margin-bottom: 0.8rem; font-family: var(--font-body); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: #c9c1ac; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-newsletter .field { flex-direction: column; }
.footer-newsletter input { background: #3d382f; border-color: #55503f; color: #fff; }
.footer-bottom { border-top: 1px solid #454034; padding: 1.2rem 1.5rem; text-align: center; font-size: 0.82rem; color: #a89f87; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 560px; margin: 0 auto;
  background: #2f2b24; color: #fff; border-radius: var(--radius); padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-1); z-index: 300; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.cookie-banner p { margin: 0; font-size: 0.88rem; flex: 1 1 240px; color: #e9e2d2; }
.cookie-banner a { text-decoration: underline; color: #fff; }
.cookie-actions { display: flex; gap: 0.7rem; }

/* ===== Reveal animation ===== */
.reveal { opacity: 1; transform: none; }
.reveal.js-armed { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 15% 0); transition: opacity 0.6s ease, transform 0.6s ease, clip-path 0.6s ease; }
.reveal.js-armed.in-view { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 5rem 0; }
.error-404 .big { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 9rem); color: var(--peach); margin: 0; }

/* COMPONENTS: .class - what it is
.container - centered max-width content wrapper
.btn / .btn-primary / .btn-ghost / .btn-ghost-dark / .btn-sm - button variants with fill-sweep hover
.site-header / .header-inner / .main-nav / .nav-toggle / .nav-close / .nav-overlay - header & mobile nav
.logo / .logo-mark / .logo-word - SVG logo mark and wordmark
.cart-link / .cart-count - header cart icon and animated count badge
.hero / .hero-parallax / .hero-grid / .hero-art / .float-shape - home hero with cursor parallax shapes
.divider-rip / .grain-overlay - decorative SVG section divider and grain texture
.page-hero - inner page hero band
.breadcrumbs - small breadcrumb trail
.section / .section-tight / .section-alt / .section-title - page section rhythm
.grid / .grid-2 / .grid-3 / .grid-4 - simple CSS grid utilities
.stack-sm / .stack-md - vertical spacing utilities
.story-scroll / .story-card - home horizontal scroll-snap story section
.card-grid / .product-card / .scroll-strip - product/course card grid, mobile becomes scroll strip
.dye-lab / .dye-swatch / .dye-label - signature "Barvni laboratorij" interactive feature
.form-grid / .field / .field-error / .form-msg / .hp-field - form layout, inline errors, honeypot
.newsletter-form - footer newsletter signup
.notice / .notice-info / .notice-success / .notice-warn - inline message boxes
.prose / .legal-layout / .legal-toc - long-form legal text and sticky table of contents
.faq / .faq-item - details/summary FAQ accordion
.product-detail / .qty-row - single product page layout
.cart-table / .cart-summary / .remove-btn - cart/checkout table and summary box
.contact-layout / .contact-info - contact page two-column layout
.site-footer / .footer-inner / .footer-brand / .footer-col / .footer-bottom - footer layout
.cookie-banner / .cookie-actions - cookie consent banner
.reveal / .js-armed / .in-view / .delay-1 / .delay-2 / .delay-3 - scroll-reveal animation hooks
.error-404 - 404 page layout
*/

/* Additional component styles for product pages and details */
.product-price { font-weight: 600; color: var(--rust); }
.unit { font-size: 0.9rem; color: var(--ink-soft); font-weight: normal; }
.product-meta { font-size: 0.9rem; }
.breadcrumbs { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.breadcrumbs a { text-decoration: underline; }

/* wg-contrast-autofix */
div.story-scroll article.story-card div.story-body span.story-num { color: #111111 !important; }
#cookie-decline { color: #ffffff !important; }
