/* Papirnica Triglav - Bauhaus toy-block design system */
:root {
  --ink: #1c1c1e;
  --paper: #f4f2ee;
  --grey-1: #e7e4dd;
  --grey-2: #c9c5bc;
  --grey-3: #8d8a83;
  --grey-4: #4a4844;
  --accent: #2d5bff;
  --accent-ink: #0d1f66;
  --radius: 4px;
  --maxw: 1240px;
  --gap: clamp(1rem, 2vw, 1.75rem);
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
  --shadow-block: 6px 6px 0 var(--ink);
  --dur: 0.5s;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
html, body { overflow-x: clip; }
* { box-sizing: border-box; }
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;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 999; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ layout helpers ============ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.grid { display: grid; gap: var(--gap); }
.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; } }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: var(--gap); } .mt-2 { margin-top: calc(var(--gap) * 2); }
.flex { display: flex; gap: var(--gap); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.center { text-align: center; }

/* ============ header ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 3px solid var(--ink); }
.site-header__inner { max-width: var(--maxw); margin: 0 auto; padding: 0.75rem clamp(1rem, 4vw, 2.5rem); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand__mark { color: var(--ink); flex-shrink: 0; }
.brand__word { font-family: var(--font-display); font-size: 1rem; line-height: 1.15; }
.brand__word strong { font-size: 1.15rem; }
.main-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; position: relative; padding: 0.25rem 0.1rem; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--accent); transition: right var(--dur); }
.main-nav a:hover::after, .main-nav a.is-active::after { right: 0; }
.main-nav a.is-active { color: var(--accent-ink); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { position: relative; color: var(--ink); display: flex; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; border-radius: 50%; width: 1.2rem; height: 1.2rem; display: flex; align-items: center; justify-content: center; }
.cart-count.bump { animation: bump 0.4s ease; }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.5); } }
.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: var(--radius); padding: 0.4rem; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); margin: 0;
    background: var(--ink); flex-direction: column; padding: 5rem 2rem 2rem; gap: 1.5rem;
    transform: translateX(100%); visibility: hidden; transition: transform var(--dur), visibility var(--dur);
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
  .main-nav a { color: var(--paper); }
}

/* ============ buttons ============ */
.btn { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; padding: 0.75rem 1.5rem; border-radius: var(--radius); border: 2px solid var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; position: relative; overflow: hidden; background: var(--paper); color: var(--ink); min-height: 44px; isolation: isolate; }
.btn::before { content: ""; position: absolute; inset: 0; width: 100%; left: -100%; background: var(--ink); z-index: -1; transition: left var(--dur); }
.btn:hover::before { left: 0; }
.btn:hover { color: var(--paper); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent::before { background: var(--ink); }
.btn-ghost { background: transparent; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark::before { background: var(--accent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ============ page hero (inner pages) ============ */
.page-hero { background: var(--ink); color: var(--paper); padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem); border-bottom: 6px solid var(--accent); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--paper); }
.page-hero p { color: var(--grey-2); max-width: 46ch; font-size: 1.05rem; }

/* ============ breadcrumbs ============ */
.breadcrumbs { font-size: 0.85rem; color: var(--grey-4); margin: 1rem auto 0; max-width: var(--maxw); padding: 0 clamp(1rem, 4vw, 2.5rem); }
.breadcrumbs a { color: var(--grey-4); text-decoration: underline; }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }

/* ============ prose (legal pages) ============ */
.prose { max-width: 68ch; margin: 0 auto; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.legal-toc { background: var(--grey-1); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.25rem 1.5rem; max-width: 68ch; margin: 0 auto 2.5rem; }
.legal-toc h2 { margin-top: 0; font-size: 1.05rem; }
.legal-toc ol { margin: 0; padding-left: 1.3em; }

/* ============ notice ============ */
.notice { border: 2px solid var(--ink); border-left: 8px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; background: #fff; max-width: 68ch; margin: 0 auto 1.5rem; }
.notice strong { display: block; margin-bottom: 0.25rem; }

/* ============ cards / map composition ============ */
.map-canvas { position: relative; background: var(--grey-1); border: 3px solid var(--ink); border-radius: 8px; min-height: 420px; overflow: hidden; }
.map-canvas .pin-card { position: absolute; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-block); border-radius: var(--radius); padding: 1rem 1.2rem; max-width: 230px; }
.card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-block); transition: transform var(--dur); }
.card:hover { transform: translate(-3px, -3px); }

/* ============ product cards / strip ============ */
.product-strip { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
.product-strip .product-card { scroll-snap-align: start; flex: 0 0 260px; }
.product-card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--dur), box-shadow var(--dur); box-shadow: var(--shadow-block); }
.product-card:hover { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--ink); }
.product-card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--grey-1); position: relative; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur); }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__badge { position: absolute; top: 0.6rem; left: 0.6rem; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 2px; }
.product-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card__cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey-3); font-family: var(--font-mono); }
.product-card__name { font-size: 1.05rem; margin: 0; }
.product-card__price { font-weight: 700; font-size: 1.15rem; margin-top: auto; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap); }

