:root {
  --brand: #8a6a35;
  --brand-dark: #6b4f26;
  --brand-mid: #ab8c57;
  --cream: #faf6ee;
  --cream-deep: #f1e9d8;
  --ink: #2b2a22;
  --gold: #b98b3e;
  --gold-light: #e7c987;
  --red: #a53a2e;
  --white: #ffffff;
  --line: #e2ddc9;
  --shadow: 0 8px 24px rgba(107, 79, 38, 0.14);
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
}

.wordmark__badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold);
}

.wordmark__text {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.cart-button {
  position: relative;
  background: var(--brand);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-button:hover { background: var(--brand-dark); }

.cart-count {
  background: var(--gold);
  color: var(--brand-dark);
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ---------- hero ---------- */

.hero {
  padding: 56px 20px 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  margin: 0 0 14px;
  color: var(--brand);
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: #5a4a58;
  font-size: 16px;
  line-height: 1.6;
}

.hero__rules {
  margin-top: 22px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

/* ---------- aisle nav ---------- */

.aisle-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 20px 40px;
}

.aisle-nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}
.aisle-nav a.is-soon { color: #8a7d88; }

/* ---------- aisle sign ---------- */

.aisle {
  padding: 10px 20px 50px;
}

.aisle-sign {
  max-width: 1180px;
  margin: 0 auto 22px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 22px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}

.aisle-sign__number {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.aisle-sign h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 4px 0 0;
}

.aisle-sign__tagline {
  font-size: 13px;
  color: #d9c7d8;
  text-align: right;
  max-width: 260px;
}

.aisle.is-soon .aisle-sign {
  background: linear-gradient(180deg, #8a7d88 0%, #6b6069 100%);
}

/* ---------- shelf grid ---------- */

.shelf-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.pack-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}
.pack-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.pack-card__image {
  aspect-ratio: 4 / 3;
  background: var(--cream-deep);
  overflow: hidden;
}
.pack-card__image img { width: 100%; height: 100%; object-fit: cover; }

.pack-card__body { padding: 12px 14px 16px; }

.pack-card__title {
  font-family: var(--serif);
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--ink);
}

.pack-card__meta { font-size: 12px; color: #7c6c7a; }

.price-sticker {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: var(--brand-dark);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(8deg);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--white);
}
.price-sticker.is-flagship { background: var(--red); color: var(--white); }
.price-sticker small { font-size: 8px; font-weight: 600; letter-spacing: 0.04em; }
.price-sticker span { font-size: 15px; }

/* coming soon cards */

.pack-card.is-soon {
  cursor: default;
  background: #f3eee6;
  color: #8a7d88;
}
.pack-card.is-soon:hover { transform: none; box-shadow: none; }
.pack-card.is-soon .pack-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a99ea7;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pack-card.is-soon .pack-card__title { color: #6b6069; }

/* ---------- modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 31, 43, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 60;
}
.modal-overlay.is-open { display: flex; }

.modal {
  background: var(--cream);
  border-radius: var(--radius);
  max-width: 880px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  color: var(--brand);
}

.modal__header { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.modal__header img {
  width: 180px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.modal__header-info { flex: 1; min-width: 240px; }
.modal__header h3 {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--brand);
  margin: 0 0 8px;
}
.modal__header p { font-size: 14px; color: #5a4a58; max-width: 480px; line-height: 1.5; }

.bundle-cta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 480px;
}
.bundle-cta__text { font-size: 13px; color: var(--ink); }
.bundle-cta__text strong { color: var(--brand); font-family: var(--serif); font-size: 15px; }
.bundle-cta__save { color: var(--red); font-weight: 700; }

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.design-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.design-card__image {
  aspect-ratio: 4/3;
  background: var(--cream-deep);
  position: relative;
  cursor: zoom-in;
}
.design-card__image img { width: 100%; height: 100%; object-fit: cover; }
.design-card__expand {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: zoom-in;
  color: var(--ink);
}
.design-card__body { padding: 10px; }
.design-card__name { font-size: 12.5px; font-weight: 600; margin: 0 0 8px; min-height: 32px; }

/* ---------- design preview lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 22, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  z-index: 80;
  padding: 20px;
}
.lightbox-overlay.is-open { display: flex; }

.lightbox__image {
  max-width: min(90vw, 760px);
  max-height: 82vh;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.lightbox__caption {
  color: var(--cream);
  font-family: var(--serif);
  font-size: 15px;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--cream);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--cream);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.22); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

@media (max-width: 640px) {
  .lightbox__nav { width: 38px; height: 38px; font-size: 20px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

/* ---------- buttons ---------- */

.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-add {
  background: var(--cream-deep);
  color: var(--brand);
  width: 100%;
  justify-content: space-between;
}
.btn-add:hover { background: var(--gold-light); }
.btn-add.is-added { background: var(--brand); color: var(--cream); }
.btn-bundle {
  background: var(--gold);
  color: var(--brand-dark);
  white-space: nowrap;
}
.btn-bundle:hover { background: var(--gold-light); }
.btn-bundle.is-added { background: var(--brand); color: var(--cream); }

.qty-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand);
  border-radius: 999px;
  padding: 4px;
  width: 100%;
}
.qty-btn {
  background: rgba(255,255,255,0.14);
  border: none;
  color: var(--cream);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qty-btn:hover { background: rgba(255,255,255,0.26); }
.qty-value {
  color: var(--cream);
  font-weight: 700;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}
.btn-primary {
  background: var(--brand);
  color: var(--cream);
  width: 100%;
  justify-content: center;
  padding: 13px;
  font-size: 14px;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-primary:disabled { background: #cabfc7; color: #8a7d88; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--brand);
}

/* ---------- cart drawer ---------- */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,31,43,0.45);
  display: none;
  z-index: 70;
}
.cart-overlay.is-open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: var(--cream);
  box-shadow: -12px 0 30px rgba(0,0,0,0.2);
  transition: right 0.25s ease;
  z-index: 71;
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open { right: 0; }

.cart-drawer__header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-drawer__header h3 { font-family: var(--serif); margin: 0; color: var(--brand); font-size: 20px; }

.cart-progress {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-progress__label { font-size: 12.5px; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.cart-progress__track {
  height: 8px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
}
.cart-progress__fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.cart-progress.is-met .cart-progress__fill { background: #4f7a4a; }

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__title { font-size: 13px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line__sub { font-size: 11.5px; color: #8a7d88; }
.cart-line__price { font-size: 13px; font-weight: 700; color: var(--brand); }
.cart-line__remove {
  background: none;
  border: none;
  color: #b2a3af;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
}
.cart-line__remove:hover { color: var(--red); }

.cart-empty { text-align: center; color: #8a7d88; padding: 60px 20px; font-size: 14px; }

.cart-drawer__footer {
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--brand);
  margin-bottom: 12px;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  color: #8a7d88;
  font-size: 13px;
}
.site-footer a { text-decoration: none; color: var(--brand); font-weight: 600; margin: 0 8px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brand);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 90;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- simple pages (terms/privacy/download) ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}
.page h1 { font-family: var(--serif); color: var(--brand); }
.page h2 { font-family: var(--serif); color: var(--brand); font-size: 18px; margin-top: 32px; }
.page p, .page li { line-height: 1.6; color: #4a3c48; font-size: 15px; }

@media (max-width: 640px) {
  .cart-drawer { width: 100%; }
  .aisle-sign { flex-direction: column; align-items: flex-start; }
  .aisle-sign__tagline { text-align: left; }
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; padding: 20px 16px; }
  .modal__header img { width: 100%; max-width: 260px; }
  .site-header__bar { padding: 12px 16px; }
  .wordmark__text { font-size: 17px; letter-spacing: 0.03em; }
  .hero { padding: 40px 16px 28px; }
}
