/* FrostKnit storefront - mobile-first, no framework, no external fonts (fast) */
:root {
  --bg: #fbf7f1; --surface: #ffffff; --ink: #1d2b25; --muted: #5d6b64; --line: #e8e0d4;
  --pine: #1f3b30; --pine-2: #2c5243; --berry: #b8352a; --berry-2: #9b2b22; --gold: #c99a3b; --cream: #f4ede2;
  --radius: 16px; --shadow: 0 10px 30px rgba(29, 43, 37, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine-2); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Banner + header */
.banner { background: var(--berry); color: #fff; text-align: center; font-size: .9rem; padding: .55rem 1rem; font-weight: 600; }
.banner.alt { background: var(--pine); }
.header { position: sticky; top: 0; z-index: 20; background: rgba(251, 247, 241, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo b { font-weight: 700; }
.logo { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--pine); text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.logo span { color: var(--berry); }
.nav { display: none; gap: 1.4rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--berry); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--ink); font-weight: 600; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.cart-count { background: var(--berry); color: #fff; border-radius: 999px; font-size: .75rem; min-width: 1.35rem; height: 1.35rem; display: inline-grid; place-items: center; padding: 0 .3rem; }
.menu-btn { background: none; border: 0; font-size: 1.5rem; padding: .3rem; cursor: pointer; color: var(--ink); }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: .5rem 1.25rem 1rem; background: var(--bg); }
.mobile-nav.open { display: grid; }
.mobile-nav a { padding: .6rem 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .nav { display: flex; } .menu-btn { display: none; } .mobile-nav.open { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1.5rem; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; min-height: 48px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--berry); color: #fff; }
.btn-primary:hover { background: var(--berry-2); }
.btn-dark { background: var(--pine); color: #fff; }
.btn-dark:hover { background: var(--pine-2); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Hero */
.hero { padding: 2.5rem 0 3rem; background: radial-gradient(1200px 500px at 80% -10%, #f1e4cf 0, transparent 60%); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--berry); margin-bottom: .8rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.price-tag { font-size: 1.6rem; font-weight: 800; color: var(--pine); }
.hero-img { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--cream); aspect-ratio: 1; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .hero { padding: 4.5rem 0 5rem; } .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; } }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.trust li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem; font-size: .92rem; display: flex; gap: .6rem; align-items: flex-start; }
.trust b { display: block; }
.trust .ic { font-size: 1.3rem; line-height: 1; }
@media (min-width: 900px) { .trust { grid-template-columns: repeat(4, 1fr); } }

section.block { padding: 3.5rem 0; }
section.block.alt { background: var(--cream); }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: 56ch; margin-inline: auto; }

/* Product card / showcase */
.showcase { display: grid; gap: 1.5rem; align-items: center; background: #fff; border-radius: 28px; padding: 1.25rem; box-shadow: var(--shadow); }
.showcase img { border-radius: 20px; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
@media (min-width: 860px) { .showcase { grid-template-columns: 1fr 1fr; padding: 2rem; gap: 3rem; } }
.swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0 1.25rem; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"], .swatch:hover { box-shadow: 0 0 0 2px var(--pine); }
.features { display: grid; gap: 1rem; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: #fff; border-radius: var(--radius); padding: 1.4rem; border: 1px solid var(--line); }
.feature .ic { font-size: 1.6rem; }

/* Timeline */
.timeline { display: grid; gap: 1rem; counter-reset: step; }
.timeline .step { background: #fff; border-radius: var(--radius); padding: 1.2rem 1.2rem 1.2rem 3.6rem; position: relative; border: 1px solid var(--line); }
.timeline .step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.15rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
@media (min-width: 760px) { .timeline { grid-template-columns: repeat(4, 1fr); } }

/* Product page */
.pdp { display: grid; gap: 2rem; padding: 1.5rem 0 3rem; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; padding-top: 3rem; } }
.gallery-main { border-radius: 24px; overflow: hidden; background: var(--cream); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: .6rem; margin-top: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.thumbs button { flex: 0 0 72px; height: 72px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--cream); }
.thumbs button[aria-current="true"] { border-color: var(--pine); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info .price { font-size: 1.9rem; font-weight: 800; color: var(--pine); margin: .25rem 0 .75rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty input { width: 44px; text-align: center; border: 0; font: inherit; font-weight: 700; background: none; }
.buy-row { display: grid; gap: .75rem; margin: 1.25rem 0; }
.delivery-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .95rem; }
.delivery-box strong { color: var(--pine); }
details.acc { border-bottom: 1px solid var(--line); padding: .9rem 0; }
details.acc summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
details.acc summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.acc[open] summary::after { content: "–"; }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); display: flex; gap: .75rem; align-items: center; z-index: 30; transform: translateY(110%); transition: transform .2s; }
.sticky-buy.show { transform: none; }
.sticky-buy .btn { flex: 1; }
@media (min-width: 900px) { .sticky-buy { display: none; } }

/* Cart */
.cart-grid { display: grid; gap: 2rem; padding: 2rem 0 4rem; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: 1.6fr 1fr; } }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin-bottom: .8rem; }
.cart-line img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; background: var(--cream); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; position: sticky; top: 84px; align-self: start; }
.summary .row { display: flex; justify-content: space-between; margin: .4rem 0; }
.summary .total { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.notice { padding: .9rem 1rem; border-radius: 12px; font-size: .95rem; margin: 1rem 0; }
.notice.error { background: #fdecea; color: #8a1f17; border: 1px solid #f5c6c1; }
.notice.info { background: #eef5f1; color: var(--pine); border: 1px solid #cfe3d8; }
.notice.warn { background: #fff6e5; color: #7a5300; border: 1px solid #f3dca8; }
.empty { text-align: center; padding: 3rem 1rem; }

/* Forms */
.form { display: grid; gap: 1rem; }
.form label { font-weight: 600; font-size: .92rem; display: grid; gap: .35rem; }
.form input, .form textarea, .form select { font: inherit; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--pine-2); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; }

/* Content pages */
.page { padding: 2.5rem 0 4rem; }
.page h2 { margin-top: 2rem; font-size: 1.4rem; }
.page table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.page th, .page td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: .7rem; }
.faq summary { font-weight: 700; cursor: pointer; }

/* Footer */
.footer { background: var(--pine); color: #dfe8e3; padding: 3rem 0 2rem; margin-top: 2rem; }
.footer a { color: #fff; text-decoration: none; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
.footer h4 { margin: 0 0 .6rem; font-family: var(--serif); color: #fff; font-size: 1.05rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .93rem; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.2rem; font-size: .82rem; color: #b9c8c0; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%) translateY(150%); background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; z-index: 50; transition: transform .25s; display: flex; gap: .8rem; align-items: center; white-space: nowrap; }
.toast.show { transform: translateX(-50%); }
.toast a { color: #ffd9a8; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--pine); border-radius: 50%; animation: spin 1s linear infinite; margin: 1rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.placeholder-note { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.cart-grid > *, .pdp > *, .hero-grid > *, .showcase > * { min-width: 0; }
.cart-line > div { min-width: 0; }
@media (max-width: 420px) { .cart-line { grid-template-columns: 64px 1fr auto; gap: .7rem; } .qty button { width: 38px; height: 38px; } .qty input { width: 32px; } }
html, body { overflow-x: clip; }
