@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --secondary: #f59e0b;
  --bg: #f8faf9;
  --bg-card: #ffffff;
  --bg-card-rgb: 255, 255, 255;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --glass: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(20px);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #111827;
  --bg-card: #1f2937;
  --bg-card-rgb: 31, 41, 55;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --text-light: #6b7280;
  --border: #374151;
  --border-light: #2d3748;
  --primary-light: rgba(16, 185, 129, 0.2);
  --glass: rgba(17, 24, 39, 0.8);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] #new_arrivals {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
}

[data-theme="dark"] .category-card {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .product-name {
  color: var(--text) !important;
}

[data-theme="dark"] .cat-icon {
  background: #2d3748 !important;
}

[data-theme="dark"] .section-header h2 {
  color: #ffffff !important;
}

[data-theme="dark"] .product-card,
[data-theme="dark"] .cat-product-card {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

[data-theme="dark"] .product-name,
[data-theme="dark"] .cpc-name {
  color: #ffffff !important;
}

[data-theme="dark"] .product-price,
[data-theme="dark"] .cpc-price {
  color: var(--primary) !important;
}

[data-theme="dark"] .product-brand,
[data-theme="dark"] .cpc-weight {
  color: #a0aec0 !important;
}

[data-theme="dark"] .product-img,
[data-theme="dark"] .cpc-image-wrapper {
  background-color: #ffffff !important;
}

[data-theme="dark"] .mrp-price,
[data-theme="dark"] .cpc-mrp {
  color: #718096 !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: #374151 !important;
  color-scheme: dark;
}

[data-theme="dark"] select option {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

[data-theme="dark"] input::placeholder {
  color: #a0aec0 !important;
}

[data-theme="dark"] .nav-search,
[data-theme="dark"] .app-search-bar {
  background-color: #2d3748 !important;
}

[data-theme="dark"] .cat-product-card,
[data-theme="dark"] .product-card {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .cpc-name,
[data-theme="dark"] .product-name {
  color: #ffffff !important;
}

[data-theme="dark"] .cpc-weight,
[data-theme="dark"] .product-brand {
  color: #a0aec0 !important;
}

/* Explicit Navigation Fixes */
.back-btn, .back-btn-app, .back-btn-luxury {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 100;
}

.back-btn:hover, .back-btn-luxury:hover {
  transform: translateX(-4px) scale(1.05);
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .back-btn,
[data-theme="dark"] .back-btn-luxury,
[data-theme="dark"] .back-btn-app,
[data-theme="dark"] .nav-icon,
[data-theme="dark"] .app-cart-icon svg,
[data-theme="dark"] .back-btn-app svg,
[data-theme="dark"] .back-btn-app path,
[data-theme="dark"] .back-btn-app polyline,
[data-theme="dark"] .back-btn-app line {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

[data-theme="dark"] .app-title,
[data-theme="dark"] .page-title,
[data-theme="dark"] .app-header h1,
[data-theme="dark"] .page-header h1,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #ffffff !important;
}

[data-theme="dark"] .qty-num {
  color: #ffffff !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span:not(.badge):not(.cart-badge):not(.slider):not(.discount-badge):not(.discount-tag):not(.new-badge):not(.banner-label),
[data-theme="dark"] div:not(.badge):not(.cart-badge):not(.sa-icon):not(.discount-badge):not(.discount-tag):not(.new-badge) {
  color: var(--text-muted);
}

[data-theme="dark"] .filter-pill {
  background-color: #2d3748 !important;
  border-color: #4a5568 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .filter-pill svg,
[data-theme="dark"] .filter-pill polyline,
[data-theme="dark"] .filter-pill polygon {
  stroke: #ffffff !important;
}

[data-theme="dark"] .app-header,
[data-theme="dark"] .page-header,
[data-theme="dark"] .app-filters-wrapper {
  background-color: #111827 !important;
  border-color: #374151 !important;
}

[data-theme="dark"] body {
  background-color: #111827 !important;
}

[data-theme="dark"] .order-details-card,
[data-theme="dark"] .confirm-actions,
[data-theme="dark"] .detail-section {
  background-color: var(--bg-card) !important;
  color: var(--text) !important;
}

[data-theme="dark"] .step-icon {
  background: #2d3748 !important;
  border-color: #1f2937 !important;
}

[data-theme="dark"] .tracker-line {
  background: #2d3748 !important;
}

[data-theme="dark"] .item-row {
  border-bottom-color: var(--border) !important;
}

[data-theme="dark"] .detail-section h4 {
  color: #ffffff !important;
}

.order-details-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}

.web-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  transition: max-width 0.4s ease;
}

@media (min-width: 1024px) {
  .web-container {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: start;
  }
  

}


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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  body {
    font-size: 0.85rem;
    padding-bottom: 70px;
  }

  h1 {
    font-size: 1.4rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  h3 {
    font-size: 1rem !important;
  }

  .section-header h2 {
    font-size: 1.15rem !important;
  }
}

h1,
h2,
h3,
h4,
h5 {
  font-family: 'Outfit', sans-serif;
}

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

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

/* Cleaned up duplicate dashboard styles */
.container-dashboard {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.address-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.address-item.default {
  border-left: 4px solid var(--primary);
}

[data-theme="dark"] .address-item {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .addr-text {
  color: var(--text-muted);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo span {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Desktop/Mobile Utility Classes */
.is-desktop {
  display: flex !important;
}

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

@media (max-width: 768px) {
  .is-desktop {
    display: none !important;
  }

  .is-mobile {
    display: flex !important;
  }

  .nav-container {
    gap: 12px;
  }

  .nav-logo span {
    display: none;
  }

  .nav-search {
    flex: 1;
    width: auto !important;
    margin: 0 !important;
  }
}

/* Dashboard & Identity Card */
.identity-card-modern {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.identity-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.dash-avatar {
  position: relative;
  width: 90px;
  height: 90px;
}

.dash-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

.dash-camera-btn {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.identity-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.identity-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.identity-stats {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.id-stat {
  flex: 1;
  background: var(--bg);
  padding: 15px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.id-stat:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.id-stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.id-stat-data {
  display: flex;
  flex-direction: column;
}

.id-stat-val {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.id-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Dashboard Actions Grid */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.dash-action-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: var(--transition);
  text-align: center;
}

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

.dash-setting-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  gap: 16px;
  transition: var(--transition);
}

.dash-setting-row:hover {
  border-color: var(--primary-light);
}

.ds-row-icon {
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ds-row-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.ds-row-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  gap: 8px;
  transition: var(--transition);
}

.nav-search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.nav-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
  color: var(--text);
}

.nav-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
}

.nav-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* ====== HERO ====== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 32px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.hero-cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--primary-dark);
  padding: 12px 28px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.hero-cta:hover {
  transform: translateY(+2px);
  box-shadow: var(--shadow-lg);
}

/* ====== SECTION ====== */
.section {
  padding: 20px 24px;
  width: 100%;
  box-sizing: border-box;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.section-header a {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

/* ====== CATEGORY GRID ====== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

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

.category-card .cat-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-md);
}

.category-card .cat-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

/* ====== PRODUCT GRID ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

@media (max-width: 400px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ====== PRODUCT RAIL ====== */
.product-rail {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 10px 0 24px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  align-items: stretch;
}

.product-rail::-webkit-scrollbar {
  display: none;
}

.product-rail .product-card {
  flex: 0 0 auto;
  width: 175px;
  scroll-snap-align: start;
  height: auto;
}

@media (max-width: 480px) {
  .product-rail .product-card {
    width: 145px;
  }
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

[data-theme="dark"] .product-card {
  background: rgba(31, 41, 55, 0.9);
  border-color: rgba(255, 255, 255, 0.05);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  z-index: 10;
}

.product-img {
  width: 100%;
  aspect-ratio: 1/1;
  background: #ffffff;
  padding: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-light);
  min-height: 180px;
  /* Ensure a minimum presence */
}

[data-theme="dark"] .product-img {
  background: #ffffff;
  /* Groceries usually have white backgrounds */
  opacity: 0.95;
}

.product-img img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: var(--transition);
}

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

/* Floating Add Button in image */
.cpc-add-btn-float {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  z-index: 5;
  transition: transform 0.2s ease;
}

.cpc-add-btn-float:hover {
  transform: scale(1.1);
  background: var(--primary-dark);
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  z-index: 4;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-info {
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 0.8rem;
  color: var(--text-light);
  /* Lighter gray */
  margin-bottom: 2px;
  font-weight: 600;
}

.product-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: #2d3e50;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.product-weight-selector {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

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

.product-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
}

.mrp-price {
  font-size: 0.72rem;
  color: var(--text-light);
  text-decoration: line-through;
  font-weight: 500;
}

.product-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-bookmark {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-bookmark:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--danger);
}

.add-button-wrapper {
  flex: 1;
}

.btn-add-outline {
  width: 100%;
  background: white;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 8px 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-add-outline:hover {
  background: var(--danger);
  color: white;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
  filter: brightness(90%);
}

.btn-primary:active {
  transform: scale(0.97);
}

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

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

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

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn-quick-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
  padding: 0;
}

.btn-quick-add:hover {
  transform: scale(1.15);
  background: var(--primary-dark);
  box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}

/* --- Global Quantity Controls --- */
.qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px;
  height: 34px;
  min-width: 90px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.qty-control button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.qty-control button:hover {
  background: var(--primary);
  color: #fff;
}

.qty-num {
  flex: 1;
  text-align: center;
  font-weight: 800;
  color: #1e293b;
  font-size: 0.95rem;
  padding: 0 4px;
}

[data-theme="dark"] .qty-control {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: none;
}

[data-theme="dark"] .qty-control button {
  background: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .qty-control button:hover {
  background: var(--primary);
}

/* ====== SECTION SPECIFIC STYLING ====== */
#new_arrivals {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  padding: 40px 24px;
  margin: 32px 0;
  width: 100%;
}

@media (max-width: 768px) {
  #new_arrivals {
    padding: 30px 16px;
    margin: 20px 0;
  }
}

#new_arrivals .product-card {
  background: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05);
}

#top_brands {
  padding: 40px 0;
}

.brand-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-decoration: none;
  aspect-ratio: 1 / 1.1;
  text-align: center;
  min-height: 180px;
}

.brand-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.brand-logo-container {
  width: 100%;
  height: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
}

.new-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(239, 68, 68, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 4;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* ====== PRODUCT DETAIL ====== */
.product-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.pd-image {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-light), #ecfdf5);
  aspect-ratio: 16 / 9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.pd-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Professional Full Image View */
  transition: transform 0.4s ease;
}

[data-theme="dark"] .pd-image {
  background: #ffffff !important;
  /* Force white background for product pop */
  border-color: #374151;
}

.pd-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pd-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pd-rating .stars {
  color: var(--secondary);
  font-weight: 700;
}

.pd-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

.pd-price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pd-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Delivery options */
.delivery-group {
  margin-bottom: 24px;
}

.delivery-group h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.delivery-options {
  display: flex;
  gap: 12px;
}

.delivery-option {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.delivery-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.delivery-option .del-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.delivery-option .del-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.time-slot-picker {
  margin-top: 12px;
  display: none;
}

.time-slot-picker.visible {
  display: block;
}

.time-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.time-slot {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.time-slot.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Quantity Picker */
.qty-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.qty-picker {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--border-light);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.qty-val {
  width: 48px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  background: white;
}

.running-total {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.running-total small {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.add-to-cart-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  background: var(--primary-dark);
}

.add-to-cart-btn:active {
  transform: scale(0.98);
}

/* ====== CART PAGE ====== */
.cart-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.cart-item:hover {
  border-color: var(--primary);
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

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

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 12px;
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  opacity: 0.6;
  transition: var(--transition);
}

.cart-item-remove:hover {
  opacity: 1;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.cart-empty h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Delivery selector (cart) */
.cart-delivery {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.cart-del-opt {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  background: white;
}

.cart-del-opt.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Coupon */
.coupon-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.coupon-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

.coupon-bar input:focus {
  border-color: var(--primary);
}

/* Bill */
.bill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.bill-card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}

.bill-row.muted {
  color: var(--text-muted);
}

.bill-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--border);
}

/* ====== CHECKOUT ====== */
.checkout-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}

.checkout-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.checkout-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-card {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 8px;
}

.address-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.address-label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.address-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.payment-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-option .pay-icon {
  font-size: 1.3rem;
}

.payment-option .pay-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.payment-option .pay-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.add-new-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 8px;
}

/* ====== ORDER CONFIRMATION ====== */
.confirm-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.confirm-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: confirmPop 0.5s ease;
}

@keyframes confirmPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-page h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.confirm-page .order-id {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.confirm-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.confirm-details .cd-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.confirm-details .cd-row .cd-label {
  color: var(--text-muted);
}

.confirm-details .cd-row .cd-value {
  font-weight: 600;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.confirm-actions .btn {
  flex: 1;
}

/* ====== ORDER DETAILS ====== */
.order-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.order-header h1 {
  font-size: 1.3rem;
}

.order-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Status Tracker */
.status-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin-bottom: 20px;
  position: relative;
}

.status-tracker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 48px;
  right: 48px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  position: relative;
}

.status-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border-light);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.status-step.done .status-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.status-step.current .status-dot {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.status-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
}

.status-step.done .status-label,
.status-step.current .status-label {
  color: var(--primary);
}

.status-time {
  font-size: 0.65rem;
  color: var(--text-light);
}

/* Delivery partner */
.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.partner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.partner-info {
  flex: 1;
}

.partner-name {
  font-weight: 700;
  font-size: 0.95rem;
}

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

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

.partner-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.partner-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Order items */
.order-items-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.oi-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.oi-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.oi-price {
  font-weight: 700;
  font-size: 0.9rem;
}

.order-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.order-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* ====== LOGIN MODAL (Block 1 - deferred to Block 2 below) ====== */
/* .modal-overlay and .modal-overlay.active are defined in the MODAL OVERLAY section below (line ~2840) */

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  text-align: center;
}

.modal .modal-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}

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

