/* =========================================================
   Kostumi Lučka - Textile Weave design system
   ========================================================= */
:root {
  --rust: #b5572c;
  --rust-dark: #8c3f1e;
  --cream: #f5ecd9;
  --cream-dark: #e8dcc0;
  --slate: #3f4f66;
  --slate-dark: #27323f;
  --ink: #241d17;
  --thread: #c9a876;
  --radius: 14px;
  --maxw: 1180px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", Segoe UI, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --shadow-1: 0 10px 30px -12px rgba(36, 29, 23, 0.35);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--rust-dark); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.1; color: var(--slate-dark); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--cream); padding: .5rem 1rem; z-index: 999; border-radius: 8px; }

/* utilities */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.flow > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.text-center { text-align: center; }
.icon { stroke: currentColor; fill: none; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.stagger-1 { transition-delay: .08s; } .reveal.stagger-2 { transition-delay: .16s; }
.reveal.stagger-3 { transition-delay: .24s; } .reveal.stagger-4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream); border-bottom: 2px dashed var(--thread);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: .85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .6rem; }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-word { font-family: var(--font-display); font-size: 1.3rem; color: var(--slate-dark); }
.logo-word em { color: var(--rust); font-style: normal; }
.nav-toggle {
  display: none; background: none; border: none; color: var(--slate-dark);
  width: 44px; height: 44px; align-items: center; justify-content: center;
}
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; gap: 1.25rem; list-style: none; }
.site-nav a { color: var(--slate-dark); font-weight: 600; position: relative; padding: .2rem 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--rust); transition: width .25s ease;
}
.site-nav a:hover::after, .site-nav a.is-active::after { width: 100%; }
.site-nav a.is-active { color: var(--rust-dark); }
.cart-link { position: relative; display: inline-flex; color: var(--slate-dark); }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--rust); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: 50%; 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)} }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw); height: 100vh;
    background: var(--slate-dark); flex-direction: column; align-items: flex-start;
    padding: 5.5rem 1.5rem 2rem; gap: 2rem;
    transform: translateX(100%); visibility: hidden; transition: transform .35s ease, visibility .35s ease;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 1.1rem; }
  .site-nav a { color: var(--cream); }
  .cart-link { color: var(--cream); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: .95rem;
  border: 2px solid transparent; position: relative; overflow: hidden; z-index: 0;
  min-height: 44px;
}
.btn-fill { background: var(--rust); color: #fff; }
.btn-fill::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--rust-dark); transition: left .3s ease; z-index: -1;
}
.btn-fill:hover::before { left: 0; }
.btn-outline { background: transparent; color: var(--slate-dark); border-color: var(--slate-dark); }
.btn-outline:hover { background: var(--slate-dark); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-ghost:hover { background: rgba(245,236,217,.15); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; min-height: 38px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 3rem 0 5rem;
  background: linear-gradient(180deg, var(--cream-dark), var(--cream));
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center;
}
.hero-headline {
  font-size: clamp(2.3rem, 5.5vw, 4.2rem); color: var(--slate-dark); margin-bottom: .6rem;
}
.hero-sub { font-size: 1.15rem; max-width: 36ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-visual { position: relative; }
.hero-photo-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1);
  aspect-ratio: 4/5;
}
.hero-photo-wrap img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.02); }
.hero-card {
  position: absolute; bottom: -1.5rem; left: -2rem; background: var(--slate-dark); color: var(--cream);
  border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow-1);
  max-width: 220px; z-index: 2;
}
.hero-card strong { color: var(--rust); display: block; font-family: var(--font-display); font-size: 1.1rem; }
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.route-path {
  fill: none; stroke: var(--rust); stroke-width: 2; stroke-dasharray: 6 8;
  stroke-dashoffset: 300; animation: dash 6s linear infinite;
}
.route-pin { animation: drop 1.8s ease-in-out infinite; transform-origin: center; }
@keyframes dash { to { stroke-dashoffset: 0; } }
@keyframes drop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .route-path, .route-pin { animation: none; } }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { left: 1rem; bottom: -1rem; }
}

/* grain overlay */
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .05; mix-blend-mode: multiply; z-index: 1; }

/* ---------- section dividers / ornaments ---------- */
.thread-divider { width: 100%; height: 24px; color: var(--thread); display: block; }
.section { padding: 4rem 0; position: relative; }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.section-alt { background: var(--cream-dark); }
.stitched-border { border: 2px dashed var(--thread); border-radius: var(--radius); padding: 2rem; }

