/* ==========================================================================
   STREAMPULSE E-COMMERCE: MODERN MULTI-THEME CSS STYLESHEET
   ========================================================================== */

/* 1. Core Variables & Default Theme Colors (HSL Palettes) */
:root {
  --font-primary: 'Outfit', sans-serif;
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.15);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  /* Dynamic brand overrides injected by JS */
  --brand-primary: #00e676;
  --brand-secondary: #ffb900;
  --brand-primary-rgb: 0, 230, 118;
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* 2. Theme Variations */

/* ================== GLASSMORPHISM THEME ================== */
body.theme-glass {
  --bg-body: #0d121d;
  --bg-card: rgba(22, 28, 45, 0.6);
  --bg-header: rgba(13, 18, 29, 0.7);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(14px);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  background-image: radial-gradient(circle at 10% 20%, rgba(var(--brand-primary-rgb), 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(var(--brand-primary-rgb), 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}
body.theme-glass .service-card, 
body.theme-glass .checkout-drawer,
body.theme-glass .modal-card,
body.theme-glass .recharge-sim-card,
body.theme-glass .wallet-status-banner {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}
body.theme-glass .store-header {
  background: var(--bg-header);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
}

/* ================== MODERN DARK THEME ================== */
body.theme-dark {
  --bg-body: #090d16;
  --bg-card: #131a26;
  --bg-header: #0f1520;
  --text-main: #e2e8f0;
  --text-muted: #64748b;
  --border-color: #222d3d;
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
body.theme-dark .service-card,
body.theme-dark .checkout-drawer,
body.theme-dark .modal-card,
body.theme-dark .recharge-sim-card,
body.theme-dark .wallet-status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius-md);
}
body.theme-dark .store-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
}

/* ================== ELEGANT LIGHT THEME ================== */
body.theme-light {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}
body.theme-light .service-card,
body.theme-light .checkout-drawer,
body.theme-light .modal-card,
body.theme-light .recharge-sim-card,
body.theme-light .wallet-status-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius-md);
}
body.theme-light .store-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
body.theme-light .nav-link,
body.theme-light .mobile-cat-btn {
  color: var(--text-muted);
}
body.theme-light .nav-link:hover,
body.theme-light .mobile-cat-btn:hover {
  color: var(--text-main);
}

/* ================== MODERN BENTO GRID THEME ================== */
body.theme-bento {
  --bg-body: #0d0e12;
  --bg-card: #15161c;
  --bg-header: #15161c;
  --text-main: #f1f2f6;
  --text-muted: #747d8c;
  --border-color: #2f3542;
  --card-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
  --border-radius-md: 22px;
}
body.theme-bento .service-card,
body.theme-bento .checkout-drawer,
body.theme-bento .modal-card,
body.theme-bento .recharge-sim-card,
body.theme-bento .wallet-status-banner {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius-md);
}
body.theme-bento .store-header {
  background: var(--bg-header);
  border: 2px solid var(--border-color);
  border-radius: 18px;
  margin: 15px auto;
  width: 95%;
  max-width: 1400px;
}
body.theme-bento .products-grid {
  grid-gap: 24px;
}
body.theme-bento .service-card {
  padding: 10px;
}


/* 3. Base Buttons & Form Inputs Utility Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}
.btn-primary {
  background: var(--brand-primary);
  color: #000;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--brand-primary-rgb), 0.4);
}
.btn-accent {
  background: var(--brand-secondary);
  color: #000;
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 185, 0, 0.4);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--border-color);
}
.btn-discord {
  background: #5865F2;
  color: #fff;
}
.btn-discord:hover {
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.input-icon-group {
  position: relative;
  width: 100%;
}
.input-icon-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.input-icon-group input, 
.input-icon-group select, 
.input-icon-group textarea {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}
.input-icon-group input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(var(--brand-primary-rgb), 0.2);
}


/* 4. Global Loaders & Overlays */
.global-loading-screen {
  position: fixed;
  inset: 0;
  background: #090c15;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #fff;
  transition: opacity 0.5s ease;
}
.loader-circle {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.1);
  border-left-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}
.global-loading-screen h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.global-loading-screen p {
  color: #747d8c;
  font-size: 0.9rem;
}

