/* ===== Knit & Thread Studio — professional knitting theme ===== */
:root {
  --bg: #f7f2ea;          /* oatmeal wool */
  --surface: #fffdf9;
  --alt: #efe7da;
  --ink: #2b2622;         /* charcoal yarn */
  --muted: #6f655c;
  --line: #e3d8c8;
  --rust: #b5543a;        /* terracotta yarn */
  --rust-dark: #8f4029;
  --sage: #7d8f74;
  --mustard: #c9973f;
  --radius: 16px;
  --shadow-sm: 0 2px 8px rgba(43, 38, 34, .06);
  --shadow: 0 14px 40px rgba(43, 38, 34, .10);
  --knit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18'%3E%3Cpath d='M2 2 L11 15 L20 2' fill='none' stroke='%23000' stroke-opacity='.045' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
svg { display: block; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.narrow { width: min(820px, 92%); }
.muted { color: var(--muted); font-size: .9rem; }

.eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--rust); color: #fff; border: 1.5px solid var(--rust);
  padding: 14px 26px; border-radius: 10px; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; text-align: center;
}
.btn:hover { background: var(--rust-dark); border-color: var(--rust-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(181, 84, 58, .25); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--bg); border-color: var(--bg); color: var(--ink); box-shadow: none; }
.btn-block { width: 100%; }
.btn:focus-visible, .chip:focus-visible, .card:focus-visible, .thumb:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 234, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 36px; height: 36px; }
.logo-text { font-family: "Fraunces", serif; font-size: 1.3rem; font-weight: 700; white-space: nowrap; }
.logo-text em { font-style: italic; font-weight: 400; color: var(--rust); }
.nav-links { display: flex; gap: 30px; margin-left: auto; font-size: .95rem; font-weight: 500; color: var(--muted); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--rust); transition: width .25s; }
.nav-links a:hover::after { width: 100%; }
.menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.menu-btn span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 100px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--rust); font-weight: 400; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-trust { list-style: none; display: flex; gap: 36px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-trust li { display: flex; flex-direction: column; }
.hero-trust strong { font-family: "Fraunces", serif; font-size: 1.2rem; }
.hero-trust span { font-size: .85rem; color: var(--muted); }

.hero-art { position: relative; min-height: 480px; }
.hero-bg { position: absolute; inset: 6% 4%; border-radius: 50%; background: var(--alt) var(--knit); }
.hero-photo {
  position: absolute; width: 50%; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background: #fff; border: 6px solid #fff; box-shadow: var(--shadow); transition: transform .35s;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo.p1 { left: 2%; top: 4%; transform: rotate(-7deg); }
.hero-photo.p2 { right: 2%; top: 0; transform: rotate(6deg); }
.hero-photo.p3 { left: 25%; bottom: 0; width: 52%; transform: rotate(-1deg); z-index: 2; }
.hero-photo:hover { transform: rotate(0) scale(1.03); z-index: 3; }
.pdf-tag {
  position: absolute; top: 10px; right: 10px; background: var(--rust); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 5px; letter-spacing: .08em;
}
.yarn-ball { position: absolute; width: 104px; right: 0; bottom: 6%; z-index: 4; filter: drop-shadow(0 12px 18px rgba(43,38,34,.18)); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(3deg); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--alt) var(--knit); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section-head .sub { color: var(--muted); margin-top: 12px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; transition: transform .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.f-icon { width: 50px; height: 50px; border-radius: 12px; background: #f6e6df; display: grid; place-items: center; margin-bottom: 18px; }
.f-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--rust); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .94rem; }

/* ---------- Shop toolbar ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: .9rem; cursor: pointer; transition: all .2s;
}
.chip small { font-size: .75rem; opacity: .7; margin-left: 2px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input, .tools select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: .92rem; color: var(--ink); outline: none; transition: border-color .2s;
}
.search input { padding-left: 40px; width: 220px; }
.search input:focus, .tools select:focus { border-color: var(--rust); }
.tools select { cursor: pointer; }
.result-count { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card-media { position: relative; aspect-ratio: 4 / 5; background: #f1ece4; overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s, transform .6s; }
.card-media img.alt { opacity: 0; }
.card:hover .card-media img { transform: scale(1.04); }
.card:hover .card-media img.alt { opacity: 1; }
.badge {
  position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(255,255,255,.95); color: var(--ink);
  font-size: .68rem; font-weight: 700; padding: 5px 10px; border-radius: 6px; letter-spacing: .06em; text-transform: uppercase;
}
.badge.sale { left: auto; right: 14px; background: var(--rust); color: #fff; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-body h3 { font-size: 1.2rem; margin: 6px 0 8px; transition: color .2s; }
.card:hover h3 { color: var(--rust); }
.card-tag { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: 16px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.price { font-family: "Fraunces", serif; font-size: 1.35rem; font-weight: 700; }
.price s { font-family: "Inter", sans-serif; font-size: .85rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.card-link { font-size: .9rem; font-weight: 600; color: var(--rust); }
.empty { text-align: center; padding: 50px 0; color: var(--muted); }
.empty p { margin-bottom: 16px; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { padding: 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-num { font-family: "Fraunces", serif; font-size: 2.2rem; font-weight: 700; color: var(--rust); display: block; margin-bottom: 12px; }
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .94rem; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.15fr; gap: 70px; align-items: center; }
.about-art { position: relative; height: 440px; }
.about-img { position: absolute; width: 62%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; border: 6px solid #fff; box-shadow: var(--shadow); }
.about-img.a1 { left: 0; top: 0; transform: rotate(-4deg); }
.about-img.a2 { right: 0; bottom: 0; transform: rotate(4deg); }
.about-text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 20px; }
.about-text p:not(.eyebrow) { color: var(--muted); margin-bottom: 16px; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 4px; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--rust); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 4px 22px; max-width: 680px; }

/* ---------- CTA ---------- */
.cta {
  background-color: var(--ink); color: #fff; border-radius: 22px; padding: 56px 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='18'%3E%3Cpath d='M2 2 L11 15 L20 2' fill='none' stroke='%23fff' stroke-opacity='.05' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.cta h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; }
.cta p { color: rgba(255,255,255,.75); max-width: 540px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 300px; font-size: .94rem; }
.footer h4 { font-family: "Inter", sans-serif; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid a:not(.logo) { display: block; color: var(--muted); font-size: .94rem; margin-bottom: 8px; transition: color .2s; }
.footer-grid a:not(.logo):hover { color: var(--rust); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 22px 0 30px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.to-top:hover { color: var(--rust); }

/* =========================================================
   PATTERN PAGE
   ========================================================= */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); padding: 26px 0 8px; }
.crumbs a:hover { color: var(--rust); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 18px 0 72px; align-items: start; }
.gallery { position: sticky; top: 96px; }
.gallery-main { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #f1ece4; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb {
  position: relative; width: 92px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; padding: 0;
  border: 2px solid transparent; background: #f1ece4; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(43,38,34,.65); color: #fff; font-size: .7rem; padding: 2px 0; }
.thumb:hover, .thumb.active { opacity: 1; border-color: var(--rust); }
.photo-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }

.summary h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 12px; }
.tagline { font-size: 1.1rem; color: var(--muted); margin-bottom: 26px; }
.price-block { padding: 20px 0; border-top: 1px solid var(--line); margin-bottom: 18px; }
.price-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-big { font-family: "Fraunces", serif; font-size: 2.4rem; font-weight: 700; line-height: 1; }
.price-line s { color: var(--muted); font-size: 1.1rem; }
.save { background: #f6e6df; color: var(--rust-dark); font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.currency-note { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.price-sub { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.btn-buy { padding: 17px 26px; font-size: 1.05rem; }
.order-note { font-size: .85rem; color: var(--muted); margin-top: 12px; padding: 12px 14px; background: var(--alt); border-radius: 10px; }

.key-facts { list-style: none; margin: 26px 0 22px; border-top: 1px solid var(--line); }
.key-facts li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.key-facts b { font-weight: 600; }
.key-facts span { color: var(--muted); }
.assurances { list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.assurances li, .checks li { position: relative; padding-left: 26px; }
.assurances li::before, .checks li::before {
  content: ""; position: absolute; left: 3px; top: 7px; width: 11px; height: 6px;
  border-left: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg);
}

.details { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; padding-bottom: 90px; align-items: start; }
.details-main, .details-side { display: grid; gap: 24px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.block h2 { font-size: 1.5rem; margin-bottom: 16px; }
.block h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.block p { color: var(--muted); margin-bottom: 12px; }
.block p:last-child { margin-bottom: 0; }
.checks { list-style: none; display: grid; gap: 10px; }
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
.size-table { width: 100%; border-collapse: collapse; font-size: .92rem; text-align: center; }
.size-table th, .size-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.size-table thead th { background: var(--alt); font-weight: 600; }
.size-table tbody th { text-align: left; font-weight: 600; }
.spec-card dl { display: grid; gap: 4px; }
.spec-card dt { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.spec-card dt:first-child { margin-top: 0; }
.spec-card dd { font-size: .95rem; }
.spec-card p { font-size: .92rem; }
.related .grid { grid-template-columns: repeat(4, 1fr); }
.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 2.4rem; margin-bottom: 12px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }

.buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(255,253,249,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(43,38,34,.08); padding: 12px 0; }
.buy-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.buy-bar b { display: block; font-family: "Fraunces", serif; font-size: 1.05rem; }
.buy-bar span { font-size: .85rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .related .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 70px; }
  .hero-grid, .about, .product, .details { grid-template-columns: 1fr; }
  .hero-art { min-height: 400px; }
  .about { gap: 40px; }
  .about-art { height: 380px; }
  .gallery { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-cta { display: none; }
  .menu-btn { display: flex; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 4%; border-top: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .cta { padding: 40px 30px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tools { display: grid; grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .search input { width: 100%; }
  .block { padding: 24px; }
}
@media (max-width: 560px) {
  .features, .steps, .footer-grid { grid-template-columns: 1fr; }
  .grid, .related .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card-body { padding: 14px; }
  .card-body h3 { font-size: 1rem; }
  .card-tag, .meta { display: none; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .price { font-size: 1.15rem; }
  .card-link { font-size: .82rem; }
  .hero-art { min-height: 330px; }
  .buy-bar span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.buy-bar .btn-buy { padding: 10px 18px; font-size: .9rem; }

/* ---------- Fixes from customer review ---------- */
.fit-tip { background: #f3f5f0; border-left: 3px solid var(--sage); padding: 12px 14px; border-radius: 8px; font-size: .9rem; color: var(--ink) !important; }
.level-info { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
body.pattern-page { padding-bottom: 76px; }
.footer-grid a:not(.logo) { padding: 3px 0; }
@media (max-width: 860px) {
  .product, .details, .hero-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .tools > * { min-width: 0; }
  .tools select { width: 100%; }
}
@media (max-width: 560px) {
  .hero-art { display: none; }
  .hero { padding: 32px 0 48px; }
}
@media (hover: none) {
  .card-media img.alt { display: none; }
}

.details-main, .details-side { grid-template-columns: minmax(0, 1fr); }
.block { min-width: 0; }

/* =========================================================
   CART + SHOPIFY CHECKOUT
   ========================================================= */
.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: border-color .2s;
}
.cart-btn:hover { border-color: var(--ink); }
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--rust); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}
.cart-count[hidden] { display: none; }
.nav .menu-btn { margin-left: 0; }
@media (max-width: 860px) { .cart-btn { margin-left: auto; } }

.cart-drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.cart-overlay { position: absolute; inset: 0; background: rgba(43,38,34,.5); opacity: 0; transition: opacity .25s; }
.cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease;
  box-shadow: -10px 0 40px rgba(43,38,34,.15);
}
.cart-drawer.open { pointer-events: auto; }
.cart-drawer.open .cart-overlay { opacity: 1; }
.cart-drawer.open .cart-panel { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.4rem; }
.cart-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cart-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart-empty { text-align: center; padding: 60px 0; color: var(--muted); }
.cart-empty p { margin-bottom: 16px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-title { display: block; font-family: "Fraunces", serif; font-weight: 600; font-size: 1rem; line-height: 1.25; }
.cart-title:hover { color: var(--rust); }
.cart-meta { display: block; font-size: .8rem; color: var(--muted); margin: 4px 0 6px; }
.cart-remove { background: none; border: none; padding: 0; color: var(--muted); font-size: .82rem; text-decoration: underline; cursor: pointer; }
.cart-remove:hover { color: var(--rust); }
.cart-price { font-weight: 600; }
.cart-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.cart-foot:empty { display: none; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-total b { font-family: "Fraunces", serif; font-size: 1.5rem; }
.cart-note { font-size: .8rem; color: var(--muted); margin-bottom: 16px; }
.cart-secure, .order-note { display: flex; align-items: center; gap: 8px; }
.cart-secure { justify-content: center; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.cart-secure svg, .order-note svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--sage); stroke-width: 2; stroke-linejoin: round; }

.buy-actions { display: grid; gap: 10px; }
.btn[disabled], .btn.is-busy { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-busy { cursor: progress; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 200;
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: .92rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* =========================================================
   PATTERN HELPER CHAT
   ========================================================= */
.cb-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; height: 60px; min-width: 60px; padding: 0;
  display: flex; align-items: center; border: none; border-radius: 999px; cursor: pointer;
  background: var(--rust) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12'%3E%3Cpath d='M1 1 L7 10 L13 1' fill='none' stroke='%23fff' stroke-opacity='.12' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  color: #fff; box-shadow: 0 10px 26px rgba(143, 64, 41, .35); transition: transform .25s, background-color .2s;
}
.cb-launch svg { width: 60px; height: 60px; flex: none; padding: 9px; }
.cb-launch .cb-label { max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: .9rem; transition: max-width .35s ease, padding .35s ease; }
.cb-launch:hover { transform: translateY(-2px); background-color: var(--rust-dark); }
.cb-launch:hover .cb-label, .cb-launch:focus-visible .cb-label { max-width: 200px; padding-right: 20px; }
.cb-launch.is-open .cb-label { max-width: 0; padding: 0; }
.cb-launch:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
body.pattern-page .cb-launch { bottom: 92px; }

.cb-panel {
  position: fixed; right: 22px; bottom: 94px; z-index: 95; width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(43, 38, 34, .22); animation: cbIn .25s ease;
}
.cb-panel[hidden] { display: none; }
body.pattern-page .cb-panel { bottom: 164px; height: min(520px, calc(100vh - 200px)); }
@keyframes cbIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.cb-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; }
.cb-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--rust); display: grid; place-items: center; font-size: 1.15rem; }
.cb-head b { display: block; font-family: "Fraunces", serif; font-size: 1.05rem; }
.cb-head span { font-size: .78rem; opacity: .7; }
.cb-close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; cursor: pointer; }
.cb-close:hover { background: rgba(255,255,255,.22); }
.cb-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg) var(--knit); }
.cb-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.5; }
.cb-bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.cb-me { background: var(--rust); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.cb-msg a { color: var(--rust); font-weight: 600; text-decoration: underline; }
.cb-msg small { color: var(--muted); }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cb-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: .8rem; color: var(--ink); cursor: pointer; text-align: left; }
.cb-chip:hover { border-color: var(--rust); color: var(--rust); }
.cb-typing { display: flex; gap: 4px; padding: 14px; }
.cb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: cbDot 1s infinite; }
.cb-typing span:nth-child(2) { animation-delay: .15s; } .cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cbDot { 50% { opacity: .25; transform: translateY(-3px); } }
.cb-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.cb-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: .92rem; outline: none; }
.cb-form input:focus { border-color: var(--rust); }
.cb-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: none; background: var(--rust); cursor: pointer; display: grid; place-items: center; }
.cb-form button svg { width: 18px; height: 18px; fill: #fff; }
@media (max-width: 560px) {
  .cb-launch { right: 14px; bottom: 14px; height: 54px; min-width: 54px; }
  .cb-launch svg { width: 54px; height: 54px; }
  body.pattern-page .cb-launch { bottom: 84px; }
  .cb-panel, body.pattern-page .cb-panel { right: 8px; left: 8px; width: auto; bottom: 8px; height: calc(100vh - 16px); z-index: 140; }
}

.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); border-color: #fff; box-shadow: none; }
