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

:root {
  --bg:       #070d1a;
  --surface:  #0d1526;
  --card-bg:  #0f1a2e;
  --border:   rgba(255,255,255,0.06);
  --text:     #e8eef8;
  --muted:    #7a8aa0;
  --accent:   #3b82f6;
  --accent2:  #06b6d4;
  --success:  #22c55e;
  --danger:   #ef4444;
  --radius:   14px;
  --shadow:   0 8px 40px rgba(0,0,0,0.5);
  --max:      1140px;
  --font:     'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
input, select, button { font-family: inherit; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 28px; border-radius: 50px; border: none; cursor: pointer;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text); font-weight: 600; font-size: 15px;
  padding: 12px 28px; border-radius: 50px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(59,130,246,.07); }
.full-width { width: 100%; }
.mt8 { margin-top: 8px; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e3a5f; color: var(--text); padding: 12px 24px; border-radius: 50px;
  font-weight: 600; font-size: 14px; z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Navbar ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px;
  background: rgba(7,13,26,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.navbar.scrolled { background: rgba(7,13,26,0.95); }
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  height: 68px; display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: var(--text);
  white-space: nowrap;
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #fff;
}
.nav-search {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 50px; padding: 8px 16px;
  max-width: 400px; transition: border-color .2s;
}
.nav-search:focus-within { border-color: var(--accent); }
.nav-search svg { color: var(--muted); flex-shrink: 0; }
.nav-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 14px;
}
.nav-search input::placeholder { color: var(--muted); }
.nav-links { display: flex; gap: 6px; }
.nav-link {
  padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 50px;
  padding: 8px 14px; color: var(--text); cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center;
}
.cart-btn:hover { background: rgba(59,130,246,.12); border-color: var(--accent); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; min-width: 20px; height: 20px;
  border-radius: 50px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid var(--bg);
}

/* ─── Hero ─── */
.hero-section {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -40px;
  background: url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?w=1600&q=80') center/cover no-repeat;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7,13,26,0.88) 0%, rgba(7,13,26,0.60) 100%);
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 100px 24px 60px; max-width: 700px;
}
.hero-eyebrow {
  display: inline-block; background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3); color: var(--accent2);
  padding: 6px 18px; border-radius: 50px; font-size: 13px; font-weight: 600;
  letter-spacing: .06em; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(42px, 7vw, 80px); font-weight: 800;
  line-height: 1.1; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 36px;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 52px; }
.hero-cta { font-size: 16px; padding: 14px 36px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 26px; font-weight: 800; }
.stat span { color: var(--muted); font-size: 13px; }

/* ─── Features strip ─── */
.features-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.features-strip .container {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-around;
}
.feature { display: flex; align-items: center; gap: 16px; }
.feature-icon { font-size: 30px; line-height: 1; }
.feature strong { display: block; font-weight: 700; font-size: 15px; }
.feature p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ─── Shop section ─── */
.shop-section { padding: 80px 0; }
.shop-header { text-align: center; margin-bottom: 40px; }
.shop-header h2 { font-size: 36px; font-weight: 800; }
.shop-sub { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* Filters */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
}
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-pill {
  padding: 7px 18px; border-radius: 50px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.cat-pill.active, .cat-pill:hover {
  background: rgba(59,130,246,0.15); border-color: var(--accent); color: var(--text);
}
.filter-controls { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.price-filter label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 6px; }
.price-filter input[type=range] {
  width: 140px; accent-color: var(--accent);
}
.sort-select {
  background: rgba(255,255,255,0.04); border: 1.5px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: 10px; font-size: 13px;
  cursor: pointer; outline: none;
}
.sort-select:focus { border-color: var(--accent); }

/* ─── Product grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-color: rgba(59,130,246,0.3);
}
.card-img-wrap { position: relative; overflow: hidden; height: 220px; }
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-sale { background: var(--danger); color: #fff; }
.badge-new  { background: var(--success); color: #fff; }
.badge-hot  { background: #f97316; color: #fff; }
.card-wishlist {
  position: absolute; top: 12px; right: 12px;
  background: rgba(7,13,26,0.7); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: background .2s;
  opacity: 0; transition: opacity .2s;
}
.product-card:hover .card-wishlist { opacity: 1; }
.card-wishlist:hover { background: rgba(239,68,68,0.2); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-category { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent2); }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--text); }
.card-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.stars { color: #f5b941; }
.rating-count { color: var(--muted); }
.card-price-row { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.card-price { font-size: 20px; font-weight: 800; color: var(--text); }
.card-orig  { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.card-actions { display: flex; gap: 8px; margin-top: 4px; }
.card-actions .btn-primary { flex: 1; font-size: 13px; padding: 10px 12px; border-radius: 10px; }
.card-actions .btn-ghost   { font-size: 13px; padding: 10px 12px; border-radius: 10px; }

/* ─── Empty state ─── */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 60px; margin-bottom: 16px; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }

