:root {
  --navy: #16182e;
  --navy-soft: #20233f;
  --gold: #c8a24d;
  --gold-deep: #a98536;
  --ivory: #f8f5ef;
  --white: #ffffff;
  --ink: #16182e;
  --muted: #6c6e80;
  --line: #e7e2d8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--navy); padding: 0.7rem 1rem; z-index: 20; }
.skip:focus { left: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem var(--gutter);
  background: var(--navy);
  color: var(--ivory);
}
.brand img { height: 64px; width: auto; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.site-header nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-header nav a:hover { color: var(--gold); border-color: var(--gold); }

/* Buttons and small type */
.btn {
  display: inline-block;
  padding: 0.95rem 2.2rem;
  background: var(--gold);
  color: var(--navy);
  border: 0;
  font: 500 0.78rem var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--gold-deep); }
.btn.disabled, .btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.link { border-bottom: 1px solid var(--gold); padding-bottom: 2px; font-size: 0.85rem; letter-spacing: 0.08em; }
.eyebrow { color: var(--gold); letter-spacing: 0.32em; text-transform: uppercase; font-size: 0.72rem; font-weight: 400; margin: 0 0 1rem; }
.eyebrow.dark { color: var(--gold-deep); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Hero */
.hero {
  background: radial-gradient(ellipse at 50% 0%, var(--navy-soft), var(--navy) 70%);
  color: var(--ivory);
  text-align: center;
  padding: clamp(5rem, 14vw, 10rem) var(--gutter);
}
.hero.compact { padding: clamp(3.5rem, 9vw, 6rem) var(--gutter); }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.5rem); margin-bottom: 1.25rem; }
.hero .lede { max-width: 34rem; margin: 0 auto 2.25rem; color: #c9cadb; font-size: 1.05rem; }

/* Sections */
.section { padding: clamp(3rem, 8vw, 6rem) var(--gutter); max-width: 1280px; margin: 0 auto; }
.section.tight { padding-top: 1rem; }
.section-head, .page-head { text-align: center; }
.section-head { margin-bottom: 2.5rem; }
.section-head h2, .page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head { padding: clamp(3rem, 7vw, 5rem) var(--gutter) 1.5rem; }
.page-head .lede.dark { color: var(--muted); max-width: 30rem; margin: 1rem auto 2rem; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 2.25rem 1.5rem;
}
.card { display: block; }
.card-image { position: relative; aspect-ratio: 4 / 5; background: var(--white); overflow: hidden; }
.card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s, transform 0.6s; }
.card-image .alt { opacity: 0; }
.card:hover .card-image .alt { opacity: 1; }
.card:hover .card-image img:first-child { transform: scale(1.02); }
.card-body { padding-top: 1rem; }
.card h3 { font-size: 1.4rem; }
.card .meta { margin: 0.15rem 0; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }
.card .price { margin: 0.25rem 0 0.6rem; font-weight: 400; }
.dots { display: flex; align-items: center; gap: 0.35rem; margin: 0; }
.dots span { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); }
.dots small { color: var(--muted); font-size: 0.75rem; }

/* Statement band */
.statement { background: var(--navy); color: var(--ivory); text-align: center; padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.statement p { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.6rem); max-width: 40rem; margin: 0 auto 1.75rem; line-height: 1.3; }

