/* ============================================================
   FlowZella — Master Stylesheet
   "Chic & Modern Digital PDF Sewing Patterns for Every Stage."
   ------------------------------------------------------------
   Structure:
   1.  Design tokens (color, type, spacing, motion)
   2.  Reset & base
   3.  Typography scale
   4.  Signature: the running-stitch system
   5.  Tailoring SVG accents
   6.  Buttons & links
   7.  Header / navigation
   8.  Hero
   9.  Product cards + scrollable gallery
   10. How It Works (real 3-step sequence)
   11. FAQ accordion
   12. Blog cards
   13. Footer
   14. Utilities, responsive, reduced-motion, focus
   ============================================================ */

/* 1. DESIGN TOKENS ----------------------------------------- */
:root {
  /* Brand palette (locked to brief) */
  --cream:       #FDFBF7;  /* fabric / page */
  --coral:       #F88379;  /* primary thread */
  --gold:        #DAA520;  /* accent thread */
  --espresso:    #2C2C2C;  /* ink / text */

  /* Derived tones */
  --coral-deep:  #E4685C;  /* hover / pressed coral */
  --gold-soft:   #C99A2E;  /* readable gold on cream */
  --blush:       #FBEDE7;  /* card tint */
  --blush-deep:  #F6DED4;  /* nested tint */
  --taupe:       #877E73;  /* muted secondary text */
  --line:        #EBE3D7;  /* hairlines */
  --ink-70:      #55524D;  /* body text softened */

  /* Type */
  --font-display: "Cormorant Garamond", "Hoefler Text", Garamond, Georgia, serif;
  --font-body:    "Mulish", "Avenir Next", system-ui, -apple-system, sans-serif;
  --tracking-label: 0.24em;

  /* Fluid type scale (Cormorant reads smaller per point, so sized up a touch) */
  --fs-hero:  clamp(3.2rem, 7.6vw, 7rem);
  --fs-h2:    clamp(2.2rem, 4.7vw, 3.7rem);
  --fs-h3:    clamp(1.4rem, 2.3vw, 1.8rem);
  --fs-lead:  clamp(1.1rem, 1.6vw, 1.3rem);
  --fs-body:  1.02rem;
  --fs-sm:    0.86rem;
  --fs-label: 0.72rem;

  /* Spacing */
  --pad-x: clamp(1.2rem, 5vw, 6rem);
  --sec-y: clamp(4.5rem, 9vw, 8.5rem);
  --gap:   clamp(1.2rem, 2.4vw, 2rem);

  /* Structure */
  --maxw: 1240px;
  --radius: 18px;
  --radius-sm: 12px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur:  0.55s;

  --shadow: 0 24px 60px -34px rgba(44, 44, 44, 0.32);
  --shadow-sm: 0 12px 30px -22px rgba(44, 44, 44, 0.4);
}

/* 2. RESET & BASE ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
section { padding-block: var(--sec-y); }

/* 3. TYPOGRAPHY -------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.005em;
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: 0; }

p { color: var(--ink-70); max-width: 62ch; }
.lead { font-size: var(--fs-lead); color: var(--ink-70); line-height: 1.55; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 0;
  border-top: 1.5px dashed var(--gold);
}

.serif-accent { font-style: italic; color: var(--coral-deep); }

/* Section heading block */
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sec-head .eyebrow { margin-bottom: 1rem; }
.sec-head p { margin-top: 1rem; }

/* 4. SIGNATURE: RUNNING-STITCH SYSTEM ---------------------- */
/* A tuned dashed "thread" — length & gap chosen to read as hand
   running-stitch rather than a generic dashed border. Two weights:
   coral (primary) and gold (accent). Elements can also carry an
   animated SVG frame that "sews itself" (see .stitch-svg / .sew). */

.stitched {
  position: relative;
  border-radius: var(--radius);
  background: #fff;
}
/* Inset thread drawn with a pseudo-element so it never clips content
   and can sit slightly inside the card edge like real topstitching. */
