/* css/main.css */

:root {
  /* Colors */
  --primary: #B76E79; /* Elegant Rose Gold */
  --primary-dark: #96515D;
  --secondary: #111111; /* Deep Charcoal/Black */
  --accent: #F8D7DA; /* Soft Pink */
  --bg: #FFF8F8; /* Off White */
  --white: #FFFFFF;
  --text: #222222;
  --muted: #6B7280; /* Darkened for better contrast */
  --border: #E5E7EB;
  
  /* Status Colors */
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --info: #2563EB;

  /* Typography */
  --font-sans: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Borders & Shadows */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 15px rgba(183, 110, 121, 0.05);
  --shadow-lg: 0 10px 25px rgba(183, 110, 121, 0.12);
  --focus-ring: 0 0 0 3px rgba(183, 110, 121, 0.3);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Layers */
  --z-below: -1;
  --z-normal: 1;
  --z-above: 10;
  --z-dropdown: 100;
  --z-sticky: 1000;
  --z-modal-backdrop: 1001;
  --z-modal: 1002;
  --z-toast: 10000;
}

/* --- RESET & ACCESSIBILITY --- */
html {
  box-sizing: border-box;
  overflow-x: clip; /* SCROLL FIX: Prevents horizontal overflow without locking vertical scroll */
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh; /* SCROLL FIX: Allows body to grow and scroll naturally */
  overflow-x: clip; 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

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

/* Safety rule to ensure file inputs are never globally broken */
input[type="file"] {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect User Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- UTILITY CLASSES --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.hidden, .d-none {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- UI STATES (Loading, Empty, Error) --- */
.loading-state, .empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl) var(--spacing-md);
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.loading-state i, .empty-state i, .error-state i {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.error-state {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: none;
}

.toast {
  background: var(--white);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  border-left: 4px solid var(--primary);
  animation: slideInRight 0.3s ease forwards;
}

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

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

/* --- HEADER --- */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo Alignment */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  transition: var(--transition);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  gap: 4px;
}

.logo-esio { color: var(--primary); }
.logo-med { color: var(--secondary); }

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 500px;
}

.search-bar form {
  display: flex;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.search-bar button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

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

.nav-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary);
  position: relative;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-action-btn svg, .nav-action-btn i {
  width: 22px;
  height: 22px;
  font-size: 1.2rem;
}

.nav-action-btn:hover {
  color: var(--primary);
  background: rgba(183, 110, 121, 0.05);
}

/* Real-time Cart Badge & Pop Animation */
.cart-btn-container {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.cart-badge.badge-pop {
  animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes badgePop {
  0% { transform: scale(0.6); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary);
  width: 24px;
  height: 24px;
}

/* --- CATEGORY NAVIGATION BAR --- */
.category-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav .container {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
}

.category-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  position: relative;
  padding-bottom: 4px;
}

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

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

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

/* --- AMBIENT MEDIA HERO SECTION --- */
.hero-section {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: var(--z-below);
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.85) 0%, rgba(17, 17, 17, 0.5) 50%, rgba(17, 17, 17, 0.8) 100%);
  z-index: var(--z-normal);
}