/* ============ product detail ============ */
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 800px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail__media { border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--grey-1); }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 2rem; font-weight: 700; }
.qty-input { width: 4.5rem; padding: 0.6rem; border: 2px solid var(--ink); border-radius: var(--radius); font-size: 1rem; }

/* ============ cart ============ */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 0.9rem 0.6rem; border-bottom: 2px solid var(--grey-1); }
.cart-table th { font-family: var(--font-mono); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: var(--grey-3); }
.cart-table img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--grey-2); }
.cart-row__name { display: flex; align-items: center; gap: 0.75rem; }
.cart-summary { background: var(--grey-1); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.5rem; }
.cart-summary__row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.cart-summary__total { font-weight: 700; font-size: 1.3rem; border-top: 2px solid var(--ink); padding-top: 0.6rem; margin-top: 0.6rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; }

/* ============ forms ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; padding: 0.7rem 0.85rem; border: 2px solid var(--ink);
  border-radius: var(--radius); background: #fff; accent-color: var(--accent);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field-error { color: #b4221f; font-size: 0.82rem; min-height: 1.1em; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { font-size: 0.9rem; margin-top: 0.5rem; min-height: 1.2em; }
.form-msg--ok { color: #1a7a3c; font-weight: 600; }
.form-msg--error { color: #b4221f; font-weight: 600; }
.newsletter-form .field { flex-direction: row; gap: 0.5rem; }
.newsletter-form input[type="email"] { flex: 1; }

/* ============ contact layout ============ */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info__item { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1.2rem; }
.contact-info__item svg { flex-shrink: 0; color: var(--accent); }

/* ============ faq ============ */
.faq { max-width: 68ch; margin: 0 auto; }
.faq-item { border: 2px solid var(--ink); border-radius: var(--radius); margin-bottom: 0.9rem; background: #fff; overflow: hidden; }
.faq-item summary { padding: 1rem 1.2rem; cursor: pointer; font-weight: 700; 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.3rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 1.2rem 1.2rem; color: var(--grey-4); }

/* ============ reveal / motion ============ */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 15% 0); transition: opacity var(--dur) ease, transform var(--dur) ease, clip-path var(--dur) ease; }
.js .reveal.in-view { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
.reveal-1 { transition-delay: 0.05s; } .reveal-2 { transition-delay: 0.15s; } .reveal-3 { transition-delay: 0.25s; } .reveal-4 { transition-delay: 0.35s; }

/* ============ marquee ============ */
.marquee { overflow: hidden; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); background: var(--ink); padding: 0.9rem 0; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 2.5rem; animation: marquee 22s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 2rem); color: var(--paper); }
.marquee span.accent { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ============ cookie banner ============ */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 640px; margin: 0 auto; background: var(--ink); color: var(--paper); border: 2px solid var(--accent); border-radius: var(--radius); padding: 1.25rem 1.5rem; z-index: 90; box-shadow: var(--shadow-block); }
.cookie-banner p { color: var(--grey-2); font-size: 0.9rem; margin-bottom: 0.9rem; }
.cookie-banner a { color: var(--paper); }
.cookie-banner__actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.cookie-banner .btn-ghost { color: var(--paper); border-color: var(--paper); }
.cookie-banner .btn-ghost:hover { color: var(--ink); }