.stitched::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1.6px dashed var(--coral);
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
  opacity: 0.85;
}
.stitched--gold::after { border-color: var(--gold); }
.stitched--tight::after { inset: 6px; border-radius: calc(var(--radius) - 4px); }

/* Animated SVG stitch frame (used on hero + featured card) */
.stitch-svg { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible; }
.stitch-svg rect {
  fill: none;
  stroke: var(--coral);
  stroke-width: 1.8;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
}
.sew rect {
  stroke-dashoffset: 1600;
  animation: sew 2.6s var(--ease) forwards;
}
@keyframes sew { to { stroke-dashoffset: 0; } }

/* Simple stitched divider line */
.stitch-rule {
  height: 0;
  border-top: 1.6px dashed var(--line);
  margin-block: clamp(2rem, 5vw, 4rem);
}
.stitch-rule--coral { border-color: var(--coral); opacity: 0.55; }

/* 5. TAILORING SVG ACCENTS --------------------------------- */
.tailor-ico { width: 1.5em; height: 1.5em; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Measuring-tape divider: ticks encode "measurement", not decoration */
.tape-divider { position: relative; height: 34px; margin-block: 1rem; }
.tape-divider svg { width: 100%; height: 100%; }
.tape-divider line { stroke: var(--line); stroke-width: 1.4; }

/* Floating pins/needle ambient accents */
.accent-float { position: absolute; color: var(--coral); opacity: 0.35;
  pointer-events: none; z-index: 0; }
.accent-float.gold { color: var(--gold); }

/* 6. BUTTONS & LINKS --------------------------------------- */
.btn {
  --bg: var(--coral);
  --fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.92em 1.8em;
  background: var(--bg);
  color: var(--fg);
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease);
  box-shadow: 0 12px 26px -14px rgba(232, 106, 92, 0.75);
}
.btn:hover { background: var(--coral-deep); transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(232, 106, 92, 0.8); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --bg: transparent; --fg: var(--espresso);
  box-shadow: none;
  border: 1.6px dashed var(--espresso);
  padding: 0.86em 1.7em;
}
.btn--ghost:hover { background: var(--espresso); --fg: var(--cream);
  border-color: var(--espresso); box-shadow: none; }