.social-login {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.social-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.modal-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}



/* ====== BOTTOM NAV ====== */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 5px 0;
  z-index: 100;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 3px 12px;
  position: relative;
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a .nav-dot {
  position: absolute;
  top: 0;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.bnav-icon {
  font-size: 1rem;
}

/* ====== PROFILE PAGE ====== */
.profile-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-photo-container {
  position: relative;
  width: 80px;
  height: 80px;
}

.profile-photo-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

.photo-edit-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  border: 2px solid white;
  transition: var(--transition);
}

.photo-edit-btn:hover {
  transform: scale(1.1);
  background: var(--primary-dark);
}

.profile-main-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-main-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--border-light);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ====== ADDRESSES PAGE ====== */
.addresses-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.address-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.address-item.default {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.back-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px var(--primary-light);
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ====== LOADING SPINNER ====== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 3000;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-weight: 600;
  color: var(--text-muted);
}

/* ====== BREADCRUMBS ====== */
.breadcrumbs {
  padding: 12px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 600;
}

.breadcrumbs span {
  opacity: 0.5;
}


.addr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.addr-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge {
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.addr-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.addr-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.addr-actions button {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

/* ====== ORDERS PAGE ====== */
.orders-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.order-info {
  flex: 1;
}

.order-id {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 4px;
  display: block;
}

.order-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.order-status {
  margin-top: 12px;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-placed {
  background: #fef3c7;
  color: #92400e;
}

.status-packed {
  background: #f3e8ff;
  color: #6b21a8;
}

.status-on_way {
  background: #fff7ed;
  color: #9a3412;
}

.status-delivered {
  background: #dcfce7;
  color: #166534;
}

[data-theme="dark"] .status-placed {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

[data-theme="dark"] .status-packed {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

[data-theme="dark"] .status-on_way {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

[data-theme="dark"] .status-delivered {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

/* ====== ORDER DETAILS ====== */
.order-details-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.status-tracker {
  display: flex;
  justify-content: space-between;
  margin: 32px 0;
  position: relative;
  padding: 0 10px;
}

.status-tracker::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 60px;
}

.step-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}

.step.active .step-icon {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 15px var(--primary-light);
}

.step.completed .step-icon {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

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

.detail-section {
  margin-bottom: 24px;
}

.detail-section h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.item-qty {
  color: var(--text-muted);
  width: 40px;
}

/* ====== SETTINGS OVERLAY ====== */
/* ====== SETTINGS OVERLAY ====== */
.settings-btn {
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.settings-btn:hover {
  transform: rotate(45deg);
  color: var(--primary);
}

/* ====== MODAL OVERLAY (Single Source of Truth) ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  align-items: flex-start; /* Ensure top is never cut off */
  justify-content: center;
  padding: 40px 20px; /* More space for scrolling */
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  color: var(--text);
  width: 100%;
  max-width: 460px; /* Slightly wider for better spacing */
  border-radius: 28px; /* More premium rounding */
  padding: 40px; /* More internal breathing room */
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

.modal h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.modal-sub {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}

.modal-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.modal-tab.active {
  color: var(--primary);
}

.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: white;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.5;
  transition: var(--transition);
}

.toggle-password:hover {
  opacity: 1;
}

.social-login {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
}
.auth-separator::before, .auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--border);
}
.auth-separator:not(:empty)::before { margin-right: 15px; }
.auth-separator:not(:empty)::after { margin-left: 15px; }

.btn-social-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    background: #fff;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}
.btn-social-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.btn-social-google img {
    height: 22px;
    width: 22px;
    object-fit: contain;
}

.social-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 8px 0;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.social-btns {
  display: flex;
  gap: 16px;
}

.social-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--bg);
  transform: translateY(-2px);
  border-color: var(--text-light);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.input-group-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.input-group-check label {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Modal adaptive colors */
.modal {
  background: var(--bg-card);
  color: var(--text);
}

.menu-list {
  background: var(--bg-card);
  border-color: var(--border);
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

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

.menu-item:hover {
  background: var(--bg);
}

.menu-icon {
  font-size: 1.2rem;
}

.menu-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-arrow {
  color: var(--text-light);
  font-size: 1.2rem;
}

/* ====== TOGGLE SWITCH ====== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary);
}

input:focus+.slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
  transform: translateX(20px);
}

.detail-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.address-item {
  background: var(--bg-card);
  border-color: var(--border);
}

.address-item.default {
  background: var(--primary-light);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .nav-search {
    display: flex;
    width: 200px;
    /* Slightly narrower to fit logo and actions */
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .nav-search input {
    font-size: 0.8rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .delivery-options {
    flex-direction: column;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .order-actions {
    flex-direction: column;
  }

  .status-tracker {
    padding: 20px 12px;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 64px 48px 72px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .section {
    padding: 40px 48px;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.anim-up {
  animation: slideUp 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.anim-fade {
  animation: fadeIn 0.4s ease forwards;
}

/* ====== DASHBOARD PROFILE (SCREENSHOT STYLE) ====== */
.nav-subheader {
  background: var(--bg-card);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
}

.back-link:hover {
  transform: translateX(-4px);
  color: var(--primary);
}

.back-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.container-dashboard {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Cleaned up duplicate identity card definition */
.identity-card-modern {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.identity-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.dash-avatar {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.dash-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
}

.dash-camera-btn {
  position: absolute;
  bottom: 5px;
  right: 0;
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 3px solid var(--bg-card);
  cursor: pointer;
}

.identity-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.identity-info p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.identity-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.id-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.02);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}

.id-stat:hover {
  transform: translateY(-2px);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

[data-theme="dark"] .id-stat {
  background: rgba(255, 255, 255, 0.02);
}

.id-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.id-stat-val {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.id-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.dashboard-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-action-box {
  background: var(--bg-card);
  padding: 32px 16px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.dash-action-box:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.da-box-icon {
  font-size: 2.2rem;
}

.da-box-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.8px;
}

.dashboard-card {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-light);
}

.dash-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.dash-card-title span {
  font-size: 1.2rem;
}

.dash-card-title h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.dash-settings-list {
  display: flex;
  flex-direction: column;
}

.dash-setting-row {
  display: flex;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.dash-setting-row:last-child {
  border: none;
}

.ds-row-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.ds-row-text {
  flex: 1;
}

.ds-row-title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}

.ds-row-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ds-row-arrow {
  font-size: 1.2rem;
  color: var(--text-light);
}

.dashboard-footer {
  margin-top: 32px;
  padding-bottom: 120px;
}

@media (min-width: 1024px) {
  .container-dashboard {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 32px;
    padding: 40px 24px;
    align-items: start;
  }

  .identity-card-modern {
    grid-column: 1;
    margin-bottom: 0;
  }

  .referral-card-premium,
  .dashboard-actions-grid,
  .settings-dashboard,
  .settings-actions-row,
  .dashboard-card {
    grid-column: 2;
  }

  .dashboard-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Settings Specific Screenshot Mockup Styles */
.settings-actions-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-bottom: 120px;
}

.btn-personal-info {
  flex: 1.2;
  background: var(--primary);
  /* Using primary instead of purple per prompt rules */
  color: white;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-light);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-personal-info:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px var(--primary-light);
}

.btn-personal-info:active {
  transform: scale(0.96);
}

.btn-logout-alt {
  flex: 1;
  background: var(--bg-card);
  color: #ef4444;
  border: 2px solid #ef4444;
  padding: 16px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-logout-alt:hover {
  transform: translateY(-3px) scale(1.02);
  background: #fef2f2;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.btn-logout-alt:active {
  transform: scale(0.96);
}

.ds-row-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
}

.nav-search {
  background: #f1f5f9;
  border-radius: 50px;
}

@media (max-width: 650px) {
  .settings-actions-row {
    flex-direction: column;
  }
}

@media (max-width: 650px) {
  .identity-top {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .identity-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* ====== TOAST NOTIFICATIONS ====== */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: white;
  box-shadow: var(--shadow-lg);
  padding: 12px 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  animation: toastIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  border: 2px solid transparent;
  pointer-events: auto;
}

.toast.success {
  border-color: var(--primary);
  background: #f0fdf4;
  color: #166534;
}

.toast.error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.toast.info {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
}

.toast-closing {
  animation: toastOut 0.4s ease forwards;
}

@keyframes toastIn {
  0% {
    transform: translateY(100px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-20px) scale(0.85);
    opacity: 0;
  }
}

@media (max-width: 600px) {
  .toast-container {
    width: 90%;
  }

  .toast {
    font-size: 0.85rem;
    padding: 12px 20px;
  }
}

/* ====== BANNER CARDS ====== */
.banner-offer-card {
  background: #10b981;
  /* Primary Emerald */
  border-radius: 20px;
  padding: 24px;
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.banner-content {
  z-index: 2;
}

.banner-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 1000;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 250px;
}

.banner-btn {
  background: white;
  color: #10b981;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.banner-btn:hover {
  transform: scale(1.05);
}

.banner-visual {
  position: relative;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-visual svg {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.modal-premium h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.premium-input-group {
  margin-bottom: 22px;
  position: relative;
}

.premium-input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.premium-input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 2px solid var(--border);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--bg);
  transition: all 0.3s ease;
  color: var(--text);
}

.premium-input-wrapper .input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-light);
  font-size: 1.1rem;
  pointer-events: none;
  transition: all 0.3s ease;
}

.premium-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 4px 15px var(--primary-light);
}

.premium-input-wrapper input:focus+.input-icon,
.premium-input-wrapper input:not(:placeholder-shown)+.input-icon {
  color: var(--primary);
}

.modal-actions-premium {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}

.btn-premium-save {
  flex: 1.4;
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--primary-light);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-premium-save:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px var(--primary-light);
}

.btn-premium-save:active {
  transform: scale(0.96);
}

.btn-premium-cancel {
  flex: 1;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 2px solid var(--border);
  padding: 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-premium-cancel:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-light);
}

.change-pwd-container {
  margin-top: 24px;
  text-align: center;
}

.btn-change-pwd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 10px;
}

.btn-change-pwd:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ====== LEGAL & FAQ PAGES ====== */
.legal-page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
}

.legal-header {
  text-align: center;
  margin-bottom: 48px;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-body {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.legal-toc {
  position: sticky;
  top: 100px;
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: none;
  /* Hidden on mobile */
}

@media (min-width: 1024px) {
  .legal-toc {
    display: block;
  }
}

.legal-toc h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-toc a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
  font-weight: 500;
}

.legal-toc a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.legal-content {
  flex: 1;
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
  color: var(--text);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-muted);
}

.legal-content li {
  margin-bottom: 8px;
}

/* FAQ Specific Styles */
.faq-search-wrapper {
  max-width: 600px;
  margin: 0 auto 40px;
}

.faq-search {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  gap: 12px;
  transition: var(--transition);
}

.faq-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.faq-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 1rem;
  color: var(--text);
}

.faq-chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.faq-chip {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.faq-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}

.faq-chevron {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  /* Adjust as needed */
  padding-bottom: 24px;
}

/* ====== FOOTER ====== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 80px 24px 100px;
  margin-top: 80px;
}

.footer-container {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  flex: 1.5;
  min-width: 280px;
}

.footer-brand p {
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.footer-links {
  flex: 3;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-col {
  min-width: 160px;
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 14px;
}

.footer-col a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: var(--transition);
  font-weight: 500;
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 60px;
  padding-top: 30px;
}

.footer-bottom-content {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 850px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .footer-brand {
    margin: 0 auto;
  }

  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-links {
    justify-content: center;
    text-align: center;
    gap: 40px;
  }

  .social-icons {
    justify-content: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}


@media (max-width: 768px) {
  .site-footer {
    padding-bottom: 110px;
  }
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.bottom-nav a.active {
  color: var(--primary);
}

.bnav-icon {
  font-size: 1.4rem;
}

.nav-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  border: 1px solid white;
}

/* ====== TOAST NOTIFICATIONS ====== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 300px;
  transform: translateX(120%);
  animation: toastSlideIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--primary);
}

.toast.warning {
  border-left-color: var(--secondary);
}

.toast-closing {
  animation: toastSlideOut 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes toastSlideIn {
  to {
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* ====== MOBILE APP OVERRIDES (Category Page) ====== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.back-btn-app {
  background: none;
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
}

.app-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.app-cart-icon {
  position: relative;
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 4px;
}

.app-cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.app-filters-wrapper {
  background: white;
  padding: 0 16px 16px;
  position: sticky;
  top: 110px; /* Default for pages with global navbar */
  z-index: 99;
}

/* App-style pages hide the global navbar, so they need a smaller offset */
body.category-page .app-filters-wrapper,
body.product-page .app-filters-wrapper {
  top: 60px !important;
}

@media (max-width: 768px) {
  .app-filters-wrapper {
    top: 60px; 
  }
}

.app-search-bar {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 20px;
  padding: 10px 16px;
  gap: 10px;
  margin-bottom: 12px;
}

.app-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  color: var(--text);
}

.app-filter-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
}

