:root {
  --ink: #1c1814;
  --muted: #6a6258;
  --paper: #f6f3ee;
  --paper-2: #efeae2;
  --card: #ffffff;
  --gold: #b08d57;
  --gold-soft: #d4b27a;
  --line: #e6e0d6;
  --danger: #8a3a2a;
  --good: #2f5d45;
  --shadow: 0 24px 60px rgba(28, 24, 20, 0.16);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip {
  position: absolute;
  left: 12px; top: -40px;
  background: var(--ink); color: var(--paper);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.wordmark {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.wordmark-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.wordmark-name {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}
.header-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
}
.header-search input:focus { border-color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-mail {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.header-mail:hover { color: var(--ink); }
.cart-toggle, .primary, .ghost, .icon-btn {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
}
.cart-toggle { display: inline-flex; align-items: center; gap: 8px; }
.cart-count {
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  min-width: 1.4em;
  padding: 0 6px;
  font-size: 12px;
  text-align: center;
}
.icon-btn {
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  padding: 0 8px;
}
.primary { width: 100%; letter-spacing: 0.04em; }
.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero, .catalog, .site-footer { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hero { padding-top: 64px; padding-bottom: 36px; max-width: 860px; margin-left: 24px; }
.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.08;
  margin: 0 0 18px;
}
.lede { margin: 0; color: var(--muted); font-size: 18px; max-width: 62ch; font-weight: 300; }

.catalog {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  padding-bottom: 80px;
}
.filters { position: sticky; top: 96px; align-self: start; }
.filter-group { margin-bottom: 22px; }
.filter-group h2, .filter-group label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 10px;
  border-radius: 8px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}
.pill[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.catalog-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  min-width: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-photo {
  background: #fff;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: contain; }
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  padding: 2px 7px;
  border-radius: 999px;
}
.card h3, .modal-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.meta { margin: 0; color: var(--muted); font-size: 13px; }
.price { margin: 0; font-size: 15px; }
.price small { color: var(--muted); font-size: 12px; display: block; }

.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager button, .pager span {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px 48px;
  color: var(--muted);
}
.site-footer strong {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}
.site-footer a { color: var(--ink); }
.fine { max-width: 62ch; font-size: 13px; }

.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 24, 20, 0.35);
  z-index: 20;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--paper);
  z-index: 21;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.drawer-head, .drawer-body { padding: 20px 22px; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--serif); font-weight: 500; margin: 0; font-size: 28px; }
.drawer-body { overflow: auto; flex: 1; }
.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line img { width: 72px; height: 72px; object-fit: contain; background: #fff; }
.cart-line h3 { margin: 0; font-size: 15px; font-family: var(--serif); font-weight: 500; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-row button {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
}
.line-amt { font-variant-numeric: tabular-nums; text-align: right; }
.remove { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; }
.cart-totals { margin: 18px 0 28px; }
.tot-row, .tier-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.tot-row.grand { font-size: 18px; margin-top: 8px; }
.empty-cart { color: var(--muted); }

.checkout h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.checkout label { display: block; margin: 0 0 12px; font-size: 13px; }
.checkout input, .checkout textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
}
.optional { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-status { min-height: 1.3em; font-size: 13px; }
.form-status.error { color: var(--danger); }
.form-status.ok { color: var(--good); }

.modal {
  border: 0;
  padding: 0;
  width: min(980px, calc(100vw - 24px));
  background: transparent;
}
.modal::backdrop { background: rgba(28,24,20,0.45); }
.modal-frame {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
  position: relative;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.modal-close { position: absolute; top: 10px; right: 12px; }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.modal-photo { background: #fff; min-height: 320px; display: grid; place-items: center; }
.modal-photo img { max-height: 460px; width: auto; max-width: 100%; object-fit: contain; }
.tiers {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.tiers th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.tiers td { padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tiers td:last-child, .tiers th:last-child { text-align: right; }
.fit-note { color: var(--gold); font-size: 14px; }
.compat { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.compat button { background: #fff; border: 1px solid var(--line); padding: 8px; text-align: left; }
.compat h3 { font-size: 15px; margin: 6px 0 0; }
.add-row { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.add-row input { width: 110px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: #fff; }

@media (max-width: 860px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .header-search { grid-column: 1 / -1; order: 3; }
  .header-mail { display: none; }
  .hero { margin-left: auto; padding-top: 36px; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .filter-group:first-child { grid-column: 1 / -1; }
  .modal-grid { grid-template-columns: 1fr; }
}

.ghost-header {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
}
.ghost-header:hover { border-color: var(--gold); }
.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.account-chip span { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-gate {
  margin: 18px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #fff;
}
.auth-gate h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 8px; font-size: 24px; }
.auth-modal .auth-frame { max-width: 440px; margin: 0 auto; padding: 36px 32px 32px; }
.auth-modal h2 { font-family: var(--serif); font-weight: 500; font-size: 32px; margin: 0 0 8px; }
.auth-tabs { display: flex; gap: 8px; margin: 18px 0 20px; }
.auth-tab {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}
.auth-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.auth-form label { display: block; margin: 0 0 12px; font-size: 13px; }
.auth-form input {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
}
.google-wrap { margin-bottom: 8px; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
.divider { position: relative; text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider span { background: var(--paper); padding: 0 10px; position: relative; }
.divider::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--line);
}
@media (max-width: 860px) {
  .account-chip span { display: none; }
  .ghost-header { padding: 8px 10px; font-size: 12px; }
}