.btn--gold { --bg: var(--gold); box-shadow: 0 12px 26px -14px rgba(218,165,32,0.7); }
.btn--gold:hover { --bg: var(--gold-soft); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 600; color: var(--coral-deep);
  border-bottom: 1.6px dashed transparent;
  transition: gap var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-arrow:hover { gap: 0.75em; border-color: var(--coral); }

/* 7. HEADER / NAVIGATION ----------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1.5px dashed var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 74px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: "Outfit", var(--font-body);
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.brand .brand-mark { height: 46px; width: auto; flex: none; }
.brand b { color: var(--coral-deep); font-weight: 800; }

.nav-links { display: flex; align-items: center; gap: 1.85rem; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink-70);
  position: relative; padding-block: 0.4rem;
  transition: color var(--dur) var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  border-top: 1.5px dashed var(--coral);
  transition: right var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--espresso); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.cart-btn { display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.cart-count { min-width: 1.4em; height: 1.4em; padding: 0 0.35em;
  display: grid; place-items: center; border-radius: 100px;
  background: var(--coral); color: #fff; font-size: 0.72rem; font-weight: 700; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; }
.nav-toggle span { display: block; width: 24px; height: 1.8px; background: var(--espresso);
  margin: 5px auto; transition: transform var(--dur) var(--ease), opacity var(--dur); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

/* 8. HERO -------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3.5rem, 8vw, 7rem); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 { margin-block: 1.1rem 1.4rem; }
.hero h1 .thread-word { position: relative; white-space: nowrap; color: var(--coral-deep);
  font-style: italic; font-weight: 500; }
.hero .lead { margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-trust { display: flex; gap: 1.6rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-trust span { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm);
  color: var(--taupe); font-weight: 500; }
.hero-trust svg { color: var(--gold); }

/* Hero visual — stitched frame around the F logo motif */
.hero-visual { position: relative; aspect-ratio: 4 / 5; border-radius: 26px;
  background:
    radial-gradient(120% 90% at 30% 0%, var(--blush) 0%, transparent 60%),
    linear-gradient(160deg, #fff 0%, var(--blush) 100%);
  display: grid; place-items: center; box-shadow: var(--shadow); overflow: hidden; }

/* 9. PRODUCT CARDS + SCROLLABLE GALLERY -------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.2rem);
}
.product-card {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

/* Horizontal-scroll gallery (2–3 images, scroll-snap) */
.gallery {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  display: flex; gap: 0; scroll-snap-type: x mandatory;
  overflow-x: auto; scrollbar-width: none; aspect-ratio: 4 / 5;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery .slide { flex: 0 0 100%; scroll-snap-align: center; position: relative;
  background: var(--blush); }
.gallery .slide img { width: 100%; height: 100%; object-fit: cover; }
/* Placeholder motif when no photo yet */
.gallery .slide.placeholder { display: grid; place-items: center; color: var(--coral);
  background: linear-gradient(150deg, var(--blush), var(--blush-deep)); }

.gallery-dots { position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 3; }
.gallery-dots button { width: 7px; height: 7px; border-radius: 100px; border: none;
  background: rgba(255,255,255,0.6); cursor: pointer; padding: 0; transition: all var(--dur); }
.gallery-dots button[aria-selected="true"] { background: #fff; width: 20px; }

.product-tag { position: absolute; top: 20px; left: 20px; z-index: 3;
  background: var(--gold); color: #fff; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 0.35em 0.75em;
  border-radius: 100px; }

.product-body { padding: 1.1rem 0.75rem 0.75rem; display: flex; flex-direction: column;
  flex: 1; }
.product-cat { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--taupe); }
.product-card h3 { margin: 0.35rem 0 0.5rem; font-size: 1.28rem; }
.product-card p { font-size: var(--fs-sm); color: var(--ink-70); margin-bottom: 1rem; }
.product-formats { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.format-chip { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.28em 0.6em; border-radius: 6px; border: 1.4px dashed var(--line);
  color: var(--taupe); }
.product-foot { display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 0.5rem; }
.price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: var(--espresso); }
.price small { font-size: 0.8rem; color: var(--taupe); font-family: var(--font-body);
  font-weight: 500; }

/* 10. HOW IT WORKS (genuine 3-step sequence — numbering earns its place) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem); position: relative; }
.step { position: relative; padding-top: 1rem; }
.step-num { font-family: var(--font-display); font-size: 3.4rem; font-weight: 600;
  color: var(--blush-deep); line-height: 1; }
.step-ico { width: 48px; height: 48px; color: var(--coral); margin: 0.6rem 0 1rem; }
.step h3 { margin-bottom: 0.6rem; }
.step p { font-size: var(--fs-sm); }
/* Dashed thread connecting the steps (the process literally runs left→right) */
.steps::before {
  content: ""; position: absolute; top: 2.6rem; left: 12%; right: 12%;
  border-top: 1.8px dashed var(--coral); opacity: 0.4; z-index: -1;
}

/* 11. FAQ ACCORDION ---------------------------------------- */
.faq-list { display: grid; gap: 0.9rem; max-width: 60rem; }
.faq-item { background: #fff; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--line); overflow: hidden;
  transition: border-color var(--dur) var(--ease); }
.faq-item[open] { border-color: var(--coral); }
.faq-item summary { cursor: pointer; list-style: none; padding: 1.2rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex: none; width: 26px; height: 26px; position: relative; }
.faq-item summary .plus::before,
.faq-item summary .plus::after { content: ""; position: absolute; inset: 0; margin: auto;
  background: var(--coral); transition: transform var(--dur) var(--ease); }
.faq-item summary .plus::before { width: 14px; height: 1.8px; }
.faq-item summary .plus::after { width: 1.8px; height: 14px; }
.faq-item[open] summary .plus::after { transform: scaleY(0); }
.faq-answer { padding: 0 1.4rem 1.35rem; }
.faq-answer p { font-size: var(--fs-sm); }
.faq-answer a { color: var(--coral-deep); font-weight: 600;
  border-bottom: 1.4px dashed var(--coral); }

/* 12. BLOG CARDS ------------------------------------------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2rem); }
.blog-card { background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.blog-thumb { aspect-ratio: 16/10; background: linear-gradient(150deg, var(--blush), var(--blush-deep));
  display: grid; place-items: center; color: var(--coral); }
.blog-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.blog-meta { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 600; margin-bottom: 0.7rem; }
.blog-card h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.blog-card p { font-size: var(--fs-sm); margin-bottom: 1.1rem; }
.blog-card .link-arrow { margin-top: auto; }

/* 13. FOOTER ----------------------------------------------- */
.site-footer { background: var(--espresso); color: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 6rem) 2rem; }
.site-footer a { color: var(--cream); opacity: 0.78; transition: opacity var(--dur); }
.site-footer a:hover { opacity: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1.5px dashed rgba(253,251,247,0.18); }
.footer-brand .brand { color: var(--cream); margin-bottom: 1rem; }
.footer-brand p { color: rgba(253,251,247,0.66); max-width: 34ch; font-size: var(--fs-sm); }
.footer-col h4 { font-family: var(--font-body); font-size: var(--fs-label); font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.footer-col ul { display: grid; gap: 0.7rem; }
.footer-col a { font-size: 0.92rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding-top: 2rem; font-size: var(--fs-sm);
  color: rgba(253,251,247,0.6); }
.footer-legal { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* 14. UTILITIES / REVEAL / RESPONSIVE / A11Y ---------------- */
.reveal { opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--espresso); color: var(--cream); padding: 0.8em 1.2em; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; margin-inline: auto; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }

  .nav-links, .nav-actions .cart-label { display: none; }
  .nav-toggle { display: block; }
  .nav[data-open="true"] .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); padding: 1.2rem var(--pad-x) 2rem;
    border-bottom: 1.5px dashed var(--line); box-shadow: var(--shadow-sm);
  }
  .nav[data-open="true"] .nav-links a { width: 100%; padding: 0.7rem 0;
    border-bottom: 1.5px dashed var(--line); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-trust { gap: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
      transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .sew rect { stroke-dashoffset: 0; }
}

/* ============================================================
   SHOP + DETAIL COMPONENTS (patterns.html / pattern-detail.html)
   ============================================================ */

/* Difficulty badges (color-coded) */
.badge { display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.32em 0.7em; border-radius: 100px; }
.badge--beginner    { background: #E8F3EA; color: #2E7D46; }
.badge--intermediate{ background: #FBF1DD; color: #9A6B12; }
.badge--advanced    { background: #F7E4E1; color: #B23A2C; }

/* Page header with result count */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.page-head h1 { margin-bottom: 0.5rem; }
.result-count { color: var(--taupe); font-size: var(--fs-sm); }

/* Shop layout: sidebar + grid */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start; }
.filter-panel { position: sticky; top: 92px; background: #fff; border-radius: var(--radius);
  border: 1.5px dashed var(--line); padding: 1.4rem; }
.filter-panel h2 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: 0.4rem; }
.filter-group { border-top: 1.5px dashed var(--line); padding-block: 1rem; }
.filter-group:first-of-type { border-top: none; }
.filter-group > button { all: unset; cursor: pointer; display: flex; width: 100%;
  align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.92rem; }
.filter-group > button .chev { transition: transform var(--dur) var(--ease); }
.filter-group[data-open="false"] > button .chev { transform: rotate(-90deg); }
.filter-group[data-open="false"] .filter-options { display: none; }
.filter-options { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.9rem; }
.filter-options.chips { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }

/* Custom checkbox */
.check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.9rem;
  color: var(--ink-70); text-transform: capitalize; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 18px; height: 18px; border: 1.6px solid var(--line); border-radius: 5px;
  display: grid; place-items: center; transition: all var(--dur) var(--ease); flex: none; }
.check .box svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3; fill: none;
  opacity: 0; }
.check input:checked + .box { background: var(--coral); border-color: var(--coral); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 2.5px solid var(--gold); outline-offset: 2px; }

/* Size/price chips as filters */
.chip-filter { cursor: pointer; }
.chip-filter input { position: absolute; opacity: 0; }
.chip-filter span { display: inline-block; padding: 0.35em 0.7em; border-radius: 100px;
  border: 1.5px dashed var(--line); font-size: 0.78rem; font-weight: 600; color: var(--taupe);
  transition: all var(--dur) var(--ease); }
.chip-filter input:checked + span { background: var(--espresso); color: var(--cream);
  border-style: solid; border-color: var(--espresso); }

/* Toolbar: active pills + sort */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.5rem; }
.active-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 0.4em; background: var(--blush);
  color: var(--coral-deep); font-size: 0.78rem; font-weight: 600; padding: 0.35em 0.4em 0.35em 0.8em;
  border-radius: 100px; }
