/* ==========================================================================
   JonWorld E-Commerce Design System & Stylesheet
   Modern, Mobile-First, Highly Responsive with CSS Custom Properties
   ========================================================================== */

:root {
  /* Brand Theme Colors (Easily customizable in one place) */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e40af;
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);

  /* Layout */
  --container-max: 1240px;
  --header-height: 72px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

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

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   TOP BAR & HEADER
   ========================================================================== */

.top-bar {
  background-color: var(--secondary);
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a {
  color: #cbd5e1;
}

.top-bar a:hover {
  color: #ffffff;
}

.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  letter-spacing: -0.5px;
}

.logo-brand .brand-dot {
  color: var(--primary);
}

.header-search {
  flex: 1;
  max-width: 540px;
  position: relative;
}

.header-search form {
  display: flex;
  align-items: center;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 11px 48px 11px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  background-color: var(--bg-muted);
  outline: none;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.header-search input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.header-search button:hover {
  background-color: var(--primary-hover);
}

/* Autocomplete search results dropdown */
.search-results-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 1010;
  display: none;
}

.search-results-dropdown.active {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background-color: var(--bg-muted);
}

.search-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.search-item-info {
  flex: 1;
}

.search-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.search-item-price {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 700;
}

/* Header Action Icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.action-btn svg {
  width: 22px;
  height: 22px;
}

.badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: var(--radius-full);
  padding: 0 4px;
}

/* Navigation Menu */
.main-nav {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 6px 0;
  display: inline-block;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
}

/* ==========================================================================
   HERO BANNER SLIDER
   ========================================================================== */

.hero-slider-section {
  padding: 24px 0 10px;
}

.hero-slider-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: #0f172a;
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 420px;
}

.hero-slide.active {
  display: flex;
  align-items: center;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: brightness(0.85);
}

.hero-slide-content {
  position: relative;
  z-index: 10;
  padding: 60px 40px;
  max-width: 650px;
  color: #ffffff;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin-bottom: 28px;
  line-height: 1.5;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background: #ffffff;
  width: 32px;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  color: #ffffff;
}

.btn-outline {
  border-color: var(--border-color);
  background-color: #ffffff;
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.0625rem;
  border-radius: var(--radius-md);
}

.btn-block {
  display: flex;
  width: 100%;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info    { background: var(--primary-light); color: var(--primary); }

/* ==========================================================================
   SECTIONS & GRIDS
   ========================================================================== */

.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  display: block;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.category-card img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  margin: 0 auto 12px;
  object-fit: cover;
  background: var(--bg-muted);
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.category-card span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-focus);
}

.product-card-thumb {
  position: relative;
  padding-top: 85%;
  background: var(--bg-muted);
  overflow: hidden;
}