/* Product detail */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) var(--gutter);
}
.gallery { display: grid; gap: 0.75rem; align-content: start; }
.main-image { background: var(--white); aspect-ratio: 4 / 5; }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 0.6rem; }
.thumb { width: 72px; padding: 0; border: 1px solid var(--line); background: var(--white); cursor: pointer; opacity: 0.65; }
.thumb.is-active { border-color: var(--gold); opacity: 1; }
.details h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 0.5rem; }
.price.big { font-size: 1.5rem; font-weight: 400; margin: 0 0 1.25rem; }
.price.big small { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.05em; }
.desc { color: #3d3f52; max-width: 34rem; }
.label { margin: 1.75rem 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.label strong { font-weight: 500; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.2); cursor: pointer; padding: 0; position: relative; }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -5px; border: 1.5px solid var(--gold); border-radius: 50%; }
.sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.size { min-width: 3rem; padding: 0.55rem 0.9rem; border: 1px solid var(--line); background: var(--white); text-align: center; font-size: 0.85rem; }
.details .btn { width: 100%; max-width: 26rem; text-align: center; }
.note { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; }
.note a { color: var(--ink); border-bottom: 1px solid var(--gold); }
.facts { list-style: none; padding: 1.5rem 0 0; margin: 2rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.4rem; font-size: 0.9rem; color: #3d3f52; }
.facts a { border-bottom: 1px solid var(--gold); }

/* Text pages */
.prose { max-width: 44rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.prose p { margin: 0 0 1.4rem; }
.big-lede { font-family: var(--serif); font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.35; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem; margin: 2.5rem 0; padding: 2rem 0; border-block: 1px solid var(--line); }
.pillars h3 { font-size: 1.5rem; color: var(--gold-deep); margin-bottom: 0.3rem; }
.pillars p { margin: 0; font-size: 0.92rem; color: #3d3f52; }
.policy h2 { font-size: 1.7rem; margin: 2.25rem 0 0.6rem; }
.policy h2:first-child { margin-top: 0; }
.policy a { border-bottom: 1px solid var(--gold); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.contact-card { background: var(--white); border: 1px solid var(--line); padding: 2rem; }
.contact-card h3 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.contact-card p { margin: 0 0 0.75rem; }
.phone { font-family: var(--serif); font-size: 1.8rem; color: var(--gold-deep); }

/* Sizes, forms, cart, checkout */
.size { cursor: pointer; font: inherit; font-size: 0.85rem; color: inherit; }
.size[aria-pressed="true"] { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.size:disabled { color: #b5b5b5; text-decoration: line-through; cursor: not-allowed; background: transparent; }
.stock-note { color: #a14343; text-transform: none; letter-spacing: 0; margin-left: 0.5rem; }
.form-error { color: #a12a2a; font-size: 0.85rem; margin: 0.4rem 0; }
.banner { background: #fbeaea; border: 1px solid #e3b4b4; color: #7d2323; padding: 0.9rem 1rem; margin: 0 0 1.5rem; }
.banner.info { background: #fff6e0; border-color: #e6cf94; color: #6b5316; }
.notice-wrap { max-width: 34rem; margin: 0 auto 1.5rem; text-align: left; }
.bag-link { color: var(--gold); }
.section.narrow { max-width: 820px; }
.empty { text-align: center; padding: 3rem 0; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 90px 1fr auto; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.line img { background: var(--white); object-fit: cover; width: 90px; height: 112px; }
.line h3 { font-size: 1.35rem; }
.line .meta, .mini-lines .meta { color: var(--muted); font-size: 0.82rem; margin: 0.15rem 0; }
.line .price { margin: 0.25rem 0; }
.line-end { text-align: right; }
.qty-form label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.qty-form select { margin-left: 0.4rem; padding: 0.3rem; font: inherit; background: var(--white); border: 1px solid var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 0.82rem; color: var(--muted); text-decoration: underline; cursor: pointer; }
.summary p { display: flex; justify-content: space-between; margin: 0.6rem 0; }
.summary .grand { font-family: var(--serif); font-size: 1.6rem; border-top: 1px solid var(--line); padding-top: 0.9rem; }
.summary { padding-top: 1.5rem; }
.btn.block { display: block; width: 100%; text-align: center; margin-top: 1.25rem; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); max-width: 1100px; margin: 0 auto; padding: 1rem var(--gutter) 4rem; align-items: start; }
.checkout h2 { font-size: 1.7rem; margin: 1.75rem 0 0.75rem; }
.checkout-form h2:first-of-type { margin-top: 0; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; letter-spacing: 0.06em; margin-bottom: 0.3rem; }
.field input, .field select { width: 100%; padding: 0.8rem 0.9rem; font: inherit; font-size: 1rem; background: var(--white); border: 1px solid #cfc9bd; color: var(--ink); }
.field.has-error input, .field.has-error select { border-color: #a12a2a; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.summary.side { background: var(--white); border: 1px solid var(--line); padding: 1.5rem; position: sticky; top: 90px; }
.summary.side h2 { margin: 0 0 1rem; }
.mini-lines { list-style: none; margin: 0 0 1rem; padding: 0; }
.mini-lines li { display: grid; grid-template-columns: 52px 1fr auto; gap: 0.8rem; align-items: center; margin-bottom: 0.8rem; font-size: 0.9rem; }
.mini-lines p { display: block; margin: 0; }
.mini-lines img { width: 52px; height: 65px; object-fit: cover; background: var(--ivory); }
.ship-to { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.ship-to h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }

/* Admin */
.admin-header nav { display: flex; align-items: center; gap: clamp(0.8rem, 2.5vw, 1.75rem); flex-wrap: wrap; }
.admin-header form { margin: 0; }
.nav-btn { background: none; border: 0; color: var(--gold); font: 400 0.78rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; cursor: pointer; padding: 0.5rem 0; }
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.admin-wrap h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.4rem; }
.admin-wrap h2 { font-size: 1.6rem; margin: 2.25rem 0 0.75rem; }
.small { font-size: 0.85rem; }
.right { text-align: right; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.small-btn { padding: 0.65rem 1.3rem; font-size: 0.72rem; }
.flash { padding: 0.9rem 1rem; margin: 0 0 1.5rem; border: 1px solid #b9d8c0; background: #eaf6ed; color: #1f5a2c; }
.flash.error { border-color: #e3b4b4; background: #fbeaea; color: #7d2323; }
.flash form.inline { display: inline; margin-left: 0.75rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { background: var(--white); border: 1px solid var(--line); padding: 1.1rem 1.2rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat span { display: block; font-family: var(--serif); font-size: 2rem; letter-spacing: 0; text-transform: none; color: var(--ink); line-height: 1.2; }
.stat.alert { border-color: #e3b4b4; } .stat.alert span { color: #a12a2a; }
a.stat:hover { border-color: var(--gold); }
.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); font-size: 0.92rem; }
@media (max-width: 760px) { .admin-wrap .table { display: block; overflow-x: auto; } }
.table th { text-align: left; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--ivory); }
.table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table a { border-bottom: 1px solid var(--gold); }
.thumb-sm { object-fit: cover; background: var(--ivory); }
.badge { display: inline-block; padding: 0.15rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--line); color: var(--ink); }
.badge.paid { background: #dff1e3; color: #1f5a2c; } .badge.shipped { background: #dde8f7; color: #1f3f73; }
.badge.delivered { background: #e8dff7; color: #47307a; } .badge.pending { background: #fff1d4; color: #7a5a14; }
.badge.cancelled { background: #ececec; color: #666; } .badge.review { background: #fbeaea; color: #a12a2a; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.tabs a { padding: 0.45rem 1rem; border: 1px solid var(--line); background: var(--white); font-size: 0.8rem; }
.tabs a.on { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; }
.admin-form { background: var(--white); border: 1px solid var(--line); padding: 1.5rem; }
.admin-form textarea { width: 100%; padding: 0.8rem 0.9rem; font: inherit; font-size: 1rem; border: 1px solid #cfc9bd; background: var(--white); resize: vertical; }
.admin-form input[type="color"] { width: 64px; height: 44px; padding: 2px; }
.admin-form input[type="file"] { padding: 0.6rem; }
.narrow-field { max-width: 14rem; }
.check { display: block; margin: 0.5rem 0 1.25rem; font-size: 0.95rem; }
.scroll-x { overflow-x: auto; margin-bottom: 1.25rem; }
.stock-table input { width: 4.5rem; padding: 0.45rem; font: inherit; border: 1px solid #cfc9bd; }
.color-cell { white-space: nowrap; }
.color-cell .thumb-sm { vertical-align: middle; margin-right: 0.5rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.2); margin-right: 0.4rem; vertical-align: middle; }
.login-box { max-width: 24rem; margin: 3rem auto; background: var(--white); border: 1px solid var(--line); padding: 2rem; }
.login-box h1 { margin-bottom: 1.25rem; }

/* Footer */
.site-footer { background: var(--navy); color: #c9cadb; padding: 3.5rem var(--gutter) 1.5rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.site-footer h3 { color: var(--ivory); font-size: 1.3rem; margin-bottom: 0.6rem; }
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--gold); }
.copyright { text-align: center; margin-top: 2.5rem !important; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.78rem; }

@media (max-width: 760px) {
  .brand img { height: 52px; }
  .site-header nav { gap: 1rem; }
  .site-header nav a { font-size: 0.7rem; letter-spacing: 0.12em; }
  .product, .checkout { grid-template-columns: 1fr; }
  .summary.side { position: static; }
  .row, .two-col { grid-template-columns: 1fr; }
  .line { grid-template-columns: 70px 1fr; }
  .line img { width: 70px; height: 88px; }
  .line-end { grid-column: 2; text-align: left; display: flex; gap: 1rem; align-items: center; }
}

@media (max-width: 400px) {
  .site-header { padding-inline: 0.75rem; }
  .brand img { height: 46px; }
  .site-header nav { gap: 0.7rem; }
  .site-header nav a { font-size: 0.66rem; letter-spacing: 0.08em; }
  .hero h1 { font-size: 2.3rem; }
  .grid { gap: 1.75rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
