*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f1ede7;
  --border: #e2ddd4;
  --text: #191713;
  --text-2: #56504a;
  --text-3: #8b847b;
  --accent: #2f4438;
  --accent-2: #b0442b;
  --accent-soft: #e8efe9;
  --good: #2f6f4f;
  --good-soft: #e8f3ec;
  --bad: #a3342c;
  --bad-soft: #fbeae8;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --surface: #1b1917;
    --surface-2: #232120;
    --border: #34302b;
    --text: #f3f0ea;
    --text-2: #b4aca2;
    --text-3: #857d73;
    --accent: #7fae92;
    --accent-2: #e8734f;
    --accent-soft: #1c2a22;
    --good: #6ac08e;
    --good-soft: #172b21;
    --bad: #e0776b;
    --bad-soft: #2e1d1b;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 750; letter-spacing: -0.02em; font-size: 17px; }
.logo .mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
  display: grid; place-items: center; color: var(--bg); font-size: 13px; font-weight: 800;
}
.header-nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.header-nav a { color: var(--text-2); text-decoration: none; }
.header-nav a:hover { color: var(--text); }
.cart-link {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 13px; border-radius: 20px; text-decoration: none; font-size: 13.5px; font-weight: 550;
}
.cart-count {
  background: var(--accent-2); color: #fff; min-width: 19px; height: 19px;
  border-radius: 10px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 5px;
}
.cart-count[data-empty="true"] { display: none; }