/* ============ footer ============ */
.site-footer { background: var(--ink); color: var(--grey-2); margin-top: 4rem; }
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 2.5rem) 2rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr; gap: var(--gap); }
@media (max-width: 880px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-brand { color: var(--paper); }
.footer-brand svg { color: var(--paper); margin-bottom: 0.5rem; }
.footer-brand a { color: var(--grey-2); }
.footer-col h3 { color: var(--paper); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); margin-bottom: 0.9rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: var(--grey-2); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.site-footer__bottom { border-top: 1px solid var(--grey-4); text-align: center; padding: 1.2rem 1rem; font-size: 0.85rem; }

/* ============ home page specific ============ */
.hero { position: relative; background: var(--paper); padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.01em; }
.hero__title .accent { color: var(--accent); }
.hero__lede { font-size: 1.15rem; max-width: 42ch; color: var(--grey-4); }
.hero__art { position: relative; aspect-ratio: 1/1; }
.hero__blocks { position: absolute; }
.blocks-stack rect, .blocks-stack polygon, .blocks-stack circle { transform-origin: center; }
.js .blocks-stack > * { opacity: 0; transform: translateY(40px) scale(0.85); animation: drop 0.7s cubic-bezier(.2,.9,.3,1.2) forwards; }
.blocks-stack > *:nth-child(1) { animation-delay: 0.05s; } .blocks-stack > *:nth-child(2) { animation-delay: 0.18s; }
.blocks-stack > *:nth-child(3) { animation-delay: 0.3s; } .blocks-stack > *:nth-child(4) { animation-delay: 0.42s; }
.blocks-stack > *:nth-child(5) { animation-delay: 0.54s; }
@keyframes drop { to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .js .blocks-stack > * { opacity: 1; transform: none; animation: none; } }

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

.assistant-panel { background: #fff; border: 3px solid var(--ink); border-radius: 8px; box-shadow: var(--shadow-block); padding: clamp(1.5rem, 4vw, 2.5rem); }
.assistant-panel__grid { display: grid; gap: 1rem; margin: 1.5rem 0; }
.assistant-panel__options { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.chip { border: 2px solid var(--ink); border-radius: 999px; padding: 0.5rem 1.1rem; background: var(--paper); font-weight: 600; cursor: pointer; font-size: 0.9rem; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.assistant-result { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.assistant-result li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--grey-2); padding-bottom: 0.5rem; font-size: 0.95rem; }
.assistant-result .total { font-weight: 700; border-top: 2px solid var(--ink); padding-top: 0.6rem; margin-top: 0.4rem; }

.divider-svg { width: 100%; height: auto; display: block; color: var(--ink); }

/* ============ product card extensions ============ */
.product-card__short { font-size: 0.95rem; color: var(--grey-4); }
.product-card a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; height: 100%; }

/* ============ product detail extensions ============ */
.product-detail__info { display: flex; flex-direction: column; }
.product-detail__category { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey-3); font-family: var(--font-mono); margin: -0.5em 0 0.5em; }
.product-detail__stock { font-size: 0.9rem; color: var(--grey-4); margin: 0.5rem 0 1.5rem; }
.product-detail__form { display: flex; gap: 1rem; align-items: flex-end; margin-top: 1.5rem; }
@media (max-width: 600px) { .product-detail__form { flex-direction: column; } }
.product-detail__form .field { flex: 0 0 auto; margin-bottom: 0; }
.product-detail__form .btn { flex: 1; min-width: 180px; }

/* COMPONENTS: .class - what it is
.wrap - centered max-width content container with responsive side padding
.section - vertical page section spacing
.grid / .grid-2 / .grid-3 / .grid-4 - CSS grid layouts, collapse to 1 col under 880px
.card - bordered block-shadow card with hover lift
.btn / .btn-accent / .btn-ghost / .btn-dark / .btn-block - button variants with fill-sweep hover
.page-hero - dark hero band used at the top of inner pages
.breadcrumbs - small trail link row under the page hero
.prose - readable-measure wrapper for long legal/body text
.legal-toc - boxed table of contents for legal pages
.notice - bordered callout box (warnings, important info)
.map-canvas / .pin-card - map-like canvas with pinned content cards (home composition)
.product-strip / .product-card - horizontal scroll-snap product strip and product card
.grid-products - responsive auto-fill product grid (catalog page)
.product-detail - two-column product page layout (media + info)
.qty-input - small quantity number input
.cart-table / .cart-summary / .cart-empty - cart page table, summary box, empty state
.form-grid / .field / .field.full / .field-error - form layout grid and field wrapper
.hp-field - visually hidden honeypot field
.form-msg / .form-msg--ok / .form-msg--error - inline form feedback message
.newsletter-form - footer newsletter signup form
.contact-layout / .contact-info__item - two-column contact page layout
.faq / .faq-item - details/summary accordion list
.reveal / .reveal-1..4 - scroll-reveal animation target + stagger delay classes
.marquee / .marquee__track - looping horizontal brand-word strip (hero motion)
.cookie-banner - fixed bottom cookie consent banner
.site-footer / .footer-col / .footer-brand / .footer-news - footer layout
.hero / .hero__grid / .hero__title / .hero__lede / .hero__art / .blocks-stack - home hero + Bauhaus block drop-in animation
.grain-overlay - fixed full-viewport SVG grain texture overlay
.assistant-panel / .assistant-panel__grid / .assistant-panel__options / .chip / .assistant-result - "Solski Asistent" signature feature widget
.divider-svg - full-width decorative section divider SVG
*/

/* ============ missing component styling ============ */
.contact-info {
  display: flex;
  flex-direction: column;
}

.cart-qty {
  /* inherits base styling from .qty-input */
}

.form-grid__form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

@media (max-width: 640px) {
  .form-grid__form {
    grid-template-columns: 1fr;
  }
}
