/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #EEE9E2;
  --surface:   #F5F1EB;
  --border:    #D6D0C8;
  --accent:    #2E2E2B;
  --accent-dk: #181816;
  --text:      #2A2A27;
  --text-md:   #6A6A62;
  --text-lt:   #9A9A92;
  --radius:    3px;
  --radius-lg: 6px;
  --shadow:    0 1px 4px rgba(0,0,0,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

img { display: block; width: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }

/* ── Typography ── */
h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(32px, 7vw, 52px); font-weight: 300; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(24px, 5vw, 38px); font-weight: 300; line-height: 1.2; }
h3 { font-size: 15px; font-weight: 500; letter-spacing: 0.01em; }
h4 { font-size: 13px; font-weight: 500; }

/* ── Layout ── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.nav-logo .logo-mark {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-logo .logo-sub {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-md);
  margin-top: 3px;
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-md);
}

.nav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  font-size: 20px;
  position: relative;
}

.nav-btn:hover { background: var(--bg); }

.cart-count {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  display: none;
}

.cart-count.visible { display: flex; }

/* ── Hero ── */
.hero {
  background: var(--surface);
  padding: 72px 24px 64px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-md);
  margin-bottom: 20px;
}

.hero h1 { margin-bottom: 20px; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero p {
  font-size: 15px;
  color: var(--text-md);
  max-width: 420px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 32px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background .15s;
}

.btn-primary:hover { background: var(--accent-dk); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background .15s;
  background: transparent;
}

.btn-outline:hover { background: var(--text); color: #fff; }

/* ── How it works ── */
.how-it-works { background: var(--bg); }

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.hiw-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--border);
}

.hiw-icon {
  width: 48px; height: 48px;
  background: #F5EFE6;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

.hiw-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.hiw-card h3 { font-size: 15px; margin-bottom: 6px; }
.hiw-card p { font-size: 13px; color: var(--text-md); line-height: 1.5; }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ── Featured carousel ── */
.featured { background: var(--surface); }

.carousel-wrap { position: relative; overflow: hidden; }

.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-track .product-card {
  flex: 0 0 calc(50% - 6px);
  scroll-snap-align: start;
}

/* ── Browse by type ── */
.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.type-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.type-chip:hover, .type-chip.active {
  border-color: var(--accent);
  background: #F5EFE6;
}

.type-chip .type-icon { font-size: 24px; margin-bottom: 6px; }
.type-chip span { font-size: 12px; font-weight: 500; color: var(--text-md); display: block; }

/* ── Product card ── */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s;
  display: flex;
  flex-direction: column;
}

.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.product-card-img {
  aspect-ratio: 1;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.product-card-img img { height: 100%; transition: transform .3s; }
.product-card:hover .product-card-img img { transform: scale(1.04); }

.product-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-badge.preorder {
  background: #7C3AED;
}

.product-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }

.product-card-brand {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 2px;
}

.product-card-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; line-height: 1.3; }
.product-card-finish { font-size: 12px; color: var(--text-md); margin-bottom: 10px; }

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-price { font-size: 16px; font-weight: 700; color: var(--text); }

.add-to-cart-btn {
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}

.add-to-cart-btn:hover { background: var(--accent-dk); }
.add-to-cart-btn:active { transform: scale(.92); }
.add-to-cart-btn.added { background: #4CAF7D; }

/* ── Shop grid ── */
.shop-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-md);
  background: var(--surface);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.filter-pill:hover, .filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  gap: 10px;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

.search-bar input::placeholder { color: var(--text-lt); }
.search-icon { color: var(--text-lt); font-size: 18px; flex-shrink: 0; }

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

/* ── Product page ── */
.product-photos { position: relative; background: var(--bg); }

.photo-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.photo-carousel::-webkit-scrollbar { display: none; }

.photo-carousel .slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 1;
}

