/* ============================================
   YETI POOP SKI WAX — GLOBAL STYLES
   ============================================ */

:root {
  --bg:           #3c5a74;
  --bg-card:      #4a6a87;
  --bg-nav:       #2e4559;
  --teal:         #F7813E;
  --teal-dark:    #d96a28;
  --teal-dim:     #7a3a18;
  --orange:       #F7813E;
  --text:         #fffce3;
  --text-muted:   #fffce3;
  --border:       #2e4559;
  --sold-out:     #c0392b;
  --font-head:    'Quicksand', sans-serif;
  --font-body:    'Quicksand', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-head);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

p { max-width: 65ch; }

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }

/* ============================================
   NAV
   ============================================ */

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo img { height: 48px; width: auto; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-links .wax-link {
  color: var(--teal);
  font-size: 0.875rem;
}

.nav-links .wax-link:hover {
  color: var(--text);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(42,181,193,0.12) 0%, transparent 65%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before { display: none; }

.hero-content { position: relative; z-index: 1; }

.hero-logo {
  width: clamp(180px, 30vw, 280px);
  margin: 0 auto 2.5rem;
}

.hero h1 {
  color: var(--teal);
  margin-bottom: 1rem;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 3rem);
  white-space: nowrap;
}

.hero h1 span { color: var(--teal); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
  max-width: 50ch;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}

.btn-primary {
  background: var(--teal);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-sold-out {
  background: transparent;
  color: var(--sold-out);
  border: 1px solid var(--sold-out);
  opacity: 0.8;
  cursor: not-allowed;
}

/* ============================================
   PRODUCT GRID
   ============================================ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--teal-dark);
  transform: translateY(-2px);
}

.product-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #0d2530;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-card-img img {
  transform: scale(1.03);
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.product-card-price {
  color: var(--teal);
  font-size: 0.95rem;
}

.product-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  margin-top: 0.5rem;
}

.badge-sold-out {
  background: rgba(192,57,43,0.15);
  color: var(--sold-out);
  border: 1px solid rgba(192,57,43,0.3);
}

/* ============================================
   WAX PAGE
   ============================================ */

.wax-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.wax-hero h1 { color: var(--teal); margin-bottom: 1.5rem; }

.wax-status {
  display: inline-block;
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.4);
  color: var(--sold-out);
  font-family: var(--font-head);
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  padding: 0.6rem 2rem;
  border-radius: 2px;
  margin-bottom: 2rem;
}

.wax-copy {
  max-width: 50ch;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============================================
   CART / CHECKOUT
   ============================================ */

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: min(400px, 100vw);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

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

.cart-header h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
}

.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.cart-close:hover { color: var(--text); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }

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

.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--bg);
}

.cart-item-name { font-size: 0.9rem; margin-bottom: 0.2rem; }
.cart-item-variant { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-price { font-size: 0.9rem; color: var(--teal); margin-top: 0.3rem; }

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

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.cart-total span:last-child { color: var(--teal); }

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 2rem; }
}

.product-images { position: sticky; top: 80px; }

.product-main-img {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.product-main-img img { width: 100%; height: 100%; object-fit: cover; }

.product-thumbnails {
  display: flex;
  gap: 0.5rem;
}

.product-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, border-color 0.2s;
}

.product-thumb:hover, .product-thumb.active {
  opacity: 1;
  border-color: var(--teal);
}

.product-info { }

.product-info h1 { margin-bottom: 0.75rem; }

.product-price {
  font-size: 1.5rem;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.product-description {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.option-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.875rem;
  border-radius: 2px;
  transition: all 0.2s;
}

.option-btn:hover { border-color: var(--teal); color: var(--teal); }
.option-btn.selected { border-color: var(--teal); background: var(--teal-dim); color: var(--text); }
.option-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.add-to-cart-btn {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--bg);
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.add-to-cart-btn:hover { background: var(--text); }
.add-to-cart-btn:disabled { background: var(--teal-dim); cursor: not-allowed; opacity: 0.7; }

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-logo img { height: 40px; opacity: 0.7; }

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a:hover { color: var(--teal); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 100%;
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================
   LOADING / STATES
   ============================================ */

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.75rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* ============================================
   UTILITY
   ============================================ */

.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; }
  .section { padding: 3rem 0; }
}