.app-filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f3f4f6;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-pill:active {
  background: #e5e7eb;
}

/* ====== MINIMAL PRODUCT GRID (Category Page) ====== */
.minimal-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .minimal-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.cat-product-card {
  display: flex;
  flex-direction: column;
}

.cpc-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.05;
  border-radius: 20px;
  background: #f9fafb;
  margin-bottom: 10px;
  overflow: hidden;
}

.cpc-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.cpc-placeholder {
  font-size: 3rem;
  opacity: 0.1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.cpc-add-btn {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: 4px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s;
  z-index: 2;
}

.cpc-add-btn:active {
  transform: scale(0.9);
}

.cpc-info {
  padding: 0 4px;
}

.cpc-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.cpc-weight {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.cpc-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
}

/* ====== WISHLIST STYLES ====== */
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
  color: #64748b;
}

[data-theme="dark"] .wishlist-btn {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.wishlist-btn:hover {
  transform: translateY(-2px) scale(1.1);
  color: #f43f5e;
  box-shadow: var(--shadow-md);
}

.wishlist-btn.active {
  color: #f43f5e !important;
}

.wishlist-btn.active i {
  color: #f43f5e !important;
}

.wishlist-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wishlist-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 100px;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  padding: 10px 0;
}

/* ====== WISHLIST HORIZONTAL LIST ====== */
.wishlist-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.wishlist-item-horizontal {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 12px;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.wishlist-item-horizontal:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

.wih-img {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.wih-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.wih-info {
  flex: 1;
  min-width: 0;
}

.wih-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wih-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wih-meta span.dot {
  width: 3px;
  height: 3px;
  background: #94a3b8;
  border-radius: 50%;
}

.wih-price {
  font-weight: 700;
  color: var(--primary);
}

.wih-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f43f5e;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.05);
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
}