.photo-carousel-wrap { position: relative; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  z-index: 2;
  transition: background .15s, opacity .15s;
}
.carousel-btn:hover { background: #fff; }
.carousel-btn-prev { left: 8px; }
.carousel-btn-next { right: 8px; }
.carousel-btn[disabled] { opacity: 0.3; pointer-events: none; }

.photo-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px 0;
}

.photo-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background .2s, width .2s;
}

.photo-dots span.active { background: var(--accent); width: 18px; border-radius: 3px; }

.product-info { padding: 20px 16px 100px; }

.product-info-brand {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.product-info h1 { font-size: 22px; margin-bottom: 6px; }

.product-info-price {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.product-info-desc {
  font-size: 14px;
  color: var(--text-md);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-specs {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-md); font-weight: 500; }
.spec-value { font-weight: 600; text-align: right; }

.sticky-add {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  z-index: 50;
}

.sticky-add .btn-primary { flex: 1; justify-content: center; font-size: 15px; }

/* ── Product prev/next nav ── */
.product-nav {
  display: flex;
  gap: 1px;
  border-top: 1px solid var(--border);
  margin-bottom: 80px;
}

.product-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
  min-width: 0;
}

.product-nav-btn:hover { background: var(--bg); }

.product-nav-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.product-nav-next { justify-content: flex-end; text-align: right; }

.product-nav-btn img {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--bg);
}

.product-nav-btn span {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav-btn svg { flex-shrink: 0; color: var(--text-md); }

/* ── Cart panel ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--surface);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.cart-panel.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 { font-size: 17px; }

.cart-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--text-md);
}

.cart-close:hover { background: var(--bg); }

.cart-body { flex: 1; overflow-y: auto; padding: 16px; }

.cart-empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-lt);
}

.cart-empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty-state p { font-size: 14px; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  background: var(--bg);
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-finish { font-size: 12px; color: var(--text-md); margin-bottom: 8px; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
}

.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-num { font-size: 14px; font-weight: 600; min-width: 16px; text-align: center; }
.cart-item-price { font-size: 14px; font-weight: 700; white-space: nowrap; }

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.cart-name-input {
  margin-bottom: 12px;
}

.cart-name-input label { display: block; font-size: 12px; font-weight: 600; color: var(--text-md); margin-bottom: 6px; }

.cart-name-input input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  outline: none;
  background: var(--bg);
}

.cart-name-input input:focus { border-color: var(--accent); background: var(--surface); }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.wa-checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: #25D366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .15s;
}

.wa-checkout-btn:hover { background: #1ebe5c; }
.wa-checkout-btn:disabled { background: var(--border); color: var(--text-lt); cursor: not-allowed; }

.wa-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-lt);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Footer ── */
.footer {
  background: #2C2C2A;
  color: #A8A5A0;
  padding: 40px 16px 32px;
  text-align: center;
}

.footer-logo { display: flex; flex-direction: column; line-height: 1; margin-bottom: 12px; }
.footer-logo .logo-mark { font-size: 14px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; }
.footer-logo .logo-sub { font-size: 8px; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 3px; }
.footer p { font-size: 13px; line-height: 1.6; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin: 16px 0; }
.footer-links a { font-size: 13px; color: #A8A5A0; }
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .carousel-track .product-card { flex: 0 0 calc(33.33% - 8px); }
  .hiw-grid { gap: 20px; }
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .carousel-track .product-card { flex: 0 0 calc(25% - 9px); }
}

/* ── Pre-order notice ── */
.preorder-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #4C1D95;
  line-height: 1.5;
}

.preorder-notice-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

/* ── Utility ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* ── Desktop product page ── */
@media (min-width: 768px) {
  .product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 40px 120px;
    align-items: start;
  }
  .product-photos {
    position: sticky;
    top: 72px;
  }
  .photo-carousel-wrap {
    border-radius: 12px;
    overflow: hidden;
  }
  .photo-carousel {
    overflow-x: auto;
  }
  .photo-carousel .slide img {
    max-width: 100%;
    width: 100%;
    display: block;
  }
  .product-info {
    padding: 8px 0 0;
  }
}