.product-card-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.badge-sale {
  background: var(--danger);
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.badge-featured {
  background: var(--accent);
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.badge-out-of-stock {
  background: #475569;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.wishlist-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  z-index: 5;
  transition: var(--transition);
}

.wishlist-toggle-btn:hover,
.wishlist-toggle-btn.active {
  color: var(--danger);
  background: #ffffff;
  transform: scale(1.1);
}

.product-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  margin-bottom: 12px;
}

.stars {
  color: #f59e0b;
  display: inline-flex;
}

.rating-count {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.old-price {
  font-size: 0.875rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.discount-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.product-card-actions {
  display: flex;
  gap: 8px;
}

.product-card-actions .btn {
  flex: 1;
}

/* Feature/Value Props Section */
.features-banner {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 36px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-text h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.feature-text p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Promotional CTA Banner */
.promo-strip {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
}

.promo-strip-content h3 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.promo-strip-content p {
  color: #cbd5e1;
  font-size: 1rem;
}

/* Newsletter Section */
.newsletter-section {
  background: var(--secondary);
  color: white;
  padding: 50px 0;
}

.newsletter-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.newsletter-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.newsletter-info p {
  color: #94a3b8;
  font-size: 0.9375rem;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 480px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid #334155;
  background: #1e293b;
  color: white;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--primary);
}

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

.site-footer {
  background-color: #0b1120;
  color: #94a3b8;
  padding: 60px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contact p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-link {
  width: 36px;
  height: 36px;
  background: #1e293b;
  color: #cbd5e1;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
}

/* ==========================================================================
   PRODUCT DETAILS PAGE
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 16px 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gallery-main {
  position: relative;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.thumb-item.active,
.thumb-item:hover {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-col h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.meta-row strong {
  color: var(--text-main);
}

.detail-price-box {
  background: var(--bg-muted);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-price-box .price-current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.detail-price-box .price-regular {
  font-size: 1.125rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.stock-in { color: var(--success); }
.stock-out { color: var(--danger); }
.stock-low { color: var(--warning); }

.short-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.purchase-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
}

.quantity-stepper button {
  width: 40px;
  height: 44px;
  background: var(--bg-muted);
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quantity-stepper button:hover {
  background: #e2e8f0;
}

.quantity-stepper input {
  width: 50px;
  height: 44px;
  border: none;
  text-align: center;
  font-weight: 700;
  outline: none;
  -moz-appearance: textfield;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Feature Spec Table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.specs-table th,
.specs-table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  text-align: left;
}

.specs-table th {
  background: var(--bg-muted);
  font-weight: 600;
  width: 35%;
  color: var(--text-main);
}

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

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  align-items: start;
}

.cart-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  background: var(--bg-muted);
  padding: 14px 18px;
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
}

.cart-table td {
  padding: 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.cart-product-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-product-cell img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
}

.cart-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  padding-top: 14px;
  border-top: 2px dashed var(--border-color);
  margin-top: 14px;
}

.coupon-box {
  margin: 18px 0;
  padding: 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.coupon-input-group {
  display: flex;
  gap: 8px;
}

.coupon-input-group input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.875rem;
  text-transform: uppercase;
}

/* Checkout Multi-Step */
.checkout-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.checkout-step.active {
  color: var(--primary);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.checkout-step.active .step-num {
  background: var(--primary);
  color: white;
}

.address-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.address-radio-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.address-radio-card:hover,
.address-radio-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.payment-option-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-option-card:hover,
.payment-option-card.selected {
  border-color: var(--primary);
  background: #f8faff;
}

/* ==========================================================================
   FORMS & CONTROLS
   ========================================================================== */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  outline: none;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-col {
  flex: 1;
  min-width: 220px;
}

/* Card / Box Containers */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: #1e293b;
  color: #ffffff;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  animation: slideIn 0.3s ease forwards;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error   { border-left: 4px solid var(--danger); }
.toast.toast-info    { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   CUSTOMER ACCOUNT DASHBOARD
   ========================================================================== */

.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
  margin: 32px 0;
}

.account-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 0;
  box-shadow: var(--shadow-sm);
}

.account-user-card {
  padding: 0 20px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.account-nav-list {
  list-style: none;
  padding-top: 12px;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.account-nav-link:hover,
.account-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

/* Order timeline */
.tracking-timeline {
  display: flex;
  justify-content: space-between;
  margin: 28px 0;
  position: relative;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.timeline-point {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 3px solid var(--border-color);
  margin: 0 auto 8px;
}

.timeline-step.completed .timeline-point {
  border-color: var(--success);
  background: var(--success);
}

.timeline-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Customer Account Sidebar & Incomes Showcase */
.sidebar-incomes-card {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 4px;
}

.sidebar-incomes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sidebar-balances-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-balance-box {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-balance-box.wallet-box {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.sidebar-balance-box.total-box {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.sidebar-balance-box .box-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.sidebar-balance-box .box-val {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
}

.sidebar-balance-box .box-action-link {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
  text-decoration: none;
}

.sidebar-balance-box .box-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-income-streams {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-income-streams .stream-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 6px 0 4px;
}

.sidebar-income-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  transition: all 0.15s ease;
}

.sidebar-income-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.sidebar-income-item .income-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-income-item .income-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.sidebar-income-item .dot-passive  { background: #ef4444; }
.sidebar-income-item .dot-referral { background: #3b82f6; }
.sidebar-income-item .dot-level    { background: #10b981; }
.sidebar-income-item .dot-royalty  { background: #f59e0b; }
.sidebar-income-item .dot-saving   { background: #8b5cf6; }
.sidebar-income-item .dot-direct   { background: #06b6d4; }

.sidebar-income-item .income-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.sidebar-income-item .income-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sidebar-income-item .income-amt {
  font-size: 0.85rem;
  font-weight: 800;
  color: #059669;
}

.mobile-sidebar-toggle-btn {
  display: none;
}

/* Catalog, Checkout, and Form Grids */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.mobile-filter-bar {
  display: none;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.customer-info-grid {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.order-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 24px;
  align-items: start;
}

.withdrawal-grid,
.contact-grid,
.order-success-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Mobile Navigation Drawer */
.mobile-nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.2);
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.mobile-drawer-close {
  background: #f1f5f9;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-drawer-close:hover {
  background: #e2e8f0;
}

.mobile-drawer-search {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-search form {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mobile-drawer-search input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 0.875rem;
  outline: none;
}

.mobile-drawer-search button {
  background: none;
  border: none;
  padding: 0 12px;
  font-size: 0.95rem;
  cursor: pointer;
}

.mobile-user-card {
  padding: 14px 18px;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
}

.mobile-guest-actions {
  padding: 16px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
}

.mobile-nav-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--text-main);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mobile-nav-list li a:hover,
.mobile-nav-list li a.active {
  background: #f1f5f9;
  color: var(--primary);
}

.mobile-nav-heading {
  padding: 14px 18px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.mobile-drawer-footer {
  padding: 16px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

/* Mobile Bottom Navigation Dock */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cart-layout,
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
  .catalog-layout {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .catalog-sidebar {
    display: none;
  }
  .catalog-sidebar.active {
    display: block;
    animation: fadeIn 0.25s ease;
  }
  .mobile-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
  }
  .checkout-layout,
  .order-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 64px; /* Space for mobile bottom nav dock */
  }

  .top-bar {
    display: none;
  }

  /* Header mobile friendly layout */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .header-inner {
    height: auto;
    padding: 8px 0;
    gap: 10px;
    flex-wrap: wrap;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    cursor: pointer;
    order: 1;
  }

  .logo-brand {
    order: 2;
    font-size: 1.25rem;
  }

  .header-actions {
    order: 3;
    margin-left: auto;
    gap: 10px;
  }

  .header-actions .action-btn {
    padding: 6px;
  }

  .header-search {
    order: 4;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
  }

  .main-nav {
    display: none;
  }

  .hide-mobile {
    display: none !important;
  }

  /* Mobile Bottom Navigation Dock */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 9998;
    justify-content: space-around;
    align-items: center;
    padding: 2px 4px;
  }

  .mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 600;
    flex: 1;
    padding: 5px 0;
    transition: color 0.15s ease;
  }

  .mobile-bottom-item:hover,
  .mobile-bottom-item.active {
    color: var(--primary);
    font-weight: 700;
  }

  .mobile-income-pill-icon {
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Customer Account Layout & Sidebar on Mobile */
  .account-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }

  .mobile-sidebar-toggle-btn {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  .account-sidebar-content {
    display: none;
  }

  .account-sidebar-content.active {
    display: block;
    margin-top: 12px;
    animation: fadeIn 0.25s ease;
  }

  .account-sidebar {
    padding: 12px 14px;
    background: #ffffff;
  }

  .withdrawal-grid,
  .contact-grid,
  .order-success-grid,
  .customer-info-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Tables horizontal scrolling protection */
  .mlm-table,
  .cart-table,
  .admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero-slide {
    min-height: 280px;
  }

  .hero-slide-content {
    padding: 24px 16px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  /* 2-Column Product Grid on Mobile Phones (Amazon/Flipkart Style) */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .product-card-thumb img {
    height: 155px !important;
  }

  .product-card-body {
    padding: 10px !important;
  }

  .product-title {
    font-size: 0.8125rem !important;
    height: 34px !important;
    line-height: 1.3 !important;
  }

  .product-price-row {
    margin: 4px 0 !important;
  }

  .current-price {
    font-size: 0.95rem !important;
  }

  .old-price {
    font-size: 0.75rem !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .banner-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-balances-grid {
    grid-template-columns: 1fr;
  }
}