/* ---------- product cards ---------- */
.product-strip {
  display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .3s ease, box-shadow .3s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 35px -14px rgba(36,29,23,.45); }
.card-media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .card-media img { transform: scale(1.07); }
.card-badge {
  position: absolute; top: .75rem; left: .75rem; background: var(--rust); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
}
.card-body { padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); }
.card-title { font-family: var(--font-display); font-size: 1.15rem; margin: 0; color: var(--slate-dark); }
.card-price { font-weight: 700; color: var(--rust-dark); margin-top: auto; }

@media (max-width: 600px) {
  .product-strip.scroll-mobile {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1rem; padding-bottom: .5rem;
  }
  .product-strip.scroll-mobile .card { min-width: 72vw; scroll-snap-align: start; }
}

/* ---------- tailor advisor (signature feature) ---------- */
.advisor {
  background: var(--slate-dark); color: var(--cream); border-radius: var(--radius);
  padding: 2.5rem; display: grid; gap: 2rem; grid-template-columns: 1fr 1fr; align-items: start;
  position: relative; overflow: hidden;
}
.advisor h2, .advisor h3 { color: var(--cream); }
.advisor-form { display: grid; gap: 1rem; }
.advisor-form .field { display: grid; gap: .3rem; }
.advisor-form label { font-weight: 600; font-size: .9rem; }
.advisor-form input {
  background: rgba(245,236,217,.08); border: 1px solid rgba(245,236,217,.35); border-radius: 8px;
  color: var(--cream); padding: .7rem .9rem; font-size: 1rem;
}
.advisor-result {
  background: rgba(245,236,217,.08); border: 1px dashed var(--thread); border-radius: var(--radius);
  padding: 1.5rem;
}
.advisor-result.pulse { animation: pulse .5s ease; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(181,87,44,.6); } 100% { box-shadow: 0 0 0 16px rgba(181,87,44,0); } }
.tailor-hint { font-size: .85rem; opacity: .8; }
@media (max-width: 760px) { .advisor { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--slate-dark); color: var(--cream-dark); padding-top: 1rem; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.25rem 1rem;
  display: grid; gap: 2.5rem; grid-template-columns: 1.2fr 1.6fr 1fr;
}
.footer-inner > * { min-width: 0; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand p { max-width: 32ch; opacity: .85; }
.footer-mail { display: inline-flex; align-items: center; gap: .5rem; color: var(--cream); font-weight: 600; }
.footer-nav { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-nav h3 { color: var(--cream); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-nav ul { list-style: none; display: grid; gap: .5rem; margin-top: .75rem; }
.footer-nav a { color: var(--cream-dark); }
.footer-nav a:hover { color: var(--rust); }
.newsletter-form { display: grid; gap: .6rem; }
.newsletter-form h3 { color: var(--cream); font-size: .95rem; }
.newsletter-form .field { display: grid; gap: .3rem; }
.newsletter-form label { font-size: .85rem; }
.newsletter-form input {
  background: rgba(245,236,217,.08); border: 1px solid rgba(245,236,217,.35); border-radius: 8px;
  color: var(--cream); padding: .6rem .8rem;
}
.newsletter-form .hp { position: absolute; left: -9999px; }
.footer-bottom { text-align: center; padding: 1rem; font-size: .82rem; opacity: .75; border-top: 1px solid rgba(245,236,217,.15); }
.form-msg { font-size: .85rem; min-height: 1.2em; }
.form-msg-ok { color: #a8d8a0; }
.form-msg-error { color: #e39a8a; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 520px; margin: 0 auto;
  background: var(--slate-dark); color: var(--cream); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; box-shadow: var(--shadow-1); z-index: 200;
  display: grid; gap: 1rem;
}
.cookie-banner a { color: var(--rust); }
.cookie-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* =========================================================
   Inner-page component library (for the second writer)
   ========================================================= */
.page-hero {
  background: var(--cream-dark); padding: 3.5rem 0 2.5rem; border-bottom: 2px dashed var(--thread);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero p { max-width: 50ch; font-size: 1.05rem; }

.breadcrumbs { font-size: .85rem; margin-bottom: .75rem; }
.breadcrumbs a { color: var(--slate); }
.breadcrumbs span { color: var(--slate-dark); opacity: .7; }
.breadcrumbs .sep { margin: 0 .4rem; opacity: .5; }

.prose { max-width: 70ch; margin: 0 auto; }
.prose h2 { margin-top: 2rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1em 1.4em; }
.prose li { margin-bottom: .4em; }

.notice { border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid; margin: 1.5rem 0; }
.notice-info { background: rgba(63,79,102,.08); border-color: var(--slate); }
.notice-warn { background: rgba(181,87,44,.08); border-color: var(--rust); }

.form-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: .4rem; }
.field.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  padding: .7rem .9rem; border: 1px solid var(--slate); border-radius: 8px; font: inherit; background: #fff;
  accent-color: var(--rust);
}
.field input:invalid:not(:placeholder-shown) { border-color: var(--rust); }
.field-error { color: var(--rust-dark); font-size: .82rem; min-height: 1.1em; }

.faq-item {
  border: 1px solid var(--thread); border-radius: var(--radius); padding: 0; margin-bottom: 1rem; overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.25rem; font-weight: 700; cursor: pointer; list-style: none; font-family: var(--font-display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; font-size: 1.3rem; color: var(--rust); }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 1.25rem 1.25rem; }

.product-detail { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
.product-detail .pd-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); aspect-ratio: 4/5; }
.product-detail .pd-media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .pd-price { font-size: 1.8rem; font-weight: 700; color: var(--rust-dark); font-family: var(--font-display); }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: .85rem .6rem; border-bottom: 1px solid var(--thread); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.cart-summary { background: var(--cream-dark); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .75rem; }
.cart-summary .row { display: flex; justify-content: space-between; }
.cart-summary .total { font-weight: 700; font-size: 1.2rem; border-top: 1px dashed var(--thread); padding-top: .75rem; }

.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

.legal-toc { background: var(--cream-dark); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.legal-toc ol { margin-left: 1.4em; }

/* COMPONENTS: .page-hero - inner-page hero band with title+intro */
/* COMPONENTS: .breadcrumbs - small breadcrumb trail above page title */
/* COMPONENTS: .prose - readable long-form legal/text content wrapper */
/* COMPONENTS: .notice / .notice-info / .notice-warn - callout boxes */
/* COMPONENTS: .btn .btn-fill .btn-outline .btn-ghost .btn-sm - button variants */
/* COMPONENTS: .form-grid - responsive form field grid */
/* COMPONENTS: .field / .field-wide / .field-error - form field wrapper + error text */
/* COMPONENTS: .faq / .faq-item - details/summary accordion for FAQ */
/* COMPONENTS: .product-detail / .pd-media / .pd-price - single product page layout */
/* COMPONENTS: .cart-table / .cart-summary - cart and checkout tables/summary box */
/* COMPONENTS: .contact-layout - two-column contact page layout */
/* COMPONENTS: .legal-toc - table of contents box for legal pages */
/* COMPONENTS: .card / .card-media / .card-badge / .card-body / .card-cat / .card-title / .card-price - product card */
/* COMPONENTS: .product-strip / .scroll-mobile - product grid, horizontal scroll on mobile */
/* COMPONENTS: .advisor / .advisor-form / .advisor-result - signature tailor-size-advisor widget */
/* COMPONENTS: .section / .section-alt / .section-head - page section wrapper */
/* COMPONENTS: .stitched-border - dashed-border decorative box */
/* COMPONENTS: .thread-divider - SVG stitched-thread section divider */
/* COMPONENTS: .reveal / .in-view / .stagger-1..4 - scroll-reveal animation hooks */
/* COMPONENTS: .cookie-banner / .cookie-actions - cookie consent banner */
/* COMPONENTS: .hero / .hero-headline / .hero-sub / .hero-visual / .hero-card / .hero-photo-wrap - home hero */

/* Extra: filter and FAQ styling */
.btn.active { background: var(--rust); color: var(--cream); }
.faq { /* container for FAQ items */ }
details[open] { /* ensure open state is visible */ }

/* Hero copy text */
.hero-copy {
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 65ch;
  color: var(--ink);
}

/* Catalog filters container */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--cream-dark);
  border-radius: var(--radius);
  margin: 0 0 2rem 0;
}

@media (max-width: 640px) {
  .catalog-filters {
    padding: 1rem;
    gap: 0.5rem;
  }
}

/* wg-contrast-autofix */
footer.site-footer div.footer-inner div.footer-brand span.logo-word { color: #ffffff !important; }