.pill button { all: unset; cursor: pointer; width: 18px; height: 18px; display: grid;
  place-items: center; border-radius: 100px; background: rgba(228,104,92,0.15); font-size: 0.9rem;
  line-height: 1; }
.pill button:hover { background: var(--coral); color: #fff; }
.pill--clear { background: none; color: var(--taupe); text-decoration: underline; padding: 0.35em; }

.sort-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--taupe); }
.sort-wrap select { font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  color: var(--espresso); background: #fff; border: 1.5px dashed var(--line); border-radius: 100px;
  padding: 0.55em 2.2em 0.55em 1em; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232C2C2C' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9em center; }

/* Mobile filter trigger */
.filter-trigger { display: none; }

/* Listing card extras (reuses .product-card) */
.card-meta { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  margin-bottom: 0.7rem; font-size: 0.78rem; color: var(--taupe); }
.card-meta .time { display: inline-flex; align-items: center; gap: 0.35em; }
.card-sizes { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.2rem; }
.size-pill { font-size: 0.66rem; font-weight: 600; color: var(--taupe);
  border: 1.3px dashed var(--line); border-radius: 5px; padding: 0.15em 0.45em; }
.product-card a.card-link { position: absolute; inset: 0; z-index: 1; }
.product-card .btn, .product-card .link-arrow { position: relative; z-index: 2; }

/* Empty state + load more */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--taupe); }
.empty-state svg { width: 54px; height: 54px; color: var(--blush-deep); margin-bottom: 1rem; }
.load-more-wrap { text-align: center; margin-top: 2.5rem; }