.banner {
  background: var(--accent); color: var(--bg);
  text-align: center; font-size: 12.5px; padding: 7px 16px; font-weight: 550;
}
@media (prefers-color-scheme: dark) { .banner { color: #131210; } }

/* ---------- hero ---------- */
.hero { padding: 60px 0 44px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 42px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 14px; max-width: 15ch; }
.hero p { font-size: 17px; color: var(--text-2); margin: 0; max-width: 54ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 13px; font-size: 12.5px; color: var(--text-2);
}
.badge b { color: var(--text); font-weight: 600; }

/* ---------- grid ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; gap: 16px; }
.section-head h2 { font-size: 21px; letter-spacing: -0.02em; margin: 0; }
.section-head p { margin: 0; font-size: 13.5px; color: var(--text-3); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; padding-bottom: 60px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { background: var(--surface-2); display: grid; place-items: center; padding: 14px; border-bottom: 1px solid var(--border); }
.card-img svg { display: block; height: 220px; width: auto; }
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 3px; font-size: 15.5px; letter-spacing: -0.01em; }
.card-body .tagline { margin: 0 0 12px; font-size: 13px; color: var(--text-3); flex: 1; line-height: 1.45; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 650; font-size: 15px; }
.swatches { display: flex; gap: 5px; }
.swatch { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 40px 0 70px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 30px; } }
.product-media { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; place-items: center; }
.product-media svg { display: block; width: 100%; height: auto; max-width: 380px; }
.product h1 { font-size: 30px; letter-spacing: -0.025em; margin: 0 0 6px; line-height: 1.15; }
.product .tagline { font-size: 15.5px; color: var(--text-2); margin: 0 0 18px; }
.product .price-lg { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.price-note { font-size: 12.5px; color: var(--text-3); margin: 0 0 22px; }

.opt-group { margin-bottom: 20px; }
.opt-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 9px; }
.opt-label .chosen { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-2); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 8px 15px; font-size: 13.5px; font-weight: 550;
  cursor: pointer; font-family: inherit; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--text-3); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.opt-color { display: flex; align-items: center; gap: 8px; }
.opt-color .dot { width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0,0,0,.28); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--bg); border: none; border-radius: 9px;
  padding: 13px 22px; font-size: 15px; font-weight: 650; cursor: pointer;
  font-family: inherit; text-decoration: none; width: 100%; transition: opacity .12s;
}
@media (prefers-color-scheme: dark) { .btn { color: #131210; } }
.btn:hover { opacity: .88; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--text); border: 1.5px solid var(--border); }

.guarantee {
  margin-top: 20px; background: var(--good-soft); border-left: 3px solid var(--good);
  border-radius: 0 8px 8px 0; padding: 13px 16px;
}
.guarantee p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.guarantee b { color: var(--good); }

.details { margin-top: 26px; border-top: 1px solid var(--border); }
.details details { border-bottom: 1px solid var(--border); }
.details summary { cursor: pointer; padding: 13px 0; font-size: 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; color: var(--text-3); font-weight: 400; }
.details details[open] summary::after { content: "–"; }
.details .content { padding: 0 0 15px; font-size: 13.5px; color: var(--text-2); }
.details .content p { margin: 0 0 9px; }
.details .content p:last-child { margin: 0; }
.details table { width: 100%; border-collapse: collapse; font-size: 13px; }
.details th, .details td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.details th { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.details td { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }

/* ---------- cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding: 36px 0 80px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.page-title { font-size: 27px; letter-spacing: -0.025em; margin: 0 0 4px; }
.page-sub { color: var(--text-3); font-size: 14px; margin: 0 0 22px; }

.line {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 15px;
  padding: 15px 0; border-bottom: 1px solid var(--border); align-items: center;
}
.line-img { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; display: grid; place-items: center; padding: 5px; }
.line-img svg { height: 62px; width: auto; display: block; }
.line-info h4 { margin: 0 0 2px; font-size: 14.5px; }
.line-info .meta { font-size: 12.5px; color: var(--text-3); margin: 0 0 7px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.qty button { background: var(--surface); border: none; color: var(--text); width: 27px; height: 27px; cursor: pointer; font-size: 15px; font-family: inherit; }
.qty button:hover { background: var(--surface-2); }
.qty span { min-width: 30px; text-align: center; font-size: 13px; font-family: var(--mono); }
.line-right { text-align: right; }
.line-right .lt { font-weight: 650; font-size: 14.5px; }
.remove { background: none; border: none; color: var(--text-3); font-size: 12px; cursor: pointer; padding: 4px 0 0; font-family: inherit; text-decoration: underline; }
.remove:hover { color: var(--bad); }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 82px; }
.summary h3 { margin: 0 0 14px; font-size: 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--text-2); }
.sum-row .n { font-family: var(--mono); color: var(--text); }
.sum-row.total { border-top: 1.5px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 16.5px; color: var(--text); }
.ship-hint { font-size: 12.5px; color: var(--accent-2); background: var(--surface-2); border-radius: 7px; padding: 8px 11px; margin: 10px 0; }

.empty { text-align: center; padding: 70px 20px; }
.empty p { color: var(--text-3); margin: 0 0 20px; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 550; }
.field input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 14px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.error { background: var(--bad-soft); color: var(--bad); border-radius: 7px; padding: 10px 13px; font-size: 13px; margin-bottom: 13px; }
.error[hidden] { display: none; }

.confirm { text-align: center; padding: 60px 20px; max-width: 520px; margin: 0 auto; }
.confirm .tick { width: 54px; height: 54px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-size: 26px; margin: 0 auto 18px; }
.confirm h1 { font-size: 25px; margin: 0 0 8px; letter-spacing: -0.02em; }
.confirm p { color: var(--text-2); margin: 0 0 16px; }
.confirm .onum { font-family: var(--mono); font-size: 17px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 16px; display: inline-block; margin-bottom: 18px; }

.proto-note {
  background: var(--surface-2); border: 1px dashed var(--border); border-radius: 9px;
  padding: 12px 15px; font-size: 12.5px; color: var(--text-3); margin: 18px 0;
}
.proto-note b { color: var(--text-2); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 34px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer-inner a { color: var(--text-2); }
.footer-col h5 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 5px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 31px; }
  .header-nav .nav-hide { display: none; }
}