.wih-remove:hover {
  background: #f43f5e;
  color: #fff;
  transform: scale(1.1);
}

.empty-wishlist {
  text-align: center;
  padding: 80px 20px;
}

.empty-wishlist p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Luxury Cart & Checkout Components */
.luxury-cart-page {
  background: var(--bg);
  min-height: 100vh;
}

.luxury-header {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 24px;
}

.luxury-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.cart-item-luxury {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.qty-pill-control {
  background: var(--bg) !important;
}

.qty-pill-control button {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

.luxury-cart-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

[data-theme="dark"] .luxury-cart-card,
[data-theme="dark"] .cart-item-luxury {
  background-color: var(--bg-card) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .qty-pill-control {
  background-color: #111827 !important;
}

[data-theme="dark"] .disp-addr-text {
  color: #ffffff !important;
}

[data-theme="dark"] .addr-preview-luxury button {
  background: #111827 !important;
  color: var(--primary) !important;
}

/* Container for Cart Grid */
.cart-grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 24px 100px;
}

@media (min-width: 1024px) {
  .cart-grid-container {
    grid-template-columns: 1.5fr 1fr;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
  }
}

/* Premium Profile & Referral Card Styles */
.referral-card-premium {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 24px;
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
  margin-bottom: 30px;
}

.referral-card-premium::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.referral-card-premium .ref-tag {
  background: rgba(255, 255, 255, 0.2);
  display: inline-block !important;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
  animation: pulseReferral 2s infinite;
  color: white !important;
}

@keyframes pulseReferral {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.referral-card-premium h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: white !important;
}

.referral-card-premium p {
  opacity: 0.9;
  font-size: 0.95rem;
  margin-bottom: 24px;
  color: white !important;
  max-width: 90%;
}

.ref-code-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  padding: 12px 12px 12px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.ref-code-box span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: white !important;
}

.copy-ref-btn {
  background: #ffffff;
  color: #10b981;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-ref-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.ref-stats-mini {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.ref-stat-item .rs-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 4px;
  color: white !important;
}

.ref-stat-item .rs-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: white !important;
}

