:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --accent: #06b6d4;
  --sale: #ef4444;
  --sale-bg: #fee2e2;
  --success: #10b981;
  --warning: #f59e0b;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --soft: #f8fafc;
  --card: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.94);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 14px 35px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: #1e1b4b;
  --ink: #f8fafc;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --line: #1e293b;
  --bg: #090d16;
  --soft: #0f172a;
  --card: #131d31;
  --header-bg: rgba(9, 13, 22, 0.94);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 35px rgba(0, 0, 0, 0.6);
  --sale-bg: #450a0a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

.container {
  width: min(1240px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

/* Announcement Top Bar */
.announcement-bar {
  background: linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b);
  color: #e0e7ff;
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 16px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.announcement-bar .badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.announcement-bar .promo-code {
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  color: #fef08a;
  cursor: pointer;
  border: 1px dashed rgba(254, 240, 138, 0.5);
}


/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
  user-select: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.brand span span { color: var(--primary); }
.brand-flag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

/* Search Bar */
.search-wrapper {
  flex: 1;
  max-width: 540px;
  position: relative;
}
.search {
  height: 44px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  transition: var(--transition);
  padding: 0 14px;
}
.search:focus-within {
  border-color: var(--primary);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.search-icon {
  color: var(--muted);
  font-size: 16px;
  margin-right: 8px;
}
.search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  width: 100%;
}
.search input::placeholder { color: var(--muted); }
.search-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  display: none;
  padding: 4px;
}
.search-clear.show { display: block; }

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.icon-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}
.icon-btn:hover {
  background: var(--soft);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.icon-btn.icon-only {
  width: 42px;
  padding: 0;
  justify-content: center;
  font-size: 17px;
}
.count-badge {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-btn .count-badge { background: #ef4444; }

/* Category Nav Bar */
.nav-wrapper {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.nav {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-cat {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-cat:hover {
  background: var(--soft);
  color: var(--primary);
}
.nav-cat.active {
  background: var(--primary-light);
  color: var(--primary);
}
[data-theme="dark"] .nav-cat.active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}
.sale-nav-link {
  margin-left: auto;
  color: var(--sale);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--sale-bg);
  transition: var(--transition);
  white-space: nowrap;
}
.sale-nav-link:hover {
  filter: brightness(0.95);
  transform: scale(1.02);
}

/* Hero Section */
.hero {
  padding: 48px 0 36px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  width: fit-content;
  margin-bottom: 18px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.hero-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 900;
  margin-bottom: 20px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 12px;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}
.btn-secondary {
  background: var(--soft);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover {
  background: var(--line);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn-full { width: 100%; }

.trust-row {
  display: flex;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.trust-item {
  display: flex;
  flex-direction: column;
}
.trust-item strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.trust-item span {
  font-size: 12px;
  color: var(--muted);
}

/* Hero Spotlight / Flash Deal Card */
.hero-spotlight { position: relative; }
.flash-deal-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.flash-deal-card:hover {
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.16);
  border-color: rgba(99, 102, 241, 0.4);
}
.deal-top-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.countdown-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
[data-theme="dark"] .countdown-box {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.countdown-digits {
  font-family: monospace;
  font-size: 13px;
}
.spotlight-img-wrap {
  width: 100%;
  height: 250px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--soft);
  margin-bottom: 18px;
}
.spotlight-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.flash-deal-card:hover .spotlight-img-wrap img { transform: scale(1.05); }
.spotlight-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ef4444;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}
.spotlight-info h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.spotlight-pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.spotlight-pricing .current {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
}
.spotlight-pricing .original {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.spotlight-pricing .savings {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}
.stock-bar-wrap { margin-bottom: 16px; }
.stock-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 5px;
}
.stock-labels b { color: #ef4444; }
.stock-progress {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.stock-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  width: 78%;
  border-radius: 99px;
}

/* Value Props / Benefits Bar */
.benefits-section { padding: 16px 0 32px; }
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.benefit-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--line);
}
.benefit-card:last-child { border-right: none; }
.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
[data-theme="dark"] .benefit-icon {
  background: rgba(99, 102, 241, 0.18);
}
.benefit-text h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}
.benefit-text p {
  font-size: 11.5px;
  color: var(--muted);
}

/* Generic Section Styles */
.section { padding: 44px 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
}
.section-subtitle {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 6px;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* Deals Strip */
.deals-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.deal-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.deal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.deal-card-img {
  width: 100%;
  height: 180px;
  position: relative;
  background: var(--soft);
  overflow: hidden;
}
.deal-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.deal-card:hover .deal-card-img img { transform: scale(1.06); }
.discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}
.deal-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.deal-card-body .cat {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.deal-card-body h3 {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.deal-prices .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.deal-prices .old {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

/* Shop Layout & Filters */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* Filter Sidebar */
.filters-sidebar {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 140px;
  box-shadow: var(--shadow-sm);
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 18px;
}
.filter-head h3 {
  font-size: 15px;
  font-weight: 800;
}
.btn-reset-filters {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-reset-filters:hover { text-decoration: underline; }

.filter-group {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}
.filter-group h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.filter-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}
.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 99px;
}
.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-input-box {
  display: flex;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  width: 50%;
}
.price-input-box span {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
.price-input-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}

/* Category Chips Bar */
.chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.chips-bar::-webkit-scrollbar { display: none; }
.chip {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 99px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}

/* Shop Controls Bar */
.shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.result-counter {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
.result-counter strong { color: var(--ink); }
.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort-box label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.sort-select {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.sort-select:focus { border-color: var(--primary); }

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.35);
}
.card-media {
  position: relative;
  width: 100%;
  height: 220px;
  background: var(--soft);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .card-media img { transform: scale(1.07); }

/* Card Floating Actions */
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.product-badge.sale {
  background: #ef4444;
  color: #ffffff;
}
.product-badge.hot {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
}
.wish-heart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 2;
  cursor: pointer;
}
.wish-heart-btn:hover {
  transform: scale(1.1);
  color: #ef4444;
}
.wish-heart-btn.active {
  color: #ef4444;
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Card Content */
.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.product-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 12px;
}
.star-icons {
  color: #f59e0b;
  font-size: 12px;
  letter-spacing: 1px;
}
.rating-num {
  font-weight: 700;
  color: var(--ink);
}
.review-count { color: var(--muted); }
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}
.product-price {
  font-size: 21px;
  font-weight: 900;
  color: var(--ink);
}
.product-old-price {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: line-through;
}
.shipping-badge {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.card-btn-group {
  display: flex;
  gap: 8px;
}
.btn-card-view {
  flex: 1;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  transition: var(--transition);
}
.btn-card-view:hover { background: var(--line); }
.btn-card-add {
  flex: 1.4;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-card-add:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-card-add.added { background: #10b981; }

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 16px;
}

/* How It Works Section */
.how-section {
  background: var(--soft);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.step-card:hover {
  transform: translateX(4px);
  border-color: var(--primary);
}
.step-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-light);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .step-num {
  background: rgba(99, 102, 241, 0.2);
}
.step-content h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}
.step-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Testimonials / Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.review-card .stars {
  color: #f59e0b;
  font-size: 14px;
  margin-bottom: 12px;
}
.review-card p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.author-meta h5 {
  font-size: 13px;
  font-weight: 700;
}
.author-meta small {
  font-size: 11px;
  color: #10b981;
  font-weight: 600;
}

/* Newsletter Section */
.newsletter-banner {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px;
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.newsletter-text h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.newsletter-text p {
  color: #cbd5e1;
  font-size: 14px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  width: 100%;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  font-size: 13.5px;
}
.newsletter-form input::placeholder { color: #94a3b8; }
.newsletter-form button {
  background: #06b6d4;
  color: #0f172a;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.newsletter-form button:hover { background: #22d3ee; }

/* Footer */
footer {
  background: var(--card);
  border-top: 1.5px solid var(--line);
  margin-top: 40px;
}
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  max-width: 320px;
  margin: 14px 0 20px;
}
.payment-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pay-pill {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--soft);
  color: var(--muted);
}
.footer-col h4 {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--ink);
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer-col a:hover {
  color: var(--primary);
  transform: translateX(2px);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  font-size: 12px;
  color: var(--muted);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 50;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  right: -460px;
  top: 0;
  height: 100vh;
  width: min(460px, 100%);
  background: var(--card);
  z-index: 60;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
}
.cart-drawer.open { right: 0; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1.5px solid var(--line);
}
.drawer-head h3 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-close {
  border: none;
  background: var(--soft);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-close:hover { background: var(--line); }

/* Shipping Goal Bar */
.shipping-goal-bar {
  background: var(--soft);
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
}
.shipping-goal-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}
.goal-progress {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #10b981);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.cart-items-wrap {
  padding: 18px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item-thumb {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  background: var(--soft);
  overflow: hidden;
}
.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.cart-item-info .price {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}
.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--line); }
.qty-num {
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.cart-item-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
}
.cart-item-remove:hover { color: #ef4444; }

.cart-footer {
  border-top: 1.5px solid var(--line);
  padding: 20px 24px;
  background: var(--card);
}
.promo-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.promo-input-row input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
}
.promo-input-row button {
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin: 10px 0 16px;
}
.checkout-guarantee {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.modal.show { display: grid; }
.modal-dialog {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  width: min(880px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modal-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: var(--line);
  transform: rotate(90deg);
}

/* Product Detail Modal */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
}
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-main-img {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  background: var(--soft);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
}
.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.detail-main-img:hover img { transform: scale(1.08); }
.detail-info {
  display: flex;
  flex-direction: column;
}
.detail-cat {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.detail-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
}
.detail-price-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--soft);
  border-radius: 10px;
}
.detail-price {
  font-size: 30px;
  font-weight: 900;
  color: var(--primary);
}
.detail-old-price {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.detail-save-pill {
  font-size: 12px;
  font-weight: 800;
  color: #ef4444;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 6px;
}
[data-theme="dark"] .detail-save-pill {
  background: rgba(239, 68, 68, 0.25);
}
.detail-desc {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
}
.detail-specs-table {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12.5px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  padding-right: 12px;
}
.spec-row span { color: var(--muted); }
.spec-row strong { color: var(--ink); }

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

/* Checkout Modal */
.checkout-dialog { max-width: 620px; }
.checkout-header { margin-bottom: 20px; }
.checkout-header h2 {
  font-size: 24px;
  font-weight: 800;
}
.checkout-header p {
  color: var(--muted);
  font-size: 13px;
}
.prefill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
}
[data-theme="dark"] .prefill-bar {
  background: rgba(99, 102, 241, 0.15);
}
.prefill-bar span {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
.btn-prefill {
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.checkout-field.full { grid-column: 1 / -1; }
.checkout-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}
.checkout-field input, .checkout-field select {
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  outline: none;
  font-size: 13px;
  transition: var(--transition);
}
.checkout-field input:focus {
  border-color: var(--primary);
  background: var(--bg);
}

.payment-method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.pay-tab {
  flex: 1;
  border: 1.5px solid var(--line);
  background: var(--soft);
  padding: 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.pay-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
[data-theme="dark"] .pay-tab.active {
  background: rgba(99, 102, 241, 0.2);
}

.paypal-box {
  background: #ffc439;
  color: #003087;
  font-weight: 900;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 18px;
  letter-spacing: -0.02em;
  transition: var(--transition);
  margin-bottom: 12px;
}
.paypal-box:hover { filter: brightness(0.96); }

/* Order Success Screen */
.success-screen {
  text-align: center;
  padding: 20px 0;
}
.success-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}
.success-screen h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.success-screen p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 20px;
}
.order-pill {
  display: inline-block;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 24px;
}

/* Wishlist Drawer */
.wishlist-drawer {
  position: fixed;
  left: -460px;
  top: 0;
  height: 100vh;
  width: min(460px, 100%);
  background: var(--card);
  z-index: 60;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
}
.wishlist-drawer.open { left: 0; }

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}
.toast-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.toast-content { flex: 1; }
.toast-content strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.toast-content small {
  font-size: 11.5px;
  color: #cbd5e1;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 32px 0 20px;
  }
  .flash-deal-card {
    max-width: 500px;
    margin: 0 auto;
  }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .benefit-card:nth-child(2) { border-right: none; }
  .benefit-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .deals-strip { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .how-section {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    gap: 28px;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container { width: calc(100% - 28px); }
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }
  .search-wrapper {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .hero h1 { font-size: 34px; }
  .benefits-grid { grid-template-columns: 1fr; }
  .benefit-card {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
  }
  .benefit-card:last-child { border-bottom: none; }
  .deals-strip { grid-template-columns: 1fr; }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-media { height: 160px; }
  .product-detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-main-img { height: 260px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .newsletter-banner {
    flex-direction: column;
    padding: 28px 20px;
    text-align: center;
  }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom .container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .modal-dialog { padding: 24px 18px; }
  .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; }
}