.overlay-barrier {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}
.maintenance-card {
  max-width: 500px;
  padding: 40px;
  text-align: center;
  border-radius: var(--border-radius-md);
  background: #121824;
  border: 1px solid rgba(255,255,255,0.08);
}
.logo-glow {
  font-size: 3.5rem;
  color: #ff3838;
  margin-bottom: 20px;
  animation: glow-pulse 2s infinite;
}
.maintenance-card h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.maintenance-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 30px;
}


/* 5. Header / Navigation Styles */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 0;
}
.store-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.logo-cube {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-sm);
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(var(--brand-primary-rgb), 0.3);
}
.store-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-nav {
  display: flex;
  gap: 20px;
}
.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-smooth);
}
.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb), 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.search-box {
  position: relative;
}
.search-box input {
  padding: 8px 12px 8px 36px;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  outline: none;
  font-family: var(--font-primary);
  width: 180px;
  transition: var(--transition-smooth);
}
.search-box input:focus {
  width: 240px;
  border-color: var(--brand-primary);
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.icon-btn-badge {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}
.icon-btn-badge:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--brand-primary);
}
.icon-btn-badge .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-primary);
  color: #000;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.user-nav-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.user-nav-profile:hover {
  border-color: var(--brand-primary);
}
.user-nav-profile span {
  font-size: 0.9rem;
  font-weight: 600;
}
.user-nav-profile i {
  color: var(--brand-primary);
}


/* 6. Hero / Store Banner Styles */
.store-hero {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
  background: #0f1423;
  margin-bottom: 40px;
}
.hero-glow-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(var(--brand-primary-rgb), 0.15) 0%, transparent 60%);
}
.hero-container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-content {
  max-width: 650px;
}
.badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 185, 0, 0.1);
  color: var(--brand-secondary);
  border: 1px solid rgba(255, 185, 0, 0.2);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 40%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 30px;
}
.hero-metrics {
  display: flex;
  gap: 30px;
}
.metric {
  display: flex;
  flex-direction: column;
}
.metric .num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-primary);
}
.metric .label {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}