/* ─── Promo banner ─── */
.promo-banner {
  background: linear-gradient(135deg, #0f2460, #0a3b52);
  border-top: 1px solid rgba(59,130,246,0.2);
  border-bottom: 1px solid rgba(59,130,246,0.2);
  padding: 56px 0;
}
.promo-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.promo-inner h2 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.promo-inner p { color: var(--muted); }
.highlight { color: #facc15; }

/* ─── Footer ─── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-bottom: 48px; }
.footer-brand { max-width: 260px; }
.footer-logo { font-size: 22px; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: border-color .2s, background .2s;
}
.social-links a:hover { border-color: var(--accent); background: rgba(59,130,246,.1); }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.fl-col { display: flex; flex-direction: column; gap: 10px; }
.fl-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.fl-col a { font-size: 14px; color: var(--text); opacity: .7; transition: opacity .2s; }
.fl-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center; padding: 20px;
  font-size: 13px; color: var(--muted);
}

/* ─── Cart drawer ─── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1100; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.active { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 95vw;
  background: var(--surface); z-index: 1200;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-header h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cart-count-label {
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
}
.drawer-close {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); width: 36px; height: 36px; border-radius: 50%;
  font-size: 16px; cursor: pointer; transition: background .2s;
}
.drawer-close:hover { background: rgba(239,68,68,0.15); }
.cart-items-list { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: flex; gap: 14px; align-items: center;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
.cart-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info .ci-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.cart-item-info .ci-price { color: var(--accent2); font-weight: 700; font-size: 13px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; cursor: pointer; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.qty-btn:hover { background: rgba(59,130,246,0.2); }
.qty-val { min-width: 24px; text-align: center; font-weight: 700; font-size: 14px; }
.remove-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 18px; line-height: 1; margin-left: 4px;
  transition: color .2s;
}
.remove-btn:hover { color: var(--danger); }
.drawer-footer { padding: 20px 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.subtotal-row { display: flex; justify-content: space-between; font-size: 14px; }
.subtotal-row.muted { color: var(--muted); }
.subtotal-row.total-row { font-size: 18px; font-weight: 800; padding-top: 10px; border-top: 1px solid var(--border); }
.cart-empty-msg { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty-msg .empty-icon { font-size: 50px; margin-bottom: 12px; }

/* ─── Product modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1300; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 20px; max-width: 860px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: scale(.95); transition: transform .3s;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-close-btn {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(255,255,255,0.07); border: 1px solid var(--border);
  color: var(--text); width: 36px; height: 36px; border-radius: 50%;
  font-size: 16px; cursor: pointer; transition: background .2s;
}
.modal-close-btn:hover { background: rgba(239,68,68,0.2); }
.modal-content-body { display: flex; flex-wrap: wrap; }
.modal-img { width: 100%; max-width: 400px; height: 360px; flex-shrink: 0; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px 0 0 20px; }
.modal-info { flex: 1; padding: 36px; display: flex; flex-direction: column; gap: 14px; min-width: 260px; }
.modal-cat { font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent2); }
.modal-title { font-size: 26px; font-weight: 800; line-height: 1.2; }
.modal-rating { display: flex; align-items: center; gap: 8px; }
.modal-desc { color: var(--muted); font-size: 14px; line-height: 1.7; }
.modal-price-row { display: flex; align-items: baseline; gap: 12px; }
.modal-price { font-size: 30px; font-weight: 800; }
.modal-orig  { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.modal-tags  { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 5px 12px; border-radius: 50px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: auto; }
.modal-actions .btn-primary { flex: 1; border-radius: 12px; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 40px; }
  .modal-img { max-width: 100%; border-radius: 20px 20px 0 0; }
  .modal-img img { border-radius: 20px 20px 0 0; }
  .footer-inner { flex-direction: column; }
  .promo-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .nav-search { display: none; }
  .hero-stats { gap: 24px; }
  .filters-bar { flex-direction: column; align-items: flex-start; }
}