/* Skeleton loader */
.skeleton { border-radius: var(--radius); background: linear-gradient(100deg,
  var(--blush) 30%, var(--blush-deep) 50%, var(--blush) 70%); background-size: 200% 100%;
  animation: shimmer 1.3s infinite; aspect-ratio: 4/5; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Pattern detail ---- */
.breadcrumb { display: flex; gap: 0.5rem; flex-wrap: wrap; font-size: var(--fs-sm);
  color: var(--taupe); padding-block: 1.4rem; }
.breadcrumb a { color: var(--taupe); border-bottom: 1.3px dashed transparent; }
.breadcrumb a:hover { color: var(--coral-deep); border-color: var(--coral); }
.breadcrumb .sep { opacity: 0.5; }

.detail-grid { display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 4vw, 4rem); align-items: start; }

/* Detail gallery */
.detail-gallery .main-img { position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/5; background: linear-gradient(150deg, var(--blush), var(--blush-deep));
  display: grid; place-items: center; color: var(--coral); cursor: zoom-in; box-shadow: var(--shadow-sm); }
.detail-gallery .main-img svg { width: 88px; height: 88px; }
.detail-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-strip { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.thumb-strip button { flex: 0 0 72px; aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 2px solid transparent; overflow: hidden; cursor: pointer; padding: 0;
  background: linear-gradient(150deg, var(--blush), var(--blush-deep)); display: grid;
  place-items: center; color: var(--coral); transition: border-color var(--dur) var(--ease); }
.thumb-strip button[aria-current="true"] { border-color: var(--coral); }
.thumb-strip button svg { width: 28px; height: 28px; }

.detail-info .subtitle { color: var(--coral-deep); font-style: italic;
  font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 1rem; }
.quick-info { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center;
  padding: 1rem 0; border-block: 1.5px dashed var(--line); margin-bottom: 1.4rem; }
.quick-info .price-from { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
  margin-left: auto; }
.quick-info .price-from small { font-family: var(--font-body); font-size: 0.8rem;
  color: var(--taupe); font-weight: 500; }

.included-list { display: grid; gap: 0.7rem; margin: 1.2rem 0; }
.included-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem;
  color: var(--ink-70); }
