@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Pinyon+Script&display=swap");
@import "tokens.css";

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 244, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(10, 31, 68, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand-link { display: flex; align-items: center; gap: 0.75rem; }
.brand-link img { height: 52px; width: auto; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.nav a:hover { opacity: 1; color: var(--red); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 8px 24px rgba(155, 35, 53, 0.25); }
.btn-secondary { background: var(--navy); color: var(--cream); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }

/* Hero */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero-logo { width: min(520px, 88vw); margin: 0 auto 1.5rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--navy);
}
.tagline-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0.5rem auto 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.tagline-rule::before, .tagline-rule::after {
  content: "";
  width: 2.5rem;
  height: 2px;
  background: var(--gold);
}
.hero p.lead {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.hero-cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Virtual aisles */
.section { padding: 3.5rem 0; }
.section-dark { background: var(--navy); color: var(--cream); }
.section-alt { background: var(--cream-dark); }
.section-dark .section-label { color: var(--gold); }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
  color: inherit;
}
.section-intro { max-width: 36rem; color: var(--text-muted); margin-bottom: 2rem; }
.section-dark .section-intro { color: rgba(248, 244, 235, 0.75); }

.aisle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.aisle-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 31, 68, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.aisle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(10, 31, 68, 0.16);
}
.aisle-card img { width: 48px; height: 48px; }
.aisle-card h3 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.aisle-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); flex: 1; }
.aisle-card .aisle-link {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.section-dark .aisle-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(248, 244, 235, 0.1);
  color: var(--cream);
}
.section-dark .aisle-card h3 { color: var(--cream); }
.section-dark .aisle-card p { color: rgba(248, 244, 235, 0.7); }

/* Trust */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.trust-item { text-align: center; padding: 1rem; }
.trust-item img { width: 44px; height: 44px; margin: 0 auto 0.75rem; }
.trust-item h4 { margin: 0 0 0.35rem; font-size: 1rem; }
.trust-item p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* Coming soon banner */
.coming-soon {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.coming-soon h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
}
.notify-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 1rem auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.notify-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(248, 244, 235, 0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--cream);
  font-family: inherit;
}
.notify-form input::placeholder { color: rgba(248,244,235,0.5); }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(248, 244, 235, 0.8);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { color: var(--gold); margin: 0 0 0.75rem; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(248, 244, 235, 0.12);
  padding-top: 1rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skyline-divider {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 1rem;
  opacity: 0.9;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem;
}
.cart-count {
  position: absolute;
  top: -2px;
  right: -6px;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav a.active { color: var(--red); opacity: 1; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 31, 68, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(10,31,68,0.14); }
.product-card-link { display: block; color: inherit; }
.product-image { position: relative; aspect-ratio: 5/7; background: var(--cream-dark); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-badges { position: absolute; top: 0.5rem; left: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}
.badge-grader { background: var(--badge-color, var(--navy)); color: white; }
.badge-raw { background: var(--navy); color: var(--cream); }
.badge-deal { background: var(--gold); color: var(--navy); }
.product-info { padding: 0.85rem 1rem 1rem; }
.product-info h3 { margin: 0 0 0.25rem; font-size: 0.92rem; line-height: 1.35; color: var(--navy); }
.product-meta { margin: 0; font-size: 0.78rem; color: var(--text-muted); }
.product-price { margin: 0.35rem 0 0; font-weight: 700; font-size: 1rem; color: var(--red); }

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.filter-bar select, .filter-bar input {
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(10,31,68,0.15);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  background: white;
}
.search-input { flex: 1; min-width: 180px; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.product-gallery { display: grid; gap: 0.75rem; }
.product-gallery img { border-radius: var(--radius); background: var(--cream-dark); }
.product-detail h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.product-detail .price { font-size: 1.75rem; font-weight: 700; color: var(--red); margin: 0.5rem 0; }
.trust-note { background: var(--cream-dark); border-radius: var(--radius); padding: 1rem; font-size: 0.88rem; margin: 1rem 0; }
.cert-link { color: var(--red); font-weight: 600; }
.comp-links { font-size: 0.82rem; margin: 0.75rem 0 0; line-height: 1.55; }
.comp-links a { color: var(--red); font-weight: 600; margin-right: 0.85rem; }
.comp-links-empty { color: var(--text-muted); }
.product-comp-links { margin-top: 0.5rem; }

/* Cart */
.cart-layout { display: grid; gap: 1.5rem; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table td, .cart-table th { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(10,31,68,0.08); }
.cart-checkout { display: grid; gap: 1.25rem; }
@media (min-width: 860px) {
  .cart-checkout { grid-template-columns: 1fr minmax(280px, 360px); align-items: start; }
}
.checkout-panel, .cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.cart-summary { align-self: start; }
.checkout-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
}
.checkout-heading:not(:first-child) { margin-top: 1.1rem; }
.ship-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(10,31,68,0.12);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ship-option:has(input:checked) {
  border-color: var(--red);
  background: rgba(196, 30, 58, 0.04);
}
.ship-option input { margin-top: 0.2rem; accent-color: var(--red); }
.ship-option strong { display: block; font-size: 0.92rem; color: var(--navy); }
.ship-option small { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.ship-address-panel input,
.ship-address-panel select,
.checkout-panel > input[type="email"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(10,31,68,0.12);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
}
.ship-address-panel select { border-radius: 10px; }
.ship-row {
  display: grid;
  grid-template-columns: 1fr 88px 108px;
  gap: 0.45rem;
}
@media (max-width: 520px) {
  .ship-row { grid-template-columns: 1fr 1fr; }
  .ship-row input:last-child { grid-column: 1 / -1; }
}
.checkout-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0 0; line-height: 1.45; }
.checkout-msg { color: var(--red); font-weight: 600; }
.fee-line { display: flex; justify-content: space-between; margin: 0.35rem 0; font-size: 0.9rem; }
.fee-total { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--gold); padding-top: 0.5rem; margin-top: 0.5rem; }

/* Policy pages */
.policy-page { padding: 2rem 0 4rem; max-width: 720px; }
.policy-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.policy-page h2 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; color: var(--navy); }
.policy-page p, .policy-page li { color: var(--text-muted); font-size: 0.95rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }

/* Homepage sections */
.home-products { margin-top: 1rem; }
.section-header-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.section-header-row a { font-size: 0.85rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em; }

/* Aisle cards clickable */
.aisle-card { cursor: pointer; }
.aisle-card a { color: inherit; }

/* Notify success */
.notify-success { color: var(--gold); font-weight: 600; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(248,244,235,0.98);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(10,31,68,0.08);
    gap: 0.75rem;
  }
  .nav.open { display: flex; }
  .header-inner { position: relative; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand-link img { height: 42px; }
  .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}