/* APEX NUTRITION - Premium Fitness E-Commerce */
:root {
  --bg: #0a0a0a;
  --bg-2: #141414;
  --bg-3: #1c1c1c;
  --card: #161616;
  --border: #262626;
  --text: #ffffff;
  --muted: #a1a1a1;
  --accent: #d4ff3a;
  --accent-2: #ff6b35;
  --success: #22c55e;
  --radius: 12px;
  --shadow: 0 10px 40px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1,h2,h3,h4 { font-family: 'Montserrat', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
.accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 6px; font-weight: 700; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.25s ease;
  position: relative; overflow: hidden;
}
.btn-primary { background: var(--accent); color: #0a0a0a; }
.btn-primary:hover { background: #e8ff6a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,255,58,0.35); }
.btn-outline { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: #0a0a0a; }
.btn-dark { background: var(--bg-3); color: #fff; border: 1px solid var(--border); }
.btn-dark:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 20px; font-size: 12px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.logo {
  font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 24px;
  letter-spacing: 0.05em; display: flex; align-items: center; gap: 6px;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-icon { position: relative; font-size: 20px; color: var(--text); padding: 6px; transition: color 0.2s; }
.nav-icon:hover { color: var(--accent); }
.cart-count {
  position: absolute; top: 0; right: -2px;
  background: var(--accent); color: #0a0a0a; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 14px; width: 260px; transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input { background: none; border: none; color: var(--text); width: 100%; font-size: 14px; outline: none; }
.search-bar input::placeholder { color: var(--muted); }
.hamburger { display: none; font-size: 24px; }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: var(--bg); padding: 24px; overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.mobile-menu .close-btn { position: absolute; top: 16px; right: 24px; font-size: 28px; }

/* HERO */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center;
  background: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1920&q=80') center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.6) 50%, rgba(10,10,10,0.3) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.2em; font-size: 14px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(48px, 8vw, 96px); line-height: 0.95; margin-bottom: 20px; }
.hero h1 .accent { display: block; }
.hero p { font-size: 18px; color: var(--muted); max-width: 520px; margin-bottom: 32px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; margin-top: 48px; }
.hero-stat .num { font-size: 32px; font-weight: 900; color: var(--accent); font-family: 'Montserrat'; }
.hero-stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* Sections */
.section { padding: 96px 0; }
.section-dark { background: var(--bg-2); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.2em; font-size: 13px; margin-bottom: 12px; text-transform: uppercase; }
.section-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 12px; }
.section-sub { color: var(--muted); max-width: 600px; margin: 0 auto; }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3/4; cursor: pointer; background: var(--card);
  transition: transform 0.3s ease;
}
.cat-card:hover { transform: translateY(-6px); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-card:hover img { transform: scale(1.08); }
.cat-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
}
.cat-card .cat-name {
  position: absolute; bottom: 16px; left: 16px; right: 16px; z-index: 2;
  font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em;
}
.cat-card .shop-now {
  position: absolute; bottom: 48px; left: 16px; z-index: 2;
  font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.15em;
  opacity: 0; transform: translateY(8px); transition: all 0.3s;
}
.cat-card:hover .shop-now { opacity: 1; transform: translateY(0); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.3s ease; position: relative;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.product-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: #0f0f0f; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent-2); color: #fff;
  font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 4px; letter-spacing: 0.08em; text-transform: uppercase;
}
.badge.sale { background: var(--accent-2); }
.badge.new { background: var(--accent); color: #0a0a0a; }
.badge.bestseller { background: #fff; color: #0a0a0a; }
.wishlist-btn {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  background: rgba(10,10,10,0.7); backdrop-filter: blur(6px); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: all 0.2s; z-index: 2;
}
.wishlist-btn:hover { background: var(--accent); color: #0a0a0a; }
.wishlist-btn.active { background: var(--accent-2); color: #fff; }
.product-info { padding: 16px; }
.product-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.product-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stars { color: var(--accent); font-size: 12px; }
.rating-count { font-size: 12px; color: var(--muted); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.price { font-size: 20px; font-weight: 800; color: var(--accent); font-family: 'Montserrat'; }
.old-price { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.add-cart-btn {
  width: 100%; padding: 12px; background: var(--bg-3); color: #fff;
  border: 1px solid var(--border); border-radius: 6px; font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.2s;
}
.add-cart-btn:hover { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }

/* Nutrition section */
.nutrition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nut-card {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: all 0.3s;
}
.nut-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.nut-card .icon { font-size: 32px; margin-bottom: 12px; }
.nut-card h3 { font-size: 18px; margin-bottom: 8px; }
.nut-card p { color: var(--muted); font-size: 14px; }

/* Snacks section visual */
.snacks-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1f0a 100%);
  border-radius: 16px; padding: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  border: 1px solid var(--border); overflow: hidden; position: relative;
}
.snacks-banner img { border-radius: 12px; width: 100%; height: 320px; object-fit: cover; }

/* Promo banner */
.promo {
  background: linear-gradient(135deg, var(--accent) 0%, #a8d920 100%);
  color: #0a0a0a; padding: 80px 0; text-align: center;
}
.promo h2 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 16px; }
.promo p { font-size: 18px; margin-bottom: 32px; opacity: 0.85; }
.promo .btn { background: #0a0a0a; color: var(--accent); }
.promo .btn:hover { background: #1a1a1a; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  text-align: center; padding: 32px 20px; background: var(--bg-3);
  border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.feature-card .icon { font-size: 40px; margin-bottom: 16px; color: var(--accent); }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 13px; }

/* Reviews */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: all 0.3s;
}
.review-card:hover { border-color: var(--accent); }
.review-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.review-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.review-name { font-weight: 700; font-size: 15px; }
.review-verified { font-size: 11px; color: var(--success); font-weight: 600; }
.review-stars { color: var(--accent); margin-bottom: 12px; }
.review-text { color: var(--muted); font-size: 14px; line-height: 1.6; font-style: italic; }

/* Newsletter */
.newsletter {
  background: var(--bg-2); padding: 80px 0; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.newsletter h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 12px; }
.newsletter p { color: var(--muted); margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 14px 18px; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px; outline: none;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button { white-space: nowrap; }

/* Footer */
.footer { background: var(--bg-2); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer h4 { font-size: 14px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.footer p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
.footer ul a:hover { color: var(--accent); }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.socials a:hover { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 12px; }

/* Cart drawer */
.drawer {
  position: fixed; top: 0; right: -420px; width: 420px; max-width: 100%; height: 100vh;
  background: var(--bg-2); z-index: 300; transition: right 0.35s ease;
  display: flex; flex-direction: column; border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}
.drawer.open { right: 0; }
.drawer-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h3 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cart-item-price { color: var(--accent); font-weight: 700; font-size: 14px; }
.qty-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 28px; height: 28px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; font-weight: 700; }
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-val { font-weight: 700; min-width: 20px; text-align: center; }
.remove-btn { color: var(--muted); font-size: 12px; margin-left: auto; }
.remove-btn:hover { color: var(--accent-2); }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.cart-total .amount { color: var(--accent); }
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 250;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  backdrop-filter: blur(2px);
}
.overlay.open { opacity: 1; pointer-events: all; }

/* Product modal */
.modal {
  position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-content {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px;
  max-width: 960px; width: 100%; max-height: 90vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; position: relative;
}
.modal-close { position: absolute; top: 16px; right: 20px; font-size: 28px; z-index: 5; color: var(--muted); }
.modal-close:hover { color: var(--accent); }
.modal-img { background: #0f0f0f; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; min-height: 400px; }
.modal-info { padding: 40px 32px; }
.modal-info h2 { font-size: 28px; margin-bottom: 8px; }
.modal-price { font-size: 32px; color: var(--accent); font-weight: 900; font-family: 'Montserrat'; margin-bottom: 16px; }
.modal-old { color: var(--muted); text-decoration: line-through; font-size: 18px; margin-left: 12px; }
.modal-desc { color: var(--muted); margin-bottom: 24px; line-height: 1.7; }
.modal-meta { display: flex; gap: 24px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.modal-meta strong { color: var(--text); }
.flavor-select { margin-bottom: 20px; }
.flavor-select label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.flavor-options { display: flex; gap: 8px; flex-wrap: wrap; }
.flavor-chip { padding: 8px 16px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.flavor-chip:hover, .flavor-chip.active { border-color: var(--accent); color: var(--accent); }
.modal-actions { display: flex; gap: 12px; }
.modal-actions .add-cart-btn { flex: 1; padding: 14px; }

/* Search overlay */
.search-overlay {
  position: fixed; top: 72px; left: 0; right: 0; z-index: 150;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  padding: 24px; display: none;
}
.search-overlay.open { display: block; }
.search-results { max-height: 60vh; overflow-y: auto; margin-top: 16px; }
.search-result-item { display: flex; gap: 12px; padding: 12px; border-radius: 8px; cursor: pointer; transition: background 0.2s; }
.search-result-item:hover { background: var(--bg-3); }
.search-result-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.search-result-name { font-weight: 600; font-size: 14px; }
.search-result-price { color: var(--accent); font-weight: 700; font-size: 13px; }

/* Filters bar */
.filters-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 32px; justify-content: center; }
.filter-chip { padding: 10px 20px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 30px; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.filter-chip:hover, .filter-chip.active { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.sort-select { padding: 10px 16px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 30px; color: var(--text); font-size: 13px; font-weight: 600; }

/* Checkout modal */
.checkout-form { display: grid; gap: 16px; }
.checkout-form input, .checkout-form select { padding: 12px 16px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 14px; outline: none; width: 100%; }
.checkout-form input:focus { border-color: var(--accent); }
.checkout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkout-summary { background: var(--bg-3); padding: 20px; border-radius: 8px; margin-bottom: 20px; }
.checkout-summary .line { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.checkout-summary .total { font-size: 20px; font-weight: 800; color: var(--accent); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }

/* Empty states */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--accent); color: #0a0a0a; padding: 14px 28px; border-radius: 8px;
  font-weight: 700; z-index: 500; transition: transform 0.3s; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Animations */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .search-bar { display: none; }
  .hamburger { display: block; }
  .hero { min-height: 70vh; }
  .hero-stats { gap: 24px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .nutrition-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .snacks-banner { grid-template-columns: 1fr; }
  .modal-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; right: -100%; }
  .newsletter-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
}