.included-list svg { width: 20px; height: 20px; color: var(--gold-soft); flex: none; margin-top: 2px; }

/* Section blocks in detail */
.detail-section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.detail-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.2rem; }

/* Size chart table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1.5px dashed var(--line); }
table.size-chart { width: 100%; border-collapse: collapse; min-width: 420px; }
table.size-chart th, table.size-chart td { padding: 0.85em 1em; text-align: left;
  font-size: 0.9rem; border-bottom: 1px solid var(--line); }
table.size-chart thead th { background: var(--blush); font-family: var(--font-body);
  font-weight: 700; color: var(--espresso); font-size: 0.78rem; letter-spacing: 0.05em;
  text-transform: uppercase; }
table.size-chart tbody tr:last-child td { border-bottom: none; }
table.size-chart tbody tr:hover { background: var(--cream); }
table.size-chart td:first-child { font-weight: 700; color: var(--espresso); }

/* Printing formats */
.format-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; }
.format-card { border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 1.1rem;
  text-align: center; }
.format-card .fmt { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: var(--coral-deep); }
.format-card p { font-size: 0.8rem; margin: 0.3rem auto 0; }

/* Marketplace cards */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; }
.market-card { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.4rem;
  display: flex; flex-direction: column; gap: 0.5rem; background: #fff;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.market-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.market-card--primary { border: 2px solid var(--gold); box-shadow: 0 12px 30px -20px rgba(218,165,32,0.6); }
.market-card .mk-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.market-card .mk-note { font-size: 0.78rem; color: var(--taupe); }
.market-card .mk-price { font-weight: 700; color: var(--coral-deep); font-size: 1.1rem; }
.market-card .btn { margin-top: 0.5rem; justify-content: center; }
.mk-badge { align-self: flex-start; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-dark, #B8962E); background: #FBF1DD;
  padding: 0.25em 0.6em; border-radius: 100px; }

/* Related scroller */
.related-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr);
  gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem;
  scrollbar-width: thin; }
.related-scroll > * { scroll-snap-align: start; }

/* Sticky mobile buy bar */
.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none;
  gap: 1rem; align-items: center; justify-content: space-between; padding: 0.8rem var(--pad-x);
  background: color-mix(in srgb, var(--cream) 94%, transparent); backdrop-filter: blur(12px);
  border-top: 1.5px dashed var(--line); }
