/* Field & Fiber — sustainable fashion (fictional demo shop)
   Earthy, natural, unbleached tones. Olive + warm sand + clay accent. */

:root {
  --paper: #f2ede0;
  --paper-2: #e9e0cc;
  --card: #faf7ef;
  --ink: #2f3a28;
  --muted: #6f7a63;
  --olive: #4a5a3d;
  --clay: #b5773f;
  --clay-ink: #99602e;
  --line: #ded2b0;
  --danger: #b5502f;
  --r: 6px;
  --wrap: 1200px;
  --serif: "Lora", Georgia, serif;
  --sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 26px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay-ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 600; font-size: 14.5px; padding: 14px 26px; border-radius: var(--r); cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.btn-accent { background: var(--olive); color: var(--paper); }
.btn-accent:hover { transform: translateY(-2px); background: #3b4830; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(242,237,224,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { font-family: var(--serif); font-size: 22px; color: var(--olive); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.cart-btn { position: relative; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; display: flex; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--clay); color: #fff; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 1.6px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.announce { background: var(--olive); color: var(--paper); text-align: center; font-size: 13px; padding: 9px; }

.hero { position: relative; height: 78vh; min-height: 520px; display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(47,58,40,.05) 0%, rgba(47,58,40,.7) 100%); }
.hero-inner { position: relative; z-index: 1; padding-bottom: 56px; color: #fff; }
.hero h1 { font-size: clamp(38px, 5.6vw, 70px); color: #fff; max-width: 16ch; }
.hero h1 em { font-style: italic; color: #e7c98c; }
.hero-lead { font-size: 17px; color: #e9e4d4; max-width: 44ch; margin: 20px 0 26px; }

section { padding: 76px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 44px); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { font: inherit; font-size: 13px; font-weight: 600; padding: 9px 18px; border-radius: 100px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; transition: all .15s; }
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.active { background: var(--olive); color: var(--paper); border-color: var(--olive); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card.hide { display: none; }
.card { cursor: pointer; }
.card-media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--paper-2); border-radius: var(--r); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-quickadd { position: absolute; left: 10px; right: 10px; bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.card:hover .card-quickadd { opacity: 1; transform: none; }
.card-body { padding: 14px 2px 0; display: flex; justify-content: space-between; align-items: baseline; }
.card-body h3 { font-size: 16px; font-weight: 500; }
.card-body .price { font-family: var(--serif); font-weight: 500; color: var(--clay-ink); }

.lookbook { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lookbook img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r); }

.value-strip { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; padding: 22px 0; }
.value-row span { font-size: 13.5px; color: var(--muted); }
.value-row b { color: var(--clay-ink); }

.site-footer { background: #e3dabf; padding: 54px 0 28px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.foot-brand { max-width: 30ch; } .foot-brand .brand { display: block; margin-bottom: 12px; } .foot-brand p { color: var(--muted); font-size: 13.5px; margin: 0; }
.foot-cols { display: flex; gap: 50px; flex-wrap: wrap; }
.foot-col h5 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--clay-ink); margin: 0 0 12px; font-weight: 700; }
.foot-col a { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 9px; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { padding-top: 20px; font-size: 12.5px; color: #8a8064; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Overlay shell ---------- */
.overlay-scrim { position: fixed; inset: 0; background: rgba(47,58,40,.5); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.overlay-scrim.open { opacity: 1; pointer-events: auto; }

.quickview { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(880px, calc(100% - 40px)); max-height: 86vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; z-index: 101; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.quickview.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.qv-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px 0 0 10px; }
.qv-body { padding: 34px; position: relative; }
.qv-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.qv-close:hover { color: var(--ink); }
.qv-body h3 { font-size: 26px; margin: 6px 0 6px; }
.qv-price { font-family: var(--serif); font-size: 22px; color: var(--clay-ink); margin-bottom: 18px; }
.qv-variants { margin-bottom: 20px; }
.qv-variants .label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: block; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-opt { font: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: all .15s; }
.variant-opt:hover { border-color: var(--ink); }
.variant-opt.active { background: var(--olive); color: var(--paper); border-color: var(--olive); }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); }
.qty-stepper button { width: 38px; height: 38px; background: none; border: 0; color: var(--ink); font-size: 16px; cursor: pointer; }
.qty-stepper span { min-width: 32px; text-align: center; font-weight: 700; }
.qv-desc { color: var(--muted); font-size: 14.5px; margin: 0 0 4px; }

.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--card); border-left: 1px solid var(--line); z-index: 101; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 18px; }
.cart-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.cart-close:hover { color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 10px 24px; }
.cart-empty { color: var(--muted); text-align: center; padding: 60px 20px; font-size: 14px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 78px; object-fit: cover; border-radius: 6px; }
.cart-line .cl-name { font-size: 14.5px; font-weight: 600; }
.cart-line .cl-variant { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cart-line .cl-price { font-family: var(--serif); color: var(--clay-ink); font-size: 13.5px; margin-top: 8px; }
.cart-line .cl-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line .qty-stepper button { width: 26px; height: 26px; font-size: 13px; }
.cart-line .remove-btn { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.cart-line .remove-btn:hover { color: var(--danger); }
.cart-foot { padding: 22px 24px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.cart-subtotal b { color: var(--clay-ink); font-family: var(--serif); }

.checkout { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(720px, calc(100% - 32px)); max-height: 88vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; z-index: 102; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.checkout.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.checkout-inner { padding: 36px; position: relative; }
.checkout-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; }
.checkout-close:hover { color: var(--ink); }
.steps-track { display: flex; gap: 8px; margin-bottom: 30px; }
.steps-track span { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps-track span::after { content: ""; display: block; height: 100%; width: 0; background: var(--olive); transition: width .3s ease; }
.steps-track span.done::after, .steps-track span.active::after { width: 100%; }
.co-step { display: none; }
.co-step.active { display: block; }
.co-step h3 { font-size: 22px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; color: var(--muted); }
.field input, .field select { width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: var(--olive); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.co-actions { display: flex; gap: 12px; margin-top: 26px; }
.demo-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }
.review-list { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; margin-bottom: 18px; }
.review-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-line:last-child { border-bottom: 0; }
.review-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; padding-top: 14px; }
.review-total b { color: var(--clay-ink); font-family: var(--serif); }
.confirm { text-align: center; padding: 20px 0; }
.confirm .check { width: 64px; height: 64px; border-radius: 50%; background: var(--olive); color: var(--paper); display: grid; place-items: center; margin: 0 auto 20px; font-size: 30px; font-weight: 800; }
.confirm h3 { font-size: 26px; margin-bottom: 10px; }
.confirm .order-no { font-family: var(--serif); color: var(--clay-ink); font-size: 15px; margin-bottom: 18px; }
.confirm p { color: var(--muted); max-width: 40ch; margin: 0 auto 24px; }

html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .lookbook { grid-template-columns: 1fr; }
  .qv-grid { grid-template-columns: 1fr; }
  .qv-media img { border-radius: 10px 10px 0 0; max-height: 320px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 16px 26px 22px; background: var(--paper); border-bottom: 1px solid var(--line); z-index: 59; }
  .nav-links.open a { padding: 10px 0; font-size: 14px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .checkout-inner, .qv-body { padding: 24px; }
}
