/* Okviri Val — design system. French-bistro mood reinterpreted for a Zadar frame workshop:
   awning stripes + menu-board type -> terracotta/cream/olive, diagonal clipped sections, wave motifs. */

:root {
  --cream: #f7efe1;
  --paper: #fffaf1;
  --terracotta: #bc6b3c;
  --terracotta-dark: #96512b;
  --olive: #5c6b3f;
  --olive-dark: #3f4a2b;
  --ink: #2a2420;
  --ink-soft: #5a5048;
  --navy: #28384a;
  --line: rgba(42,36,32,.14);
  --radius: 10px;
  --shadow-paper: 0 10px 24px -12px rgba(42,36,32,.35), 0 2px 6px rgba(42,36,32,.12);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
}

* { 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(--cream);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta-dark); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.1; color: var(--ink); }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Layout utilities ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; position: relative; }
.grid { display: grid; gap: 28px; }
.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: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.mt-0{margin-top:0}.mt-1{margin-top:12px}.mt-2{margin-top:24px}.mt-3{margin-top:48px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:12px}.mb-2{margin-bottom:24px}.mb-3{margin-bottom:48px}
.text-center { text-align: center; }
.eyebrow { font-family: var(--font-mono); letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--terracotta-dark); display: inline-block; margin-bottom: .6em; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); clip-path: inset(0 0 12% 0); transition: opacity .7s ease, transform .7s ease, clip-path .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); }
.awning {
  height: 10px;
  background: repeating-linear-gradient(115deg, var(--terracotta) 0 26px, var(--cream) 26px 52px);
  border-bottom: 2px solid var(--olive);
}
.header-inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { flex: none; }
.logo-word { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.logo-word em { font-style: normal; color: var(--terracotta-dark); }
.logo-word--light { color: var(--paper); }
.main-nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; position: relative; padding: 4px 2px; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--terracotta); transition: right .25s ease; }
.main-nav a:hover::after, .main-nav a.is-active::after { right: 0; }
.main-nav a.is-active { color: var(--terracotta-dark); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: inline-flex; color: var(--ink); min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--terracotta); color: #fff; border-radius: 50%; font-size: .68rem; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.cart-link.bump .cart-count { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1)} 40%{transform:scale(1.5)} 100%{transform:scale(1)} }
.menu-toggle { display: none; background: none; border: none; min-width: 44px; min-height: 44px; color: var(--ink); cursor: pointer; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; top: 61px; width: min(78vw, 320px); height: calc(100vh - 61px);
    background: var(--paper); flex-direction: column; padding: 28px 24px; gap: 22px;
    transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s ease;
    box-shadow: -8px 0 24px rgba(0,0,0,.15);
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .95rem; cursor: pointer; border: 2px solid transparent; min-height: 44px; position: relative; overflow: hidden; }
.btn-sweep { background: var(--terracotta); color: #fff; }
.btn-sweep::before { content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: var(--olive); transition: left .3s ease; z-index: 0; }
.btn-sweep:hover::before { left: 0; }
.btn-sweep span, .btn-sweep { z-index: 1; }
.btn-sweep:hover { color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-outline-dark { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn-outline-dark:hover { background: var(--paper); color: var(--ink); }
.btn-ghost { background: none; border: none; color: var(--terracotta-dark); text-decoration: underline; padding: 8px; }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero / diagonal sections ---------- */
.hero { position: relative; padding: 70px 0 120px; background: linear-gradient(180deg, var(--cream), var(--paper)); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.hero-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 42ch; }
.hero-art { position: relative; aspect-ratio: 1/1; }
.diagonal-section { position: relative; background: var(--olive); color: var(--paper); clip-path: polygon(0 6%, 100% 0, 100% 94%, 0 100%); padding: 110px 0; }
.diagonal-section.flip { clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%); background: var(--navy); }
.diagonal-section h2, .diagonal-section h3 { color: var(--paper); }
.diagonal-section .eyebrow { color: #e9c9a6; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--cream), var(--paper)); clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { max-width: 60ch; color: var(--ink-soft); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: underline; }
.breadcrumbs span[aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Cards ---------- */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-paper); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 32px -14px rgba(42,36,32,.4); }
.product-card { display: flex; flex-direction: column; }
.product-card .img-frame { aspect-ratio: 4/3; overflow: hidden; }
.product-card .img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .img-frame img { transform: scale(1.07); }
.product-card .card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .price { font-family: var(--font-mono); font-weight: 700; color: var(--terracotta-dark); font-size: 1.1rem; }

/* ---------- Horizontal scroll-snap strip ---------- */
.product-strip { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.product-strip .product-card { min-width: 260px; scroll-snap-align: start; }
@media (min-width: 861px) { .product-strip { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; } }

/* ---------- Notice / badges ---------- */
.notice { border-radius: var(--radius); padding: 16px 20px; border-left: 4px solid var(--olive); background: rgba(92,107,63,.09); margin: 0 0 1.2em; }
.notice.notice-warn { border-color: var(--terracotta); background: rgba(188,107,60,.1); }
.badge-seal { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper);
  accent-color: var(--terracotta); min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--terracotta); }
.field-error { color: #9c2b1f; font-size: .82rem; min-height: 1.1em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #9c2b1f; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-success { background: rgba(92,107,63,.12); border-radius: 8px; padding: 14px 18px; color: var(--olive-dark); font-weight: 600; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type=email] { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: var(--paper); }
.newsletter-form input[type=email]::placeholder { color: rgba(255,255,255,.6); }

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.legal-toc { background: var(--paper); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-paper); }
.legal-toc ol { margin: 0; padding-left: 1.2em; }
.legal-toc a { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 72ch; }
.faq-item { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-paper); padding: 4px 22px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 16px 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(--terracotta); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 16px; color: var(--ink-soft); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .gallery { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-paper); }
.product-detail .gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .price { font-family: var(--font-mono); font-size: 1.6rem; color: var(--terracotta-dark); font-weight: 700; }

