/* ==========================================================================
   DESIGN SYSTEM & STYLESHEET - PREMIUM D2C STORE & ADMIN DASHBOARD
   ========================================================================== */

:root {
  /* Color Palette - Premium Emerald & Slate */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-glass: rgba(15, 23, 42, 0.85);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-glow: rgba(16, 185, 129, 0.25);
  
  --accent-secondary: #6366f1;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(16, 185, 129, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.9);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(16, 185, 129, 0.5);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

/* Utilities */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-highlight);
}

/* Sticky Promo Announcement Bar */
.promo-bar {
  background: linear-gradient(90deg, #059669, #10b981, #6366f1);
  color: #ffffff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 100;
}

.promo-timer {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Header & Navigation */
.main-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--accent-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-rose);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 1rem 0 1.25rem;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary) 60%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Product Showcase Grid */
.product-gallery {
  position: relative;
}

.product-main-img-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-main-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.product-thumbnails {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.thumb-btn {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-color);
  opacity: 0.7;
  transition: var(--transition);
}

.thumb-btn.active, .thumb-btn:hover {
  opacity: 1;
  border-color: var(--accent-primary);
}

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

/* Product Purchasing Box */
.purchase-box {
  padding: 2rem;
}

.price-tag-group {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 1.25rem 0;
}

.current-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-primary);
  letter-spacing: -0.03em;
}

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

.discount-pill {
  background: var(--accent-rose);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
}

/* Variant Selector */
.variant-selector {
  margin: 1.5rem 0;
}

.variant-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
}

.variant-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.variant-option-btn {
  padding: 0.85rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: var(--transition);
}

.variant-option-btn:hover, .variant-option-btn.active {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-primary);
}

/* Bundle Offers Grid */
.bundle-selector {
  margin: 1.75rem 0;
}

.bundle-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
  position: relative;
}

.bundle-card.popular {
  border-color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.08);
}

.bundle-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.bundle-radio {
  accent-color: var(--accent-primary);
  width: 18px;
  height: 18px;
}

.bundle-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bundle-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.bundle-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.bundle-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Trust Badges Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.trust-icon {
  font-size: 1.25rem;
  color: var(--accent-primary);
}

/* Social Proof & Reviews */
.reviews-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  padding: 1.75rem;
}

.review-stars {
  color: #fbbf24;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.author-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
}

.author-info span {
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Slide-Over Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

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

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

.cart-title {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-btn {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.free-shipping-progress {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  width: 70%;
  transition: width 0.4s ease;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

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

.cart-item-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.cart-item-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.2rem 0 0.5rem;
}

.cart-item-price-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.qty-btn {
  width: 28px;
  height: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.qty-val {
  padding: 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}

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

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
}

/* Modal Checkout */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* Admin Dashboard Trigger */
.admin-badge-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 150;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.3);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.admin-badge-trigger:hover {
  transform: scale(1.05);
  border-color: var(--accent-secondary);
  color: #fff;
}

.admin-panel-modal {
  max-width: 920px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-card h6 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.stat-card .stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.3rem;
}

.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--accent-primary);
  margin-top: 0.2rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Responsiveness */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .reviews-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .variant-options {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* WhatsApp Live Customer Support Widget */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: #ffffff;
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 998;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

/* Social Proof Toast Notification */
.social-proof-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 997;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 340px;
}

.social-proof-toast.active {
  transform: translateY(0);
  opacity: 1;
}

/* Sticky Mobile Purchasing Bar */
.sticky-mobile-buy-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  z-index: 996;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
  .sticky-mobile-buy-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .whatsapp-float-btn {
    bottom: 80px;
    right: 16px;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
  }
}