.ref-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

.ref-progress-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}

.ref-progress-fill {
  height: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
  transition: width 1s ease-out;
}

.btn-whatsapp-share {
  background: #25d366;
  color: white;
  border: none !important;
  padding: 16px;
  border-radius: 16px;
  font-weight: 700;
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
  text-decoration: none;
}

.btn-whatsapp-share:hover {
  background: #128c7e;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
  color: white;
}

/* Dark mode overrides for referral */
[data-theme="dark"] .ref-stats-mini {
  background: rgba(0, 0, 0, 0.2);
}

.dash-avatar img {
  border: 4px solid var(--primary-light);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* ====== MODAL SYSTEM (deferred to single source above) ====== */
/* .modal-overlay rules consolidated into the MODAL OVERLAY section above */

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 440px;
  border-radius: 28px;
  padding: 35px;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--border-light);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.8rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--danger);
  color: white;
  transform: rotate(90deg);
}

.modal h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.modal-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.modal-tabs {
  display: flex;
  background: var(--border-light);
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 25px;
}

.modal-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.toggle-password {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-light);
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 25px 0;
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-separator::before, .auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-social-google {
  width: 100%;
  height: 52px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  color: #374151;
}

.btn-social-google:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-social-google img {
  width: 20px;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  height: 54px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

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

@media (max-width: 480px) {
  .modal {
    padding: 25px 20px;
    border-radius: 24px;
  }
}