.buy-bar .price-from { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(44,44,44,0.92);
  display: none; place-items: center; padding: 2rem; }
.lightbox[data-open="true"] { display: grid; }
.lightbox img, .lightbox .lb-placeholder { max-width: min(90vw, 720px); max-height: 84vh;
  border-radius: var(--radius); }
.lightbox .lb-placeholder { width: min(90vw, 560px); aspect-ratio: 4/5;
  background: linear-gradient(150deg, var(--blush), var(--blush-deep)); display: grid;
  place-items: center; color: var(--coral); }
.lightbox .lb-placeholder svg { width: 100px; height: 100px; }
.lb-btn { position: absolute; background: rgba(253,251,247,0.14); border: none; color: #fff;
  width: 48px; height: 48px; border-radius: 100px; font-size: 1.4rem; cursor: pointer;
  display: grid; place-items: center; transition: background var(--dur); }
.lb-btn:hover { background: rgba(253,251,247,0.28); }
.lb-close { top: 1.5rem; right: 1.5rem; }
.lb-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filter-panel { position: fixed; inset: 0; z-index: 150; border-radius: 0; overflow-y: auto;
    display: none; }
  .filter-panel[data-open="true"] { display: block; }
  .filter-trigger { display: inline-flex; }
  .detail-grid { grid-template-columns: 1fr; }
  .buy-bar { display: flex; }
  main.detail-main { padding-bottom: 5rem; }
}

/* ============================================================
   INTERIOR PAGES (collections / tutorials / blog / about / contact / legal)
   ============================================================ */

/* Interior hero */
.page-hero { background: linear-gradient(160deg, var(--cream), var(--blush));
  border-bottom: 1.5px dashed var(--line); }
.page-hero .wrap { padding-block: clamp(3rem, 8vw, 6rem); text-align: center; }
.page-hero h1 { margin: 0.5rem 0; }
.page-hero p { max-width: 60ch; margin: 0 auto; color: var(--ink-70); font-size: var(--fs-lead); }

/* Collections grid */
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem); }
.collection-card { position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1.5px dashed var(--line); background: #fff; padding: 2rem;
  display: flex; flex-direction: column; gap: 0.7rem; min-height: 240px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.collection-card::before { content: ""; position: absolute; inset: 0; opacity: 0.5;
  background: radial-gradient(120% 90% at 100% 0%, var(--blush), transparent 60%); }
.collection-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.collection-card > * { position: relative; }
.collection-card .c-ico { width: 46px; height: 46px; color: var(--coral); }
.collection-card h3 { font-size: 1.6rem; }
.collection-card .c-count { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-soft); font-weight: 700; }
.collection-card .link-arrow { margin-top: auto; }

/* Category filter chips (single-select) */
.cat-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 2.5rem; }
.cat-chip { font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  padding: 0.5em 1.1em; border-radius: 100px; border: 1.5px dashed var(--line);
  background: #fff; color: var(--taupe); cursor: pointer; transition: all var(--dur) var(--ease); }
.cat-chip[aria-pressed="true"] { background: var(--espresso); color: var(--cream);
  border-style: solid; border-color: var(--espresso); }
.type-badge { align-self: flex-start; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--coral-deep); background: var(--blush);
  padding: 0.25em 0.6em; border-radius: 100px; margin-bottom: 0.5rem; display: inline-block; }