.hero-content {
  position: relative;
  z-index: var(--z-above);
  max-width: 650px;
  padding: 0 var(--spacing-md);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 28px;
  line-height: 1.6;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(183, 110, 121, 0.3);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-hero:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(183, 110, 121, 0.4);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- SECTIONS --- */
.section {
  padding: 64px 0;
}

.section-blue { background: rgba(183, 110, 121, 0.03); }
.section-gray { background: #FAFAFA; }

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

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary);
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.section-header a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.section-header a:hover {
  background: rgba(183, 110, 121, 0.05);
  gap: 8px;
}

/* --- PRODUCT GRID & CARD --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(183, 110, 121, 0.15);
}

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: var(--z-above);
}

.badge {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-sale {
  background: var(--danger);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* Dual-Image Hover Reveal */
.product-card-image {
  display: block;
  position: relative;
  padding-top: 125%; /* 4:5 Aspect Ratio */
  background: #F3F4F6;
  overflow: hidden;
}

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

.product-card-image .img-secondary {
  opacity: 0;
}

.product-card:hover .product-card-image .img-primary {
  opacity: 0;
  transform: scale(1.02);
}

.product-card:hover .product-card-image .img-secondary {
  opacity: 1;
  transform: scale(1.02);
}

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

.product-card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card-name a:hover {
  color: var(--primary);
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-card-footer {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Advanced Loading Spinners for Buttons */
.btn-add-cart,
.btn-buy-now,
.btn-load-more,
.btn-sidebar-logout {
  position: relative;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  border: none;
}

.btn-add-cart {
  background: var(--accent);
  color: var(--primary-dark);
}

.btn-add-cart svg, .btn-add-cart i {
  width: 14px;
  height: 14px;
  font-size: 14px;
}

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

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

.btn-buy-now:hover {
  background: var(--primary-dark);
}

/* Button Loading Spinner State */
.btn-loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}

.btn-loading svg,
.btn-loading i,
.btn-loading span {
  opacity: 0 !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-top: -8px;
  margin-left: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 0.6s linear infinite;
  z-index: 2;
}

.btn-add-cart.btn-loading::after {
  border: 2px solid rgba(183, 110, 121, 0.3);
  border-top-color: var(--primary);
}

/* --- SKELETON LOADING STATES --- */
.skeleton-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 4/5;
}

.skeleton-text {
  height: 16px;
  width: 100%;
}

.skeleton-text.short {
  width: 60%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
  display: block;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(183, 110, 121, 0.1);
}

.category-card-image {
  position: relative;
  padding-top: 100%;
  background: #F3F4F6;
  overflow: hidden;
}

.category-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.category-card:hover .category-card-image img {
  transform: scale(1.06);
}

.category-card-body {
  padding: 12px;
}

.category-card-body h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- PROMO BANNERS --- */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.promo-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  aspect-ratio: 4/3;
}

.promo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.promo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: var(--white);
}

.promo-banner-overlay h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.promo-banner-overlay p {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 12px;
}

.btn-white {
  background: var(--white);
  color: var(--secondary);
  align-self: flex-start;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

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

/* --- USER-GENERATED CONTENT (UGC) GRID --- */
.section-ugc {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ugc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.ugc-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.ugc-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.ugc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(183, 110, 121, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.ugc-overlay i {
  color: var(--white);
  font-size: 24px;
  transform: scale(0.8);
  transition: var(--transition);
}

.ugc-item:hover img {
  transform: scale(1.05);
}

.ugc-item:hover .ugc-overlay {
  opacity: 1;
}

.ugc-item:hover .ugc-overlay i {
  transform: scale(1);
}

/* --- LOAD MORE BUTTONS --- */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.btn-load-more {
  background: var(--white);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 12px 28px;
  font-size: 14px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-load-more:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* --- FOOTER --- */
.footer {
  background: var(--secondary);
  color: #9CA3AF;
  padding: 64px 0 24px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: #1F2937;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.footer-social a:hover {
  background: var(--primary);
}

.footer-social svg, .footer-social i {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.footer-column h4 {
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
}

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

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #9CA3AF;
}

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

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

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: #9CA3AF;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* --- FLOATING WHATSAPP --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: var(--white);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

.whatsapp-float svg, .whatsapp-float i {
  width: 32px;
  height: 32px;
  font-size: 32px;
  fill: currentColor;
}

/* --- MOBILE DRAWER MENU --- */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal-backdrop);
  backdrop-filter: blur(4px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--white);
  z-index: var(--z-modal);
  box-shadow: 4px 0 15px rgba(0,0,0,0.1);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  left: 0;
}

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

.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close i, .mobile-menu-close svg {
  font-size: 1.2rem;
}

.mobile-menu-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
}

.mobile-menu-link svg, .mobile-menu-link i {
  width: 20px;
  height: 20px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
  background: var(--accent);
  color: var(--primary-dark);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.mobile-menu-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-left: 12px;
  margin-bottom: 8px;
}

/* Sidebar Logout Button */
.mobile-menu-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--white);
}

.btn-sidebar-logout {
  width: 100%;
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FEE2E2;
  padding: 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-sidebar-logout:hover {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-sidebar-logout svg, .btn-sidebar-logout i {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ugc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .ugc-item:last-child {
    display: none;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .search-bar,
  .nav-action-desktop {
    display: none;
  }
  .header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
  }
  .logo {
    display: flex;
    align-items: center;
  }
  .nav-actions {
    margin-left: auto;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .promo-banners {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .category-nav {
    display: none;
  }
  .hero-section {
    height: 50vh;
    min-height: 350px;
  }
  .hero-title {
    font-size: 32px;
  }
  .ugc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card-footer {
    padding: 0 8px 12px;
    gap: 4px;
  }
  .btn-add-cart, .btn-buy-now {
    padding: 8px 4px;
    font-size: 11px;
  }
  .ugc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