/* 7. Catalog & Cards Styles */
.store-main-layout {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  margin-bottom: 80px;
}
.mobile-categories-row {
  display: none;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.mobile-categories-row::-webkit-scrollbar {
  display: none;
}
.mobile-cat-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.mobile-cat-btn.active {
  background: var(--brand-primary);
  color: #000;
  border-color: var(--brand-primary);
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.catalog-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.catalog-count {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-gap: 20px;
}

/* Card design styling */
.service-card {
  padding: 16px;
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.card-image-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
  background: rgba(0,0,0,0.2);
}
.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .card-image-box img {
  transform: scale(1.08);
}
.badge-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
}
.badge-vip-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--brand-secondary);
  color: #000;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.card-price-box {
  display: flex;
  flex-direction: column;
}
.card-price-box .price-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.card-price-box .price-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}
body.theme-light .card-price-box .price-num {
  color: var(--text-main);
}
.card-stock-status {
  position: absolute;
  bottom: 62px;
  right: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green { background: #00e676; }
.dot.red { background: #ff3838; }


/* 8. Slide-out Cart Sidebar drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.checkout-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-overlay.active .checkout-drawer {
  right: 0;
}
.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.close-btn:hover {
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.cart-empty-message {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}
.cart-empty-message i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--border-color);
}
.cart-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.cart-item-img {
  width: 70px;
  height: 50px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  background: rgba(0,0,0,0.2);
}
.cart-item-info {
  flex: 1;
}
.cart-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.cart-item-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary);
}
.cart-item-qty {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  align-self: center;
}
.cart-item-remove:hover {
  color: #ff3838;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
}
.coupon-section {
  margin-bottom: 16px;
}
.coupon-input-group {
  display: flex;
  gap: 8px;
}
.coupon-input-group input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: #fff;
  outline: none;
  font-family: var(--font-primary);
  font-size: 0.85rem;
}
.coupon-feedback {
  font-size: 0.75rem;
  margin-top: 6px;
  font-weight: 500;
}
.coupon-feedback.success { color: #00e676; }
.coupon-feedback.error { color: #ff3838; }

.price-calculations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.calc-row.discount {
  color: #00e676;
}
.calc-row.highlight {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
body.theme-light .calc-row.highlight {
  color: var(--text-main);
}

.security-disclaimer {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* 9. Modal Windows Styles (Detail, Auth, Dashboard) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.hidden {
  display: none;
}
@keyframes premium-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.modal-card {
  width: 100%;
  border-radius: 20px !important;
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: premium-zoom-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  background: rgba(18, 24, 38, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 100px rgba(var(--brand-primary-rgb), 0.03) !important;
}
body.theme-light .modal-card {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08) !important;
}
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

.modal-header {
  padding: 24px 28px !important;
  border-bottom: 1px solid var(--border-color) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: relative !important;
  min-height: 70px !important;
}
.modal-header h3 {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
body.theme-light .modal-header h3 {
  color: #0f172a !important;
}
.modal-header .badge-category {
  position: static !important;
  margin: 0 !important;
  display: inline-block !important;
}
.modal-body {
  padding: 28px !important;
  overflow-y: auto;
  flex: 1;
}

/* Close Button Premium Positioning & Styling */
.close-btn {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.15rem !important;
  cursor: pointer !important;
  transition: var(--transition-smooth) !important;
  z-index: 10 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.close-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: scale(1.05) rotate(90deg) !important;
}
body.theme-light .close-btn {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}
body.theme-light .close-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
}

/* Custom premium scrollbar for modals and feeds */
.modal-body::-webkit-scrollbar,
.modal-reviews-section::-webkit-scrollbar,
.dash-content-pane::-webkit-scrollbar,
.purchases-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.modal-body::-webkit-scrollbar-track,
.modal-reviews-section::-webkit-scrollbar-track,
.dash-content-pane::-webkit-scrollbar-track,
.purchases-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb,
.modal-reviews-section::-webkit-scrollbar-thumb,
.dash-content-pane::-webkit-scrollbar-thumb,
.purchases-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: var(--transition-smooth);
}
.modal-body::-webkit-scrollbar-thumb:hover,
.modal-reviews-section::-webkit-scrollbar-thumb:hover,
.dash-content-pane::-webkit-scrollbar-thumb:hover,
.purchases-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--brand-primary-rgb), 0.3);
}
.modal-body,
.modal-reviews-section,
.dash-content-pane,
.purchases-table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Product Detail modal layout */
.product-split-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-gap: 30px;
}
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.2);
}
.stock-level-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.product-info-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stars {
  color: #ffb900;
  display: flex;
  gap: 2px;
  font-size: 0.95rem;
}
.rating-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.price-box-card {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.15);
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
}
.price-box-card .price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.price-box-card .price-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-primary);
}
.product-desc-box h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.product-desc-box p {
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: pre-line;
}
.delivery-notice-alert {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 185, 0, 0.05);
  border: 1px solid rgba(255, 185, 0, 0.15);
  display: flex;
  gap: 12px;
  color: var(--brand-secondary);
  font-size: 0.85rem;
  text-align: left;
}
.delivery-notice-alert i {
  font-size: 1.25rem;
  margin-top: 2px;
}

/* Reviews Feed inside modal */
.modal-reviews-section {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  background: rgba(0,0,0,0.1);
  max-height: 250px;
  overflow-y: auto;
  text-align: left;
}
.modal-reviews-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.review-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
}
.review-content {
  flex: 1;
}
.review-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 8px;
}
.review-comment {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.review-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 16px 0;
}


/* 10. Customer Dashboard Panel Tab Layout */
.dashboard-grid-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 500px;
  padding: 0;
}
.dash-sidebar {
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.client-info-dash {
  text-align: center;
}
.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--brand-primary);
  margin: 0 auto 12px auto;
  border: 2px solid var(--border-color);
}
.client-info-dash h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 50px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.dash-menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-tab-link {
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}
.dash-tab-link:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
}
.dash-tab-link.active {
  background: rgba(var(--brand-primary-rgb), 0.1);
  color: var(--brand-primary);
}

.dash-content-pane {
  padding: 30px;
  overflow-y: auto;
  text-align: left;
}
.dash-tab-content {
  display: none;
}
.dash-tab-content.active {
  display: block;
}

.wallet-status-banner {
  padding: 24px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.wallet-balance-box span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.wallet-balance-box h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-primary);
}
.wallet-perks {
  max-width: 300px;
}
.wallet-perks h5 {
  font-weight: 700;
  margin-bottom: 4px;
}
.wallet-perks p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.recharge-sim-card {
  padding: 24px;
  border-radius: var(--border-radius-md);
}
.recharge-sim-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.recharge-sim-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.recharge-row-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.amount-presets {
  display: flex;
  gap: 8px;
}
.preset-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-family: var(--font-primary);
  font-weight: 600;
  transition: var(--transition-smooth);
}
.preset-btn.active, .preset-btn:hover {
  background: var(--brand-primary);
  color: #000;
  border-color: var(--brand-primary);
}
.custom-amount-group {
  display: flex;
  gap: 10px;
}
.custom-amount-group input {
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  color: #fff;
  outline: none;
  font-family: var(--font-primary);
  width: 90px;
  font-weight: 600;
}
.recharge-alert-message {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  background: rgba(0, 230, 118, 0.1);
  color: #00e676;
}

