:root {
  --ink: #141311;
  --paper: #fbf6ee;
  --paper-deep: #f1e5d6;
  --ivory: #fffdf9;
  --gold: #c7a46c;
  --gold-deep: #947042;
  --charcoal: #171411;
  --black: #0d0c0b;
  --line: rgba(20, 19, 17, 0.12);
  --mint: #5fd4b2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(199, 164, 108, 0.14), transparent 25%),
    linear-gradient(180deg, #fdf9f2, var(--paper) 34%, var(--paper-deep) 100%);
  font-family: Arial, Helvetica, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.02;
}
h1 { font-size: clamp(2.8rem, 5vw, 5.4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { line-height: 1.68; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.store-topbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(18px, 4vw, 50px);
  background: var(--black);
  color: #fff;
}

.store-wordmark {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-progress {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.store-progress span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0.75;
  font-weight: 700;
}

.store-progress span > span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.store-progress .is-active,
.store-progress .is-complete { opacity: 1; }
.store-progress .is-active > span,
.store-progress .is-complete > span {
  border-color: #24efaa;
  color: #24efaa;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 50px);
  background: rgba(253, 248, 241, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.portal-brand img {
  width: 140px;
  max-height: 58px;
  object-fit: contain;
}

.portal-nav,
.portal-socials,
.portal-actions,
.portal-footer-links,
.portal-filters,
.selector-row,
.store-card-footer,
.checkout-actions,
.payment-hero-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-nav {
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-nav a:hover { color: var(--gold-deep); }

.portal-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(199, 164, 108, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdfa, #f3e7d6);
  box-shadow: 0 8px 16px rgba(18, 17, 16, 0.07);
}

.portal-socials a:hover { background: linear-gradient(180deg, #efd8b2, #d7b27c); }
.portal-socials img { width: 24px; height: 24px; }

.portal-kicker,
.summary-label,
.portal-meta {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.portal-section,
.store-hero,
.product-shell,
.checkout-shell { padding: clamp(34px, 5vw, 70px) clamp(18px, 5vw, 50px); }

.store-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.store-hero-copy,
.store-hero-panel,
.checkout-card,
.gallery-panel,
.portal-card,
.summary-sticky,
.product-purchase-box,
.product-copy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 245, 0.78);
  box-shadow: 0 18px 40px rgba(18, 17, 16, 0.05);
}

.store-hero-copy {
  padding: clamp(26px, 5vw, 56px);
  display: grid;
  gap: 18px;
}

.store-hero-logo { width: min(320px, 90%); }

.store-hero-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(17, 15, 13, 0.92), rgba(39, 31, 24, 0.94)),
    radial-gradient(circle at top right, rgba(199, 164, 108, 0.24), transparent 30%);
  color: #fff;
}

.store-summary-card {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  display: grid;
  gap: 10px;
}

.store-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.store-feature-strip div,
.shipping-option,
.payment-option {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.65);
}

.store-feature-strip span,
.payment-option span,
.shipping-option span { display: block; color: #6d6259; }

.store-section-head { display: grid; gap: 22px; }

.portal-filter,
.portal-button,
.payment-pill {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-filter.active,
.portal-button.primary,
.payment-pill.active {
  background: linear-gradient(180deg, #d8b27b, var(--gold));
  border-color: var(--gold);
  color: var(--black);
}

.portal-button.wide,
.payment-pill { justify-content: center; flex: 1 1 220px; display: inline-flex; align-items: center; }

.portal-grid { display: grid; gap: 16px; margin-top: 22px; }
.featured-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.store-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.portal-card { overflow: hidden; }
.portal-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portal-card-body { padding: 18px; display: grid; gap: 10px; }
.portal-price { font-weight: 800; font-size: 1.1rem; }
.portal-price span { margin-left: 8px; color: #8e8177; text-decoration: line-through; font-weight: 400; }
.portal-variant-line { display: grid; gap: 6px; color: #70645a; font-size: 0.92rem; }
.store-card-footer { align-items: center; justify-content: space-between; }

.product-shell { padding-top: 22px; }
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.gallery-panel { overflow: hidden; }
.gallery-panel img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gallery-panel-main img { background: rgba(255,255,255,0.72); }

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px;
}

.gallery-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.74);
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-thumb.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(199, 164, 108, 0.34);
}

.product-sidebar {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 18px;
}

.product-brand-line { font-weight: 700; }
.product-price-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.product-price-line strong { font-size: 2.2rem; }
.product-price-line span { color: #96897f; text-decoration: line-through; }

.selector-group,
.product-copy-block { display: grid; gap: 10px; }

.selector-select,
.checkout-form-grid select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.selector-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.8);
  font-weight: 700;
}

.selector-chip.soft { min-width: unset; }

.product-purchase-box {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.quantity-field { display: grid; gap: 8px; font-weight: 700; }
.quantity-field input,
.checkout-form-grid input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font: inherit;
  background: #fff;
}

.product-cta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.product-detail-grid div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.7);
}

.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  align-items: start;
}

.checkout-main,
.checkout-summary { display: grid; gap: 18px; }

.checkout-heading {
  display: grid;
  gap: 12px;
}
.checkout-heading.compact img,
.checkout-heading img { width: 160px; }

.checkout-card { padding: 22px; }

.checkout-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 220px auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.checkout-line:last-child { border-bottom: 0; }
.checkout-line img { width: 110px; height: 138px; object-fit: cover; border-radius: 8px; }
.checkout-line-copy { display: grid; gap: 8px; }
.checkout-line-actions,
.checkout-line-remove { display: grid; gap: 8px; }
.checkout-line-actions label { display: grid; gap: 6px; font-size: 0.92rem; }
.checkout-line-actions input { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font: inherit; }
.text-button {
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.summary-sticky {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 16px;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.summary-total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
  font-weight: 800;
}

.checkout-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.checkout-form-grid label { display: grid; gap: 8px; font-weight: 700; }
.checkout-form-grid .wide { grid-column: 1 / -1; }

.shipping-options,
.payment-methods { display: grid; gap: 14px; }

.account-gate-card {
  display: grid;
  gap: 18px;
}

.account-gate-copy {
  display: grid;
  gap: 8px;
}

.account-login-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.account-login-inline label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.signed-in-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.checkout-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}

.checkout-mode-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.register-only {
  display: none;
}

.shipping-option,
.payment-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.shipping-option input { margin: 0; }
.shipping-option.active,
.payment-option.active {
  border-color: #24efaa;
  box-shadow: inset 0 0 0 1px rgba(36, 239, 170, 0.24);
}

.payment-option em,
.shipping-option em {
  font-style: normal;
  font-weight: 800;
}

.portal-note,
.portal-empty { color: #71645c; }

.error-note {
  color: #8b2f2f;
  font-weight: 700;
}

.portal-footer {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 42px 18px;
  background: linear-gradient(180deg, #11110f, #181411 70%, #11110f);
  color: #fff;
}

.portal-footer img { width: min(320px, 100%); }
.portal-footer-links { justify-content: center; font-size: 0.88rem; font-weight: 800; text-transform: uppercase; }

@media (max-width: 1200px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid,
  .checkout-shell { grid-template-columns: 1fr; }
  .product-sidebar,
  .summary-sticky { position: static; }
}

@media (max-width: 980px) {
  .portal-header,
  .store-hero,
  .store-feature-strip,
  .store-product-grid,
  .product-gallery,
  .checkout-form-grid,
  .product-cta-row,
  .product-detail-grid { grid-template-columns: 1fr; }
  .checkout-line { grid-template-columns: 1fr; }
  .account-login-inline,
  .signed-in-card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .store-topbar,
  .portal-header { grid-template-columns: 1fr; }
  .store-progress { justify-content: flex-start; }
  .portal-brand img { width: 110px; max-height: 44px; }
  .portal-nav,
  .portal-actions,
  .portal-footer-links,
  .portal-filters,
  .selector-row,
  .store-card-footer,
  .checkout-actions,
  .payment-hero-options { display: grid; width: 100%; }
  .portal-button,
  .portal-filter,
  .payment-pill { width: 100%; }
}
