@font-face { font-family: "DM Serif Display"; src: url("/fonts/DMSerifDisplay-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --linen: #f3ecdf;
  --linen-2: #e9dfcc;
  --paper: #fbf8f2;
  --navy: #1e2a4a;
  --navy-2: #2d3d66;
  --gold: #c49a2c;
  --gold-soft: #e8d39b;
  --ink: #23262e;
  --muted: #6a6457;
  --line: #ddd2bd;
  --danger: #a3361f;
  --ok: #2f6b3a;
  --radius: 14px;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--linen); color: var(--ink); font: 16px/1.6 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header / footer ---- */
.announce { background: var(--navy); color: var(--linen); text-align: center; font-size: .85rem; padding: 8px 16px; letter-spacing: .02em; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 44px; height: 44px; border-radius: 8px; }
.brand span { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--navy); font-size: .78rem; display: inline-grid; place-items: center; }
.cart-count[data-n="0"] { background: var(--linen-2); color: var(--muted); }
.site-foot { margin-top: 72px; background: var(--navy); color: var(--linen); padding: 40px 0; font-size: .9rem; }
.site-foot a { color: var(--gold-soft); }
.site-foot .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-foot h3 { color: var(--linen); font-size: 1.1rem; }

/* ---- Buttons ---- */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 14px 26px; font: 700 1rem var(--sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--linen); }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- Home ---- */
.hero { padding: 28px 0 8px; }
.hero-banner { border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(30, 42, 74, .12); }
.hero-copy { text-align: center; padding: 32px 0 8px; max-width: 680px; margin: 0 auto; }
.hero-copy p { font-size: 1.1rem; color: var(--muted); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 48px 0 20px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; border: 1px solid var(--line); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 12px 28px rgba(30, 42, 74, .14); transform: translateY(-2px); }
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; background: #fff; }
.card-body { padding: 16px 18px 20px; }
.card-body h3 { font-size: 1.25rem; margin-bottom: 4px; }
.price { font-weight: 700; color: var(--navy); }
.swatch-row { display: flex; gap: 6px; margin-top: 10px; }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.values { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 48px; }
.value { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.value h3 { font-size: 1.15rem; }
.value p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---- Product ---- */
.crumbs { font-size: .85rem; margin: 20px 0; color: var(--muted); }
.crumbs a { color: var(--muted); }
.pdp { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.pdp > *, .cart-layout > * { min-width: 0; }
.gallery-main { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 76px; height: 76px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #fff; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--navy); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buybox h1 { margin-bottom: 6px; }
.buybox .tagline { color: var(--muted); margin: 0 0 16px; }
.buybox .price { font-size: 1.6rem; }
.ship-note { font-size: .9rem; color: var(--muted); margin: 2px 0 20px; }
.opt { margin: 20px 0; border: 0; padding: 0; }
.opt legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.opt legend span { font-weight: 400; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); cursor: pointer; box-shadow: inset 0 0 0 3px var(--paper); }
.swatch[aria-checked="true"] { outline: 2.5px solid var(--navy); outline-offset: 2px; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.size { padding: 11px 0; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); font: 600 .95rem var(--sans); cursor: pointer; color: var(--ink); }
.size[aria-checked="true"] { border-color: var(--navy); background: var(--navy); color: var(--linen); }
.size:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.qty button { width: 40px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--navy); }
.qty input { width: 40px; text-align: center; border: 0; background: none; font: 600 1rem var(--sans); color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.buy-row .btn { flex: 1; }
.toast { margin-top: 12px; min-height: 1.5em; font-weight: 600; color: var(--ok); }
.toast a { margin-left: 6px; }
.details { margin-top: 28px; border-top: 1px solid var(--line); }
.details details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.details summary { cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; }
.details summary::after { content: "+"; font-size: 1.2rem; }
.details details[open] summary::after { content: "–"; }
.details ul { padding-left: 20px; margin: 10px 0 0; }

/* ---- Cart ---- */
.cart-layout { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; margin-top: 24px; }
.line { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.line h3 { font-size: 1.1rem; margin: 0; }
.line .meta { font-size: .9rem; color: var(--muted); }
.line .controls { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; }
.summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 88px; }
.summary .row { display: flex; justify-content: space-between; margin: 6px 0; }
.summary .total { font-weight: 800; font-size: 1.2rem; color: var(--navy); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: .95rem; margin: 12px 0; }
.alert-error { background: #f8e3dc; color: var(--danger); }
.alert-info { background: #eef0f6; color: var(--navy); }
#paypal-buttons { margin-top: 16px; min-height: 48px; }
.empty { text-align: center; padding: 64px 16px; }
.fineprint { font-size: .82rem; color: var(--muted); margin-top: 12px; }

/* ---- Thank you ---- */
.thanks { max-width: 640px; margin: 48px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; }
.thanks .check { width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 12px; }
.thanks table { width: 100%; text-align: left; border-collapse: collapse; margin: 20px 0; font-size: .95rem; }
.thanks td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.thanks td:last-child { text-align: right; }

@media (max-width: 820px) {
  .pdp, .cart-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .announce { font-size: .78rem; }
  .line { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; }
  .line img { width: 72px; height: 72px; }
  .summary { position: static; }
  .nav .hide-sm { display: none; }
  .brand span { font-size: 1.15rem; }
}