/* Purchases listing table */
.purchases-table-wrapper {
  margin-top: 20px;
}
.purchase-card-item {
  padding: 20px;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.purchase-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}
.purchase-title {
  font-size: 1rem;
  font-weight: 700;
}
.purchase-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.purchase-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.purchase-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.credentials-box-copy {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(0,0,0,0.3);
  font-family: monospace;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a0aec0;
}
.credentials-box-copy code {
  color: #00e676;
  font-weight: 600;
}
.credentials-box-copy button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.credentials-box-copy button:hover {
  color: #fff;
}
.review-form-box {
  border-top: 1px dashed var(--border-color);
  padding-top: 12px;
}
.rating-selector-stars {
  display: flex;
  gap: 6px;
  font-size: 1.15rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 8px;
}
.rating-selector-stars i.active {
  color: #ffb900;
}
.review-form-input {
  display: flex;
  gap: 8px;
}
.review-form-input input {
  flex: 1;
  padding: 6px 12px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: #fff;
  outline: none;
}


/* 11. Auth Modal Tab Toggles */
.auth-tabs-toggle {
  display: flex;
  gap: 12px;
}
.auth-toggle-btn {
  background: transparent;
  border: none;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  padding-bottom: 4px;
  transition: var(--transition-smooth);
}
.auth-toggle-btn.active {
  color: var(--text-main);
}
.auth-toggle-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-primary);
}
.auth-form-block.hidden {
  display: none;
}
.auth-feedback-alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 14px 0;
  text-align: left;
}
.auth-feedback-alert.error {
  background: rgba(255, 56, 56, 0.1);
  color: #ff3838;
}


/* 12. Toast Notification card */
.toast-card {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  padding: 12px 24px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fade-in-up 0.3s ease forwards;
}
.toast-card.hidden {
  display: none;
}
.toast-icon {
  color: #00e676;
}
.toast-message {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}


/* 13. Footer Styles */
.store-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: rgba(0,0,0,0.1);
}
.footer-container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-brand {
  text-align: center;
}
.footer-brand h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.foot-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}
.foot-link:hover {
  color: var(--brand-primary);
}
.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}


/* 14. Helper Utility classes & Keyframe animations */
.hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fade-in-up {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes glow-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 56, 56, 0.4)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(255, 56, 56, 0.7)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 56, 56, 0.4)); }
}

/* Responsive breakdowns */
@media (max-width: 992px) {
  .product-split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 12px 0;
  }
  .store-nav {
    display: none;
  }
  .mobile-categories-row {
    display: flex;
  }
  .search-box {
    display: none;
  }
  .hero-content h1 {
    font-size: 2.25rem;
  }
  .dashboard-grid-layout {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    gap: 16px;
  }
  .dash-menu-links {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .dash-menu-links::-webkit-scrollbar { display: none; }
  .dash-tab-link {
    flex-shrink: 0;
    width: auto;
    padding: 6px 12px;
  }
}

/* ================== STANDALONE LOAD ERROR SCREEN ================== */
body.store-load-error {
  background: radial-gradient(circle at center, #161224 0%, #0d0e12 100%) !important;
  background-image: radial-gradient(circle at center, #161224 0%, #0d0e12 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

body.store-load-error .overlay-barrier {
  position: relative;
  background: transparent !important;
  backdrop-filter: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

body.store-load-error .maintenance-card {
  max-width: 480px;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 24px !important;
  backdrop-filter: blur(20px) !important;
  padding: 45px 35px !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* Premium Storefront Maintenance Mode Styles */
.maintenance-badge {
  background: rgba(255, 185, 0, 0.1);
  color: #ffb900;
  border: 1px solid rgba(255, 185, 0, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px rgba(255, 185, 0, 0.05);
}

.maintenance-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand-primary);
  box-shadow: 0 0 25px var(--brand-primary-glow);
  margin: 0 auto 20px auto;
  display: block;
}

.maintenance-date-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.maintenance-date-box span {
  font-weight: 700;
  color: var(--brand-primary);
}