/* About: values + features */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.value-card { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.8rem;
  background: #fff; }
.value-card svg { width: 40px; height: 40px; color: var(--coral); margin-bottom: 0.8rem; }
.value-card h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.value-card p { font-size: 0.92rem; color: var(--ink-70); }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1rem; }
.mission { background: var(--espresso); color: var(--cream); border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.mission h2 { color: var(--cream); }
.mission p { color: rgba(253,251,247,0.82); max-width: 56ch; margin: 0.8rem auto 0;
  font-size: var(--fs-lead); }
.feature-list { display: grid; gap: 1rem; }
.feature-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.feature-list svg { width: 22px; height: 22px; color: var(--gold-soft); flex: none; margin-top: 3px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--taupe); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea { width: 100%; font-family: var(--font-body);
  font-size: 1rem; color: var(--espresso); background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.8em 1em; transition: border-color var(--dur) var(--ease); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none;
  border-color: var(--coral); box-shadow: 0 0 0 3px rgba(248,131,121,0.15); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #C0392B; }
.field-error { color: #C0392B; font-size: 0.78rem; margin-top: 0.35rem; display: none; }
.field.invalid .field-error { display: block; }
.form-note { font-size: 0.82rem; color: var(--taupe); margin-top: 0.8rem; }
.form-success { background: #E8F3EA; color: #2E7D46; border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; font-weight: 600; margin-bottom: 1.2rem; display: none; }
.contact-aside { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 1.8rem; }
.contact-aside h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }

/* Social row (contact + footer) */
.social-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.social-row a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 100px;
  border: 1.5px solid var(--line); color: var(--espresso); transition: all var(--dur) var(--ease); }
.social-row a:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.social-row svg { width: 20px; height: 20px; }
.footer-social { margin-top: 1rem; }
.footer-social .social-row a { border-color: rgba(253,251,247,0.25); color: var(--cream); }
.footer-social .social-row a:hover { background: var(--coral); border-color: var(--coral); }

/* Legal */
.legal-layout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start; }
.legal-nav { position: sticky; top: 92px; border: 1.5px dashed var(--line);
  border-radius: var(--radius); padding: 1.2rem; }
.legal-nav a { display: block; padding: 0.5em 0; color: var(--ink-70); font-weight: 600;
  font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.legal-nav a:last-child { border-bottom: none; }
.legal-nav a:hover { color: var(--coral-deep); }
.legal-section { margin-bottom: 2.5rem; max-width: 72ch; }
.legal-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.8rem; }
.legal-section p, .legal-section li { color: var(--ink-70); margin-bottom: 0.8rem; }
.legal-section ul { padding-left: 1.2rem; list-style: disc; }
.legal-updated { font-size: 0.8rem; color: var(--taupe); font-style: italic; }

@media (max-width: 820px) {
  .contact-grid, .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .legal-nav a { border: 1.5px dashed var(--line); border-radius: 100px; padding: 0.4em 0.9em; }
}

/* ============================================================
   PLACEHOLDER PRODUCT CARDS (homepage "Shop Patterns" — awaiting real catalog)
   ============================================================ */
.product-card.is-placeholder { pointer-events: none; }
.product-card.is-placeholder:hover { transform: none; box-shadow: var(--shadow-sm); }
.ph-gallery { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--cream), var(--blush)); }
.ph-logo { width: 44%; max-width: 150px; height: auto; opacity: 0.16; }
.ph-lines { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.7rem; }
.ph-lines span { display: block; height: 9px; border-radius: 100px; background: var(--line); }
.ph-lines span:first-child { width: 78%; }
.ph-lines span:last-child { width: 52%; }
.product-card.is-placeholder .product-cat { color: var(--taupe); }
.product-card.is-placeholder h3 { color: var(--taupe); }

/* ============================================================
   WORDMARK LOGO (image replaces the text brand in header & footer)
   ============================================================ */
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.brand-logo { display: block; width: auto; height: 48px; }
.site-header .brand-logo { height: 48px; }
.footer-brand .brand-logo { height: 44px; }
@media (max-width: 900px) { .site-header .brand-logo { height: 44px; } }
@media (max-width: 480px) { .site-header .brand-logo { height: 38px; } }


/* ============================================================
   HERO CRAFT ANIMATION (PDF → cut → pattern → sew), pure SVG+CSS
   ============================================================ */
.craft-anim { position: absolute; inset: 0; }
.craft-anim .craft-svg { display: block; width: 100%; height: 100%; }