/* ---------- Cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.cart-summary { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-paper); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.cart-summary .summary-total { font-size: 1.3rem; font-weight: 700; display: flex; justify-content: space-between; }
.qty-input { width: 64px; padding: 8px; border-radius: 6px; border: 1.5px solid var(--line); }

/* ---------- Contact layout ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info .info-row { display: flex; gap: 12px; align-items: flex-start; }
.contact-info svg { flex: none; color: var(--terracotta); margin-top: 2px; }

/* ---------- Signature feature: Val Mjerač ---------- */
.val-mjerac { background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-paper); padding: 36px; position: relative; }
.val-mjerac .mj-inputs { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.val-mjerac .mj-inputs .field { flex: 1; min-width: 120px; }
.mj-visual { display: flex; align-items: center; justify-content: center; padding: 30px 10px; }
.mj-frame-preview { border: 10px solid var(--terracotta); background: var(--cream); display: flex; align-items: center; justify-content: center; transition: width .4s ease, height .4s ease; box-shadow: var(--shadow-paper); }
.mj-frame-preview .mat { border: 8px solid #fff; width: 86%; height: 86%; background: repeating-linear-gradient(45deg, rgba(92,107,63,.08) 0 8px, transparent 8px 16px); }
.mj-result { text-align: center; margin-top: 16px; font-family: var(--font-mono); }
.mj-result strong { color: var(--terracotta-dark); font-size: 1.3rem; }

/* ---------- Decorative wave divider ---------- */
.wave-divider { display: block; width: 100%; height: 48px; }

/* ---------- Grain overlay ---------- */
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .05; mix-blend-mode: multiply; z-index: 1; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 120px 0; }
.page-404 h1 { font-size: clamp(3rem, 10vw, 6rem); }

/* COMPONENTS:
.wrap - centered max-width content wrapper
.section - vertical page section spacing
.grid / .grid-2 / .grid-3 / .grid-4 - responsive CSS grid helpers
.eyebrow - small mono uppercase label above headings
.reveal / .reveal.in-view / .reveal-stagger - scroll reveal animation states
.site-header / .awning / .header-inner / .logo / .logo-mark / .logo-word - header & logo
.main-nav / .main-nav a.is-active - primary navigation and active state
.header-actions / .cart-link / .cart-count / .cart-link.bump - cart icon & badge
.menu-toggle - mobile nav hamburger button
.btn / .btn-sweep / .btn-outline / .btn-outline-dark / .btn-ghost / .btn-sm - button variants
.hero / .hero-grid / .hero-lede / .hero-art - home hero section
.diagonal-section / .diagonal-section.flip - angled clip-path full-bleed section
.page-hero - inner page top banner with angled bottom edge
.breadcrumbs - small page-location trail
.card / .product-card / .img-frame / .card-body / .price - product/content cards
.product-strip - horizontal scroll-snap row of product cards
.notice / .notice-warn - callout/info box
.badge-seal - small mono badge label
.form-grid / .field / .field-full / .field-error / .hp-field - form layout and validation
.form-success - inline success message box
.newsletter-form - footer newsletter signup row
.prose - readable long-form legal text container
.legal-toc - table-of-contents box for legal pages
.faq / .faq-item - accordion FAQ list (details/summary)
.product-detail / .gallery - single product page layout
.cart-table / .cart-summary / .qty-input - cart/checkout tables
.contact-layout / .contact-info - contact page split layout
.val-mjerac / .mj-inputs / .mj-visual / .mj-frame-preview / .mj-result - signature frame-size calculator
.wave-divider - decorative SVG section divider
.grain-overlay - fixed full-viewport SVG grain texture
.page-404 - 404 page centered layout
*/

/* ---------- Footer ---------- */
.site-footer {
  background: var(--olive-dark);
  color: var(--cream);
  padding: 60px 0 0;
  position: relative;
  margin-top: 88px;
}

.footer-wave {
  display: block;
  width: 100%;
  height: auto;
  fill: var(--olive-dark);
  margin-bottom: -4px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--cream);
}

.footer-col a:hover {
  color: var(--terracotta);
}

.footer-col h3 {
  color: var(--cream);
  font-size: 1rem;
  margin: 0 0 .5em;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(247, 239, 225, 0.9);
  margin: 0;
}

.footer-brand {
  grid-column: span 1;
}

.footer-links {
  grid-column: span 1;
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
}

.footer-newsletter {
  grid-column: span 1;
}

.footer-newsletter input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  margin-top: 8px;
}

.footer-email {
  font-size: 0.9rem;
  color: rgba(247, 239, 225, 0.9);
  margin: 0;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px;
  border-top: 1px solid rgba(247, 239, 225, 0.2);
  font-size: 0.85rem;
  text-align: center;
  color: rgba(247, 239, 225, 0.8);
}

.cookie-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cookie-actions button {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--cream);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s;
}

.cookie-actions button:hover {
  background: var(--cream);
  color: var(--olive-dark);
}

.route-line {
  stroke: var(--terracotta);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pin-drop {
  fill: var(--terracotta);
}

.remove-item {
  background: none;
  border: none;
  color: var(--terracotta-dark);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s;
}

.remove-item:hover {
  background: rgba(188, 107, 60, 0.1);
  color: var(--terracotta);
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* wg-contrast-autofix */
div.val-mjerac.mt-3 div.mj-inputs div.field label { color: #111111 !important; }
#cookie-decline { color: #111111 !important; }
#cookie-accept { color: #111111 !important; }
