/* ========== VARIABLES ========== */
:root {
  --primary: #1a1a1a;
  --primary-dark: #000000;
  --primary-light: #d4d4d4;

  --primary-glow: rgba(0, 0, 0, 0.08);
  
  --dark: #1a1a1a;
  --dark-2: #2a2a2a;
  --dark-3: #3a3a3a;
  
  --light: #f5f0eb;
  --light-2: #ede6de;
  --light-3: #ddd5cb;
  
  --gray: #8a7f73;
  --gray-light: #a89f94;
  --gray-dark: #5c5349;
  
  --success: #4a7c59;
  --warning: #b8860b;
  --error: #b33a3a;
  --info: #4a6a8a;

  --toast-bg: #1a1a1a;
  --toast-text: #ffffff;
  --toast-error-bg: #dc3545;
  --toast-error-text: #ffffff;
  --toast-success-bg: #28a745;
  --toast-success-text: #ffffff;
  --toast-warning-bg: #ffc107;
  --toast-warning-text: #212529;
  --toast-info-bg: #17a2b8;
  --toast-info-text: #ffffff;

  --chat-button-bg: #f97316;
  --chat-icon: #ffffff;
  --chat-window-bg: #ffffff;
  --chat-header-bg: #1a1a1a;
  --chat-header-text: #ffffff;
  --chat-header-close: #ffffff;
  --chat-user-bg: #1a1a1a;
  --chat-user-text: #ffffff;
  --chat-bot-bg: #f0ece7;
  --chat-bot-text: #1a1a1a;
  --chat-input-bg: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Manrope', sans-serif;
  
  --transition-fast: 150ms;
  --transition: 250ms;
  --transition-slow: 350ms;
  
  --header-height: 80px;
}

/* ========== PAGE SYSTEM ========== */
.page { display: none; }
.page.active { display: block; animation: fadePage 0.4s ease; }
@keyframes fadePage { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

[data-theme="dark"] {
  --primary: #e0e0e0;
  --primary-dark: #ffffff;
  --primary-light: #3a3a3a;
  
  --dark: #f0ebe5;
  --dark-2: #e0d8d0;
  --dark-3: #c8bfb4;
  
  --light: #1a1816;
  --light-2: #2a2622;
  --light-3: #3a3530;
  
  --gray: #8a7f73;
  --gray-light: #6b6258;
  --gray-dark: #a89f94;

  --toast-bg: #2a2a2a;
  --toast-text: #f0ebe5;
  --toast-error-bg: #dc3545;
  --toast-error-text: #ffffff;
  --toast-success-bg: #28a745;
  --toast-success-text: #ffffff;
  --toast-warning-bg: #ffc107;
  --toast-warning-text: #212529;
  --toast-info-bg: #17a2b8;
  --toast-info-text: #ffffff;

  --chat-button-bg: #f97316;
  --chat-icon: #ffffff;
  --chat-window-bg: #ffffff;
  --chat-header-bg: #1a1a1a;
  --chat-header-text: #ffffff;
  --chat-header-close: #ffffff;
  --chat-user-bg: #1a1a1a;
  --chat-user-text: #ffffff;
  --chat-bot-bg: #f0ece7;
  --chat-bot-text: #1a1a1a;
  --chat-input-bg: #ffffff;
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: #fbfaf7;
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

.container,
.shop-layout {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* ========== PRELOADER ========== */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--light);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
}

.preloader-logo {
  width: 340px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

.preloader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--light-3);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 1rem auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== CUSTOM CURSOR ========== */
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  z-index: 9999;
  transition: all 0.08s linear;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  opacity: 0.5;
  transition: all 0.15s ease-out;
}

@media (max-width: 768px) {
  .cursor-dot,
  .cursor-outline {
    display: none;
  }
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  font-size: 1.25rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  background: var(--primary-dark);
}

/* ========== MODE TOGGLE ========== */
.mode-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 48px;
  height: 48px;
  background: var(--dark);
  color: var(--light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  font-size: 1.25rem;
}

.mode-toggle:hover {
  transform: scale(1.05);
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  z-index: 9999;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
  .toast {
    white-space: normal;
    text-align: center;
    max-width: 90%;
  }
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--toast-error-bg);
  color: var(--toast-error-text);
}

.toast.success {
  background: var(--toast-success-bg);
  color: var(--toast-success-text);
}

.toast.warning {
  background: var(--toast-warning-bg);
  color: var(--toast-warning-text);
}

.toast.info {
  background: var(--toast-info-bg);
  color: var(--toast-info-text);
}

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(var(--light-rgb, 248, 250, 252), 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-3);
  transition: all var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .nav-container {
    padding: 0 1.5rem;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
  }
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--dark);
}

.logo-icon {
  color: var(--primary);
  font-size: 1.75rem;
}

.logo-text {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--primary);
  color: var(--light);
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  letter-spacing: normal;
  font-family: var(--font-sans);
}

.logo-img {
  height: 60px;
  width: auto;
  display: block;
}

.footer-brand .logo .logo-img {
  height: 64px;
  filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .logo-img {
    height: 48px;
  }
}

/* Search Bar */
.nav-search {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.nav-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 1rem;
}

.nav-search input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1.5px solid var(--light-3);
  border-radius: 50px;
  background: var(--light-2);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.nav-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--light-3);
}

.search-result-item:hover {
  background: var(--light-2);
}

.search-result-emoji {
  font-size: 1.5rem;
}

.search-result-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.search-result-info p {
  font-size: 0.75rem;
  color: var(--gray);
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  background: none;
  border: none;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  border-radius: 50px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-link i {
  font-size: 1rem;
}

.nav-link:hover {
  background: var(--light-2);
  color: var(--dark);
}

.nav-link.active {
  background: var(--primary);
  color: var(--light);
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown.guest .dropdown-menu { display: none; }
.nav-dropdown.guest .dropdown-arrow { display: none; }
.nav-dropdown::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  right: 0;
  height: 1.25rem;
}
.nav-dropdown .nav-link {
  padding-right: 1rem;
}
.dropdown-arrow {
  font-size: 0.6rem !important;
  margin-left: -0.1rem;
  transition: transform 0.3s;
}
.nav-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--light);
  border: 1px solid var(--light-3);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.2s;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.dropdown-menu button,
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  text-decoration: none;
}
.dropdown-menu button:hover,
.dropdown-menu a:hover {
  background: var(--light-2);
}
.dropdown-menu button i,
.dropdown-menu a i {
  width: 1.1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray);
}
.dropdown-menu button:hover i,
.dropdown-menu a:hover i {
  color: var(--primary);
}
.dropdown-divider {
  height: 1px;
  background: var(--light-3);
  margin: 0.35rem 0.5rem;
}

/* Cerrar sesion del dropdown de cuenta: rojo visible en claro y oscuro.
   En oscuro --error (#b33a3a) se pierde contra el fondo --light, asi que
   se usa un rojo claro especifico del tema. */
.dropdown-menu .dropdown-logout {
  color: var(--error);
  font-weight: 600;
}
.dropdown-menu .dropdown-logout i {
  color: var(--error);
}
.dropdown-menu .dropdown-logout:hover i {
  color: var(--error);
}
[data-theme="dark"] .dropdown-menu .dropdown-logout,
[data-theme="dark"] .dropdown-menu .dropdown-logout i,
[data-theme="dark"] .dropdown-menu .dropdown-logout:hover i {
  color: #ff8a8a;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 0.6rem;
  border-radius: 50%;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--dark);
}

.cart-icon:hover {
  background: var(--light-2);
}

.cart-icon i {
  font-size: 1.25rem;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  color: var(--light);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--light);
    flex-direction: column;
    padding: 2rem;
    transition: left var(--transition);
    z-index: 999;
  }
  
  .nav-links.open {
    left: 0;
  }
  
  .nav-link {
    width: 100%;
    justify-content: center;
    padding: 1rem;
  }
  
  .nav-dropdown {
    width: 100%;
  }
  .nav-dropdown .nav-link {
    justify-content: center;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0.25rem 0.5rem;
    min-width: auto;
    background: transparent;
    display: none;
  }
  .nav-dropdown.open .dropdown-menu {
    display: block;
  }
  .dropdown-menu button,
  .dropdown-menu a {
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  .dropdown-divider {
    margin: 0.25rem 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-search {
    max-width: none;
  }
}

/* ========== HERO PREMIUM ========== */
.hero-premium {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, var(--primary-glow) 0%, transparent 50%);
  opacity: 0.3;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: linear-gradient(135deg, transparent 0%, var(--primary-light) 100%);
  opacity: 0.1;
  transform: rotate(15deg);
  border-radius: 50%;
}

.hero-content {
  flex: 1;
  padding: 4rem 2rem;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--primary-glow);
  border: 1px solid var(--primary);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #4a4038;
  max-width: 500px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* ========== SHOP HERO (banner "Nuestra Tienda") ========== */
/* Hero compacto de tienda */
.shop-hero {
  position: relative;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #4dd0c8, #7ee8dc);
  border-radius: 0 0 32px 32px;
  margin-bottom: 2rem;
}

.shop-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: #1D1D1F;
  margin: 0 0 0.75rem;
  max-width: 720px;
  margin-inline: auto;
}

.shop-hero-subtitle {
  font-size: 1rem;
  color: #6b6b6b;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 780px;
  margin: 0 auto;
}

.shop-hero .shop-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: #f4f2ee;
  border: 1.5px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  color: #1D1D1F;
  cursor: pointer;
  transition: .2s ease;
}

.shop-hero .shop-chip:hover {
  background: #ebe8e2;
  transform: translateY(-1px);
}

.shop-hero .shop-chip.active {
  background: #1D1D1F;
  color: #fff;
  border-color: #1D1D1F;
}

/* Burbujas y estrellas solo dentro del hero turquesa */
.shop-hero .burbuja,
.shop-hero .estrella {
  display: block;
  opacity: 0.5;
  z-index: 0;
}
.shop-hero .estrella {
  animation-play-state: running;
}
.shop-hero-title,
.shop-hero-subtitle,
.shop-chips {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: var(--dark);
  color: #ffffff;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--dark-2);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  padding: 1rem 2rem;
  border: 2px solid var(--light-3);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
  border: 1px solid var(--light-3);
  background: var(--light-2);
  color: var(--dark);
}

.btn-sm:hover {
  background: var(--light-3);
}

.btn-secondary {
  background: var(--light-2);
  color: var(--dark);
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--light-3);
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.9rem;
  font-family: var(--font-sans);
}

.btn-secondary:hover {
  background: var(--light-3);
}

/* ========== WHY BLUMMSKIN ========== */
.hero-why {
  margin-top: 3.25rem;
  text-align: center;
  width: 100%;
}

.hero-why-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.hero-why-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--dark);
  margin-bottom: 1.75rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.why-item {
  background: #FFFFFF;
  border: 1px solid #F1F1F1;
  border-radius: 20px;
  padding: 2rem 1.25rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.why-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #f4f1fb;
  color: #6D4AFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1.1rem;
}

.why-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1D1D1F;
  margin: 0;
}

@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== CATEGORIES ========== */
.categories {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-dark);
  background: var(--primary-glow);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
}

.section-title .highlight {
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
}

.section-title .highlight::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  background: var(--light-2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.category-card:hover::before {
  opacity: 0.1;
}

.category {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: 20px;
  background: linear-gradient(180deg, #FFFFFF, #FAFAFA);
  overflow: hidden;
  color: #1D1D1F;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid #F1F1F1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
  transition: .25s ease;
  min-height: 100px;
}

.category:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .10);
  border-color: #E5E5E5;
}

.category .icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #f4f1fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: .3s ease;
}

.category .icon img {
  width: 65%;
  height: 65%;
  object-fit: contain;
}

.category .icon i {
  font-size: 22px;
  color: #6D4AFF;
}

.category:hover .icon {
  transform: scale(1.08);
}

.category .category-body {
  flex: 1 1 auto;
  min-width: 0;
}

.category .title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1D1D1F;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.category .subtitle {
  font-size: 0.82rem;
  color: #7A7A7A;
  line-height: 1.4;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category .arrow {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #F7F7F7;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #1D1D1F;
  font-size: 16px;
  font-weight: 700;
  transition: .25s ease;
}

.category:hover .arrow {
  transform: translateX(4px);
  background: #6D4AFF;
  color: #FFFFFF;
}

.category::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 180%;
  left: -120px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.05), transparent);
  transform: rotate(20deg);
  transition: 1s;
  pointer-events: none;
}

.category:hover::before {
  left: 100%;
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .category { padding: 1rem 1.25rem; }
  .category .title { font-size: 1.05rem; }
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.category-card p {
  font-size: 0.8rem;
  color: var(--gray);
  position: relative;
  z-index: 1;
}

.category-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: var(--light);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  z-index: 1;
}


/* ========== FEATURED CAROUSEL ========== */
.featured {
  padding: 3rem 0 5rem;
  background: var(--light-2);
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 1.5rem;
}

.carousel-item {
  flex: 0 0 calc(25% - 1.125rem);
  min-width: 0;
}

@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 calc(33.333% - 1rem);
  }
}

@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (max-width: 480px) {
  .carousel-item {
    flex: 0 0 100%;
  }
}

.carousel-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--light);
  border: 1px solid var(--light-3);
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 1rem;
}

.carousel-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ========== PRODUCT CARD ========== */
.product-card {
  background: var(--light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  background: var(--error);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

.product-card-badge.hot {
  background: var(--warning);
}

.product-card-badge.new {
  background: var(--success);
}

.product-card-image {
  position: relative;
  padding-top: 100%;
  background: var(--light-2);
  overflow: hidden;
}

.product-card-image img,
.product-card-image .emoji-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-image .emoji-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.product-card-actions {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.product-card-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
}

.product-card:hover .product-card-action {
  opacity: 1;
  transform: translateY(0);
}

.product-card-action:hover {
  background: var(--primary);
  transform: scale(1.1);
}
.product-card-action:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.product-card-info {
  padding: 1.25rem;
}

.product-card-category {
  font-size: 0.7rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.product-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stars {
  color: var(--warning);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

.review-count {
  font-size: 0.7rem;
  color: var(--gray);
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.old-price {
  font-size: 0.8rem;
  color: var(--gray);
  text-decoration: line-through;
}

.product-card-add {
  width: 100%;
  padding: 0.7rem;
  background: var(--dark);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.product-card-add:hover {
  background: var(--primary);
  color: #ffffff;
}
.product-card-add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-btn {
  background-color: #ffffff;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  border: 2.5px solid #000000;
  border-radius: 999px;
  padding: 12px 32px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 4px 4px 0px #000000;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cart-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000000;
}

.cart-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px #000000;
}

.cart-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #ccc;
  color: #666;
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px #000000;
}

.btn-load {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 58px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.12);
  transition: all .25s ease;
}

.btn-load:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(0,0,0,.22), 0 8px 15px rgba(0,0,0,.16);
}

.btn-load:active {
  transform: translateY(1px);
  box-shadow: 0 6px 15px rgba(0,0,0,.15);
}

.btn-load {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 58px;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 999px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.18), 0 3px 8px rgba(0,0,0,.12);
  transition: all .25s ease;
}

.btn-load:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(0,0,0,.22), 0 8px 15px rgba(0,0,0,.16);
}

.btn-load:active {
  transform: translateY(1px);
  box-shadow: 0 6px 15px rgba(0,0,0,.15);
}

/* ========== SHOP PAGE ========== */
.shop-header {
  background: linear-gradient(135deg, var(--light-2) 0%, var(--light) 100%);
  padding: 4rem 0;
  text-align: center;
}

.shop-header h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .shop-header h1 {
    font-size: 2rem;
  }
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  padding-block: 0 4rem;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .shop-filters {
    position: static;
  }
}

/* Filters Sidebar */
.shop-filters {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.filter-chip:hover {
  background: var(--light-2);
}

.filter-chip input {
  accent-color: var(--primary);
}

.price-range {
  padding: 0.5rem 0;
}

.price-range input {
  width: 100%;
  accent-color: var(--primary);
}

.price-values {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--gray);
}

.rating-filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  cursor: pointer;
}

.btn-clear-filters {
  width: 100%;
  padding: 0.7rem;
  background: var(--light-2);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 1rem;
}

.btn-clear-filters:hover {
  background: var(--light-3);
}

/* Shop Main */
.shop-main {
  min-width: 0;
}

/* Shop Toolbar */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.shop-count {
  color: #666;
  font-size: 0.9rem;
}

/* Empty state */
.shop-empty {
  background: #fff;
  border: 2px dashed #e5e5e5;
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.shop-empty i {
  font-size: 3.5rem;
  color: #d0d0d0;
  margin-bottom: 1rem;
}

.shop-empty h3 {
  font-size: 1.4rem;
  color: #1D1D1F;
  margin: 0 0 0.5rem;
}

.shop-empty p {
  color: #888;
  max-width: 380px;
  margin: 0 auto;
}

.results-count {
  font-size: 0.85rem;
  color: var(--gray);
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-select label {
  font-size: 0.8rem;
  color: var(--gray);
}

.sort-select select {
  padding: 0.4rem 1rem;
  border: 1px solid var(--light-3);
  border-radius: var(--radius);
  background: var(--light);
  font-family: var(--font-sans);
  cursor: pointer;
}

.view-toggle {
  display: flex;
  gap: 0.25rem;
}

.view-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--light-3);
  background: var(--light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.view-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.products-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.products-grid.list-view .product-card {
  display: flex;
}

.products-grid.list-view .product-card-image {
  width: 200px;
  padding-top: 0;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .products-grid.list-view .product-card {
    flex-direction: column;
  }
  
  .products-grid.list-view .product-card-image {
    width: 100%;
    padding-top: 100%;
  }
}

.load-more {
  text-align: center;
  margin-top: 3rem;
}

/* ========== CART PAGE ========== */
.cart-container {
  padding: 3rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem;
}

.cart-empty-icon {
  font-size: 4rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-3);
  transition: all var(--transition);
}

.cart-item:hover {
  box-shadow: var(--shadow-md);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  background: var(--light-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--light-3);
  background: var(--light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.cart-item-total {
  text-align: right;
  min-width: 80px;
}

.cart-item-total-price {
  font-weight: 800;
  font-size: 1.1rem;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color var(--transition);
}

.cart-item-remove:hover {
  color: var(--error);
}

.cart-summary {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--light-2);
  border-radius: var(--radius-xl);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cart-summary-row.total {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--light-3);
}

.cart-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.free-shipping-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--light-3);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--gray-dark);
  margin-top: 1rem;
}

.free-shipping-notice.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--light-3);
  border-radius: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}

/* Account page */
.account-nav-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--dark);
}

.account-nav-btn:hover {
  background: var(--light-2);
}

.account-nav-btn.active {
  background: var(--light-2);
  font-weight: 700;
  border-left: 3px solid var(--primary);
}

.account-nav-btn.logout-btn {
  color: var(--error);
  font-weight: 600;
}
[data-theme="dark"] .account-nav-btn.logout-btn {
  color: #ff8a8a;
}

/* Auth forms */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.form-options a {
  color: var(--primary-dark);
  text-decoration: none;
}

.form-options a:hover {
  text-decoration: underline;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.category-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--light-3);
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--light);
  transition: all var(--transition);
  user-select: none;
}

.category-checkbox:hover {
  border-color: var(--primary);
}

.category-checkbox.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--light);
}

.category-checkbox input {
  display: none;
}

.demo-credentials {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--light-2);
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--gray);
}

/* ========== NEWSLETTER ========== */
.newsletter-section {
  padding: 4rem 0;
  background: #1a1816;
  color: #ffffff;
}

.newsletter-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.newsletter-highlight {
  color: #b5f23d;
}

.newsletter-desc {
  color: #a89f94;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.15);
  font-family: var(--font-sans);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s;
}

.newsletter-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.newsletter-input:focus {
  border-color: #b5f23d;
}

.newsletter-btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  background: #b5f23d;
  color: #1a1816;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: #9fd62e;
  transform: translateY(-1px);
}

/* ========== FOOTER ========== */
.footer-premium {
  background: var(--dark);
  color: var(--light-2);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.footer-brand .logo {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: var(--light);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--gray-light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.payment-icons {
  display: flex;
  gap: 0.75rem;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.secure-badge {
  font-size: 0.8rem;
  color: var(--gray-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: var(--gray-light);
}

/* ========== MODALS ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-container {
  background: var(--light);
  border-radius: var(--radius-2xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-2);
  border: 1px solid var(--light-3);
  color: var(--dark);
  cursor: pointer;
  z-index: 1;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--error);
  color: white;
}

/* Product Modal */
.product-modal {
  max-width: 1000px;
}

.product-modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

@media (max-width: 768px) {
  .product-modal-content {
    grid-template-columns: 1fr;
  }
}

.product-modal-gallery {
  position: relative;
}

.product-modal-main-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--light-2);
  border-radius: 2rem;
  border: 2px solid #000;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  overflow: hidden;
}

.product-modal-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(2rem - 16px);
}

.product-modal-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-modal-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 800;
}

.product-modal-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.product-modal-current {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.product-modal-old {
  font-size: 1rem;
  color: var(--gray);
  text-decoration: line-through;
}

.product-modal-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-modal-description {
  color: var(--gray);
  line-height: 1.6;
}

.product-modal-specs {
  background: var(--light-2);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.product-modal-spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--light-3);
}

.product-modal-quantity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-2);
  border-radius: 50px;
  padding: 0.25rem;
}

.qty-btn-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--light);
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition);
}

.qty-btn-modal:hover {
  background: var(--primary);
}

.qty-number {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}

.product-modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.product-modal-add {
  flex: 1;
  padding: 1rem;
  background: var(--dark);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.product-modal-add:hover {
  background: var(--primary);
  color: #ffffff;
}
.upload-area {
  border: 2px dashed var(--light-3);
  border-radius: var(--radius-lg);
  background: #fffcf8;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-glow);
}

/* ========== ADMIN PRODUCT MODAL ========== */
.admin-modal {
  max-width: 720px;
}

.admin-modal-inner {
  padding: 2.25rem 2.5rem 2.5rem;
}

.admin-modal-header {
  margin-bottom: 1.75rem;
  padding-right: 2.75rem;
}

.admin-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.admin-modal-header p {
  color: var(--gray);
  font-size: 0.9rem;
}

.admin-product-form .admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.admin-product-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.admin-product-form .span-2 {
  grid-column: 1 / -1;
}

.admin-product-form .form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.02em;
}

.admin-product-form .form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--light-3);
  border-radius: var(--radius-md);
  background: #fffcf8;
  color: var(--dark);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-product-form .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.admin-product-form textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.admin-product-form select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a7f73' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-symbol {
  position: absolute;
  left: 0.9rem;
  color: var(--gray);
  font-weight: 700;
  font-size: 0.9rem;
  pointer-events: none;
}

.input-prefix .form-control {
  padding-left: 2rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gray);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.upload-icon {
  font-size: 2rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.upload-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
}

.upload-sub {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

.upload-hint {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-light);
  border: 1px solid var(--light-3);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  background: var(--light);
}

.upload-filename {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--gray);
  word-break: break-all;
}

#apImagePreview {
  margin-bottom: 0.75rem;
}

#apImagePreview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: var(--radius-lg);
  object-fit: contain;
  border: 1px solid var(--light-3);
  background: var(--light);
}

.admin-modal-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-3);
}

.admin-modal-footer .btn-primary {
  flex: 1;
  justify-content: center;
}

@media (max-width: 640px) {
  .admin-modal-inner {
    padding: 1.5rem 1.25rem 1.75rem;
  }
  .admin-product-form .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-product-form .span-2 {
    grid-column: auto;
  }
}
.product-modal-add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--gray);
  color: var(--dark);
}
.product-modal-add:disabled:hover {
  background: var(--gray);
  color: var(--dark);
}

.product-modal-wishlist {
  width: 50px;
  background: var(--light-2);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.product-modal-wishlist:hover {
  background: var(--error);
  color: white;
}

/* ========== CHAT WIDGET ========== */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.chat-button {
  width: 56px;
  height: 56px;
  background: var(--chat-button-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  position: relative;
}

.chat-button i {
  color: var(--chat-icon);
}

.chat-button:hover {
  transform: scale(1.05);
}

.chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  height: 450px;
  background: var(--chat-window-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.open {
  display: flex;
}

.chat-header {
  background: var(--chat-header-bg);
  color: var(--chat-header-text);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header button {
  background: none;
  border: none;
  color: var(--chat-header-close);
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-message {
  max-width: 80%;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
}

.chat-message.user {
  background: var(--chat-user-bg);
  color: var(--chat-user-text);
  align-self: flex-end;
}

.chat-message.bot {
  background: var(--chat-bot-bg);
  color: var(--chat-bot-text);
}

.chat-input {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--light-3);
  gap: 0.5rem;
}

.chat-input input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--light-3);
  border-radius: var(--radius);
  background: var(--chat-input-bg);
  color: var(--chat-bot-text);
  font-family: var(--font-sans);
}

.chat-input button {
  width: 36px;
  height: 36px;
  background: var(--chat-button-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  color: #ffffff;
}

.chat-input button:hover {
  transform: scale(1.05);
}

/* ========== ADMIN PANEL ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  min-height: 60vh;
}

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.admin-sidebar {
  background: var(--dark);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  color: white;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  height: fit-content;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.admin-avatar { font-size: 2rem; }
.admin-avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

#sidebarPhotoInput { display: none; }
.sidebar-photo-label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--gray); cursor: pointer; padding: 0.3rem 0.8rem; border: 1px dashed var(--light-3); border-radius: 50px; transition: all 0.2s; background: var(--light-2); }
.sidebar-photo-label:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.sidebar-photo-label i { font-size: 0.7rem; }
.product-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--light-2); color: var(--primary); font-size: 3rem; font-weight: 700; }
.product-modal-placeholder { width: 100%; height: 300px; display: flex; align-items: center; justify-content: center; background: var(--light-2); color: var(--primary); font-size: 6rem; font-weight: 700; border-radius: calc(2rem - 16px); }
.thanks-item-img { width: 48px; height: 48px; flex-shrink: 0; }
.thanks-item-img img { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; }
.thanks-item-placeholder { width: 48px; height: 48px; border-radius: var(--radius); background: var(--light-2); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; }

.admin-info small { color: var(--gray-light); font-size: 0.75rem; }

.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: left;
  width: 100%;
}

.admin-badge {
  margin-left: auto;
  background: var(--error);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  min-width: 18px;
  text-align: center;
}

.admin-nav-item:hover { background: rgba(255,255,255,0.1); color: white; }

.admin-nav-item.active { background: var(--primary); color: #ffffff; font-weight: 600; }

.admin-main {
  background: var(--light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--light-3);
}

.admin-main h1 { font-family: var(--font-serif); font-size: 1.75rem; margin-bottom: 1.5rem; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--light-2);
  border-radius: var(--radius-lg);
  transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
}

.stat-info h3 { font-size: 1.5rem; font-weight: 800; }
.stat-info p { font-size: 0.8rem; color: var(--gray); }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--light-2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.chart-card h3 { font-size: 1rem; margin-bottom: 1rem; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--light-3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
}

.admin-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--light-3);
}

.admin-table tr:hover td { background: var(--light-2); }

.product-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-emoji { font-size: 1.5rem; }

.actions-cell { white-space: nowrap; }

.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--light-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--primary); }

.btn-icon.danger:hover { background: var(--error); color: white; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-header h1 { margin-bottom: 0; }

.admin-search {
  position: relative;
  margin-bottom: 1rem;
}

.admin-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 0.85rem;
  pointer-events: none;
}

.admin-search input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--light-3);
  border-radius: 50px;
  font-family: var(--font-sans);
  background: var(--light);
  color: var(--dark);
  transition: all var(--transition);
}

.admin-search.with-icon input { padding-left: 2.6rem; }

.admin-search input::placeholder { color: var(--gray); opacity: 0.8; }

.admin-search input:focus {
  outline: none;
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
  background: #fff;
}

/* ===== Pagina de presencia (fondo blanco, tarjetas) ===== */
body[data-page="presencia"] { background: #f6f7f9; }

.presence-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.presence-card {
  background: #ffffff;
  border: 1px solid #eaecef;
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: 0 6px 24px rgba(26, 26, 26, 0.06);
}

.presence-row td { vertical-align: middle; }

.presence-row.online { background: rgba(74, 124, 89, 0.04); }

.presence-row.online:hover td { background: rgba(74, 124, 89, 0.08); }

.presence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 0.4rem;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.presence-dot.offline { background: #c9c2b8; box-shadow: none; }

.presence-role {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.presence-role.admin { background: rgba(26, 26, 26, 0.08); color: var(--dark); }
.presence-role.seller { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.presence-role.user { background: rgba(74, 124, 89, 0.12); color: var(--success); }

@media (max-width: 768px) {
  .presence-page { padding: 0.5rem; }
  .presence-card { padding: 0.75rem; }
}

.admin-access-denied {
  text-align: center;
  padding: 4rem;
}

.admin-access-denied i { font-size: 4rem; color: var(--gray-light); margin-bottom: 1rem; }

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) { .analytics-grid { grid-template-columns: 1fr; } }

.analytics-card {
  background: var(--light-2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.settings-form { max-width: 500px; }

.settings-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.settings-form input {
  padding: 0.6rem;
  border: 1px solid var(--light-3);
  border-radius: var(--radius);
  font-family: var(--font-sans);
}

/* Product modal tags */
.product-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: var(--light-2);
  border-radius: 50px;
  color: var(--gray);
}

/* Full width button */
.btn-primary.full-width { width: 100%; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none !important; }

/* ========== AUTH / LOGIN MODAL ========== */
.login-modal .auth-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 2px solid var(--light-3); }
.login-modal .auth-tab { flex: 1; padding: 0.75rem 1rem; border: none; background: none; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600; color: var(--gray); cursor: pointer; transition: all 0.2s; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.login-modal .auth-tab:hover { color: var(--dark); }
.login-modal .auth-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.login-modal form { display: flex; flex-direction: column; gap: 0.85rem; }
.login-modal .form-group label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--gray-dark); margin-bottom: 0.3rem; }
.login-modal .form-group label i { width: 1rem; color: var(--primary-dark); }
.login-modal .form-group input { width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--light-3); border-radius: var(--radius); font-family: var(--font-sans); font-size: 0.9rem; transition: border-color 0.2s; background: var(--light); color: var(--dark); }
.login-modal .form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.login-modal .form-options { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--gray); }
.login-modal .form-options .checkbox { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.login-modal .form-options input[type="checkbox"] { accent-color: var(--primary); }
.login-modal .btn-primary.full-width { width: 100%; justify-content: center; padding: 0.75rem; font-size: 0.95rem; }
.login-modal .demo-credentials { margin-top: 1rem; padding: 0.75rem; background: var(--light-2); border-radius: var(--radius); border: 1px solid var(--light-3); display: flex; flex-direction: column; gap: 0.25rem; }
.login-modal .demo-credentials p { font-size: 0.78rem; color: var(--gray); margin: 0 0 0.25rem; }
.login-modal .demo-credentials small { font-size: 0.75rem; color: var(--gray-dark); padding: 0.2rem 0; }

/* ========== VARIANTS (sizes / colors) ========== */
.product-modal-variant { margin-bottom: 0.75rem; }
.product-modal-variant label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--gray-dark); }
.variant-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.variant-chip { padding: 0.35rem 0.85rem; border: 1.5px solid var(--light-3); border-radius: 50px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; font-family: var(--font-sans); background: var(--light); }
.variant-chip:hover { border-color: var(--primary); background: var(--primary-light); }
.variant-chip.active { border-color: var(--primary); background: var(--primary); color: #ffffff; font-weight: 600; }
.cart-item-variant { font-size: 0.78rem; color: var(--gray); margin: 0.15rem 0 0.3rem; }

/* ========== REVIEWS ========== */
.product-modal-reviews { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--light-3); }
.product-modal-reviews h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.product-modal-reviews .review-count { font-weight: 400; color: var(--gray); font-size: 0.9rem; }
.reviews-list { max-height: 300px; overflow-y: auto; margin-bottom: 1.5rem; }
.review-item { padding: 0.75rem; border-radius: var(--radius); background: var(--light-2); margin-bottom: 0.5rem; }
.review-item:last-child { margin-bottom: 0; }
.review-header { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.25rem; }
.review-header strong { font-size: 0.9rem; }
.review-header small { color: var(--gray); font-size: 0.75rem; }
.review-item p { font-size: 0.85rem; color: var(--gray-dark); margin: 0; }
.review-form { border-top: 1px solid var(--light-3); padding-top: 1rem; }
.review-form h4 { font-size: 0.95rem; margin-bottom: 0.6rem; }
.review-stars { display: flex; gap: 0.25rem; }
.star-btn { font-size: 1.5rem; cursor: pointer; color: var(--gray-light); transition: color 0.2s; }
.star-btn:hover, .star-btn.active { color: #f59e0b; }
.product-modal-rating-clickable { cursor: pointer; }
.product-modal-rating-clickable:hover { opacity: 0.8; }

/* ========== COUPONS (cart & admin) ========== */
.coupon-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border: 1px dashed var(--primary); border-radius: var(--radius); margin-bottom: 0.5rem; cursor: pointer; transition: background 0.2s; background: rgba(181,242,61,0.05); }
.coupon-card:hover { background: rgba(181,242,61,0.15); }
.coupon-card-code { font-weight: 800; font-size: 1rem; color: var(--primary-dark); font-family: monospace; }
.coupon-card-desc { flex: 1; font-size: 0.85rem; color: var(--gray); }
.coupon-card .btn-small { font-size: 0.75rem; padding: 0.3rem 0.75rem; border-radius: 50px; border: 1px solid var(--primary); background: var(--primary); color: #ffffff; cursor: pointer; font-family: var(--font-sans); font-weight: 600; }
.coupon-card .btn-small:hover { background: var(--primary-dark); }
.status-badge.active { background: #d1fae5; color: #065f46; }
.status-badge.inactive { background: #fee2e2; color: #991b1b; }

/* ========== THANKS / CONFIRMATION PAGE ========== */
.thanks-page {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1rem;
  animation: fadePage 0.5s ease;
}
.thanks-header {
  text-align: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, var(--light-2), var(--light));
  border-radius: var(--radius-2xl);
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-3);
}
.thanks-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 1rem;
  animation: thanksPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes thanksPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.thanks-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.thanks-header p {
  color: var(--gray);
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto;
}
.thanks-order-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: var(--light);
  border: 1px solid var(--light-3);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.thanks-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.thanks-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  font-weight: 600;
}
.thanks-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  word-break: break-all;
}
.thanks-details {
  background: var(--light);
  border: 1px solid var(--light-3);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.thanks-details h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-3);
}
.thanks-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--light-3);
}
.thanks-item:last-child { border-bottom: none; }
.thanks-item-emoji { font-size: 1.5rem; }
.thanks-item-info { flex: 1; }
.thanks-item-name { font-weight: 600; font-size: 0.9rem; }
.thanks-item-meta { font-size: 0.78rem; color: var(--gray); margin-top: 0.1rem; }
.thanks-item-price { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.thanks-totals {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--light-3);
}
.thanks-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--gray-dark);
}
.thanks-grand-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  border-top: 1px solid var(--light-3);
  margin-top: 0.4rem;
  padding-top: 0.6rem;
}
.thanks-transfer-reminder {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 1.5rem;
}
.thanks-transfer-reminder i { font-size: 1.2rem; flex-shrink: 0; }
.thanks-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.thanks-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--light));
  border: 1px solid var(--primary);
  border-radius: var(--radius-xl);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.thanks-track-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.thanks-track-info { flex: 1; min-width: 200px; }
.thanks-track-info strong { font-size: 1.02rem; }
.thanks-track-info p { font-size: 0.85rem; color: var(--gray-dark); margin-top: 0.15rem; }

/* ========== TRACKING PAGE ========== */
.tracking-page {
  max-width: 680px;
  margin: 2.5rem auto;
  animation: fadePage 0.5s ease;
}
.tracking-header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--light-2), var(--light));
  border: 1px solid var(--light-3);
  border-radius: var(--radius-2xl);
  margin-bottom: 1.5rem;
}
.tracking-header .tracking-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.tracking-header h1 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}
.tracking-header p { color: var(--gray); font-size: 0.9rem; }
.tracking-card {
  background: var(--light);
  border: 1px solid var(--light-3);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.tracking-card h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-3);
}
.tracking-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.tracking-order-id { font-weight: 800; font-size: 1.05rem; word-break: break-all; }
.tracking-total { font-weight: 800; font-size: 1.25rem; }
.tracking-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}
.tracking-meta b { color: var(--gray); font-weight: 600; }
.tracking-msg {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--gray);
}
.tracking-msg i { font-size: 3.2rem; margin-bottom: 1rem; display: block; color: var(--gray-light); }
.tracking-msg h2 { font-family: var(--font-serif); color: var(--dark); font-size: 1.4rem; margin-bottom: 0.5rem; }
.tracking-msg p { font-size: 0.9rem; }
.tracking-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ========== PAYMENT MODAL ========== */
.payment-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.payment-tab:hover { color: var(--dark); }
.payment-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }

#cardForm .form-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 0.3rem;
}
#cardForm .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  transform: translateY(-1px);
}
#cardForm .form-group input {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  background: var(--light);
  color: var(--dark);
}

/* ========== STOCK MANAGEMENT ========== */
.stock-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.stock-badge.ok { background: #d1fae5; color: #065f46; }
.stock-badge.low { background: #fef3c7; color: #92400e; }
.stock-badge.critical { background: #fee2e2; color: #991b1b; animation: pulseBadge 2s ease-in-out infinite; }
.stock-badge.out { background: #fecaca; color: #7f1d1d; font-weight: 800; }

.admin-table tr.row-low { background: rgba(251, 191, 36, 0.05); }
.admin-table tr.row-critical { background: rgba(239, 68, 68, 0.06); }
.admin-table tr.row-critical:hover td { background: rgba(239, 68, 68, 0.1) !important; }

.form-warning {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  background: #fef3c7;
  color: #92400e;
}
.form-warning.error { background: #fee2e2; color: #991b1b; }
.form-warning.ok { background: #d1fae5; color: #065f46; }

.low-stock-alert {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: slideIn 0.3s ease;
}
.low-stock-alert.ok {
  background: #d1fae5;
  border-color: #10b981;
}
.low-stock-header {
  font-weight: 700;
  font-size: 0.9rem;
  color: #92400e;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.low-stock-alert.ok .low-stock-header { color: #065f46; }
.low-stock-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.low-stock-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  transition: background 0.2s;
}
.low-stock-item:hover { background: rgba(0,0,0,0.03); }
.low-stock-emoji { font-size: 1.1rem; }
.low-stock-name { flex: 1; font-weight: 500; }
.low-stock-qty {
  font-weight: 800;
  color: #92400e;
  padding: 0.15rem 0.5rem;
  background: rgba(255,255,255,0.5);
  border-radius: 50px;
  font-size: 0.8rem;
}
.low-stock-qty.critical { color: #991b1b; background: rgba(239,68,68,0.1); }

/* ========== ORDER TIMELINE ========== */
.order-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
}
.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}
.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-2);
  border: 2px solid var(--light-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--gray-light);
  transition: all 0.3s;
}
.timeline-step.done .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
}
.timeline-step.current .timeline-dot {
  box-shadow: 0 0 0 4px var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}
.timeline-label {
  font-size: 0.65rem;
  color: var(--gray);
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}
.timeline-step.done .timeline-label {
  color: var(--dark);
  font-weight: 600;
}
.timeline-step.current .timeline-label {
  color: var(--primary-dark);
  font-weight: 700;
}
.timeline-line {
  height: 2px;
  flex: 1;
  min-width: 8px;
  background: var(--light-3);
  margin: 0 2px;
  margin-bottom: 1.25rem;
  transition: background 0.3s;
  border-radius: 2px;
}
.timeline-line.done {
  background: var(--primary);
}

/* Order cards */
.order-card {
  animation: slideIn 0.3s ease backwards;
}
.order-card:nth-child(1) { animation-delay: 50ms; }
.order-card:nth-child(2) { animation-delay: 100ms; }
.order-card:nth-child(3) { animation-delay: 150ms; }

/* Admin filter chips */
#orderFilters .filter-chip {
  padding: 0.35rem 1rem;
  border: 1.5px solid var(--light-3);
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--light);
  font-family: var(--font-sans);
}
#orderFilters .filter-chip:hover {
  border-color: var(--primary);
}
#orderFilters .filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
  font-weight: 600;
}

/* ========== PHONE INPUT PREFIX ========== */
.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--light-3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  background: var(--light);
}
.input-with-prefix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.input-prefix {
  padding: 0.7rem 0.5rem 0.7rem 0.85rem;
  background: var(--light-2);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark);
  border-right: 1px solid var(--light-3);
  white-space: nowrap;
  user-select: none;
}
.input-with-prefix input {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.7rem 0.85rem !important;
  background: transparent !important;
  color: var(--dark);
}
.input-with-prefix input:focus {
  box-shadow: none !important;
  outline: none;
}

/* ========== PASSWORD REQUIREMENTS ========== */
.password-reqs {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  background: var(--light-2);
  border-radius: var(--radius);
  margin-top: -0.3rem;
}
.password-reqs .req {
  font-size: 0.75rem;
  color: var(--gray);
  transition: color 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.password-reqs .req.ok {
  color: var(--success);
}

/* ========== ENHANCED ANIMATIONS & INTERACTIONS ========== */

/* Particle overlay background */
/* ========== ANIMATED BACKGROUND BLOBS ========== */
.bg-animado {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(160deg, #3aa0d8 0%, #2fb8b0 55%, #35c2a6 100%);
  overflow: hidden;
  transition: background 0.6s ease;
}
[data-theme="dark"] .bg-animado {
  background: linear-gradient(180deg, #05060f 0%, #0a0d24 35%, #141138 65%, #241a3d 85%, #2e1f3a 100%);
}
[data-theme="dark"] .figura svg {
  filter: drop-shadow(0 0 6px currentColor);
}
[data-theme="dark"] .burbuja {
  border-color: rgba(255,255,255,0.25);
}

.figura {
  position: absolute;
  opacity: 0.85;
  animation-name: flotar;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes flotar {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(15px, -20px) rotate(4deg); }
  50%  { transform: translate(-10px, 10px) rotate(-3deg); }
  75%  { transform: translate(10px, 20px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.burbuja {
  position: absolute;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  animation-name: subir;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes subir {
  0%   { transform: translateY(0); opacity: 0.6; }
  50%  { transform: translateY(-30px); opacity: 0.9; }
  100% { transform: translateY(0); opacity: 0.6; }
}

.estrella {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: titilar linear infinite;
  animation-play-state: paused;
}
[data-theme="dark"] .estrella {
  animation-play-state: running;
}

@keyframes titilar {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

/* Animated gradient border for cards on hover */
.product-card::after,
.category-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), transparent, var(--primary-light), transparent);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}
.product-card:hover::after,
.category-card:hover::after {
  opacity: 0.5;
}

/* Enhanced button with ripple */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
  background-size: 200% 200%;
  background-position: 100% 100%;
  transition: background-position 0.6s;
}
.btn-primary:hover::after {
  background-position: 0% 0%;
}

/* Glow on hover for interactive elements */
.product-card:hover {
  box-shadow: 0 8px 32px rgba(181, 242, 61, 0.15), var(--shadow-xl);
}

/* Staggered reveal for grid items */
.products-grid .product-card,
.categories-grid .category-card {
  animation: cardReveal 0.6s ease backwards;
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.products-grid .product-card:nth-child(1) { animation-delay: 0ms; }
.products-grid .product-card:nth-child(2) { animation-delay: 60ms; }
.products-grid .product-card:nth-child(3) { animation-delay: 120ms; }
.products-grid .product-card:nth-child(4) { animation-delay: 180ms; }
.products-grid .product-card:nth-child(5) { animation-delay: 240ms; }
.products-grid .product-card:nth-child(6) { animation-delay: 300ms; }
.products-grid .product-card:nth-child(7) { animation-delay: 360ms; }
.products-grid .product-card:nth-child(8) { animation-delay: 420ms; }

/* Shimmer loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--light-2) 25%, var(--light-3) 50%, var(--light-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Pulse for badges */
.product-card-badge {
  animation: pulseBadge 2s ease-in-out infinite;
}
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Enhanced scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-2); }
::-webkit-scrollbar-thumb { background: var(--light-3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-light); }

/* Typing cursor effect for hero */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--primary);
  font-weight: 100;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Smooth underline hover for nav links */
.nav-link::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.3s;
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav-link {
  position: relative;
}
.nav-link:hover::before {
  width: 60%;
}
.nav-link.active::before {
  width: 60%;
}

/* Scale and glow on image hover within product cards */
.product-card-image .emoji-placeholder {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
}
.product-card:hover .emoji-placeholder {
  transform: scale(1.15);
  filter: brightness(1.1);
}

/* Glass effect modals */
.modal-container {
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Enhanced form inputs */
.login-modal .form-group input:focus {
  transform: translateY(-1px);
}
.login-modal .form-group input {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

/* Checkbox smooth style */
.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
  transition: transform 0.2s;
}
.checkbox input[type="checkbox"]:checked {
  transform: scale(1.1);
}

/* Navigation link icon hover */
.nav-link i {
  transition: transform 0.2s;
}
.nav-link:hover i {
  transform: translateY(-1px);
}

/* Chat button pulse */
.chat-button {
  animation: chatPulse 3s ease-in-out infinite;
}
@keyframes chatPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 242, 61, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(181, 242, 61, 0); }
}

/* Cart item slide-in */
.cart-item {
  animation: slideIn 0.3s ease backwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.cart-item:nth-child(1) { animation-delay: 50ms; }
.cart-item:nth-child(2) { animation-delay: 100ms; }
.cart-item:nth-child(3) { animation-delay: 150ms; }

/* Auth tabs smooth transition */
.auth-tab {
  position: relative;
  overflow: hidden;
}
.auth-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.auth-tab.active::after {
  transform: scaleX(1);
}

/* Price counter animation */
.current-price {
  display: inline-block;
  transition: transform 0.2s;
}
.product-card:hover .current-price {
  transform: scale(1.05);
}

/* Account nav active indicator */
.account-nav-btn.active {
  position: relative;
}
.account-nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

/* Admin nav glow */
.admin-nav-item.active i {
  color: var(--dark);
}

/* ========== SELLER PANEL ========== */
.seller-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2rem 0; min-height: 60vh; }
.seller-sidebar { background: var(--light); border-radius: var(--radius-xl); border: 1px solid var(--light-3); overflow: hidden; align-self: start; position: sticky; top: calc(var(--header-height, 80px) + 1rem); }
.seller-user { padding: 1.25rem; text-align: center; border-bottom: 1px solid var(--light-3); }
.seller-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: var(--light); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; margin: 0 auto 0.5rem; }
.seller-avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin: 0 auto 0.5rem; display: block; }
.seller-info small { color: var(--gray); font-size: 0.75rem; display: block; margin-top: 0.2rem; }
.seller-nav { padding: 0.5rem; }
.seller-nav-item { display: block; width: 100%; padding: 0.75rem 1rem; background: none; border: none; text-align: left; cursor: pointer; transition: all var(--transition); font-family: var(--font-sans); font-size: 0.9rem; color: var(--dark); border-radius: var(--radius); }
.seller-nav-item:hover { background: var(--light-2); }
.seller-nav-item.active { background: var(--light-2); font-weight: 700; border-left: 3px solid var(--primary); }
.seller-nav-item i { width: 1.5rem; color: var(--primary); }
.seller-main { min-height: 40vh; }
.seller-dashboard h1,
.seller-earnings h1,
.seller-products h1,
.seller-withdrawals h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.admin-nav-item i {
  transition: transform 0.2s;
}
.admin-nav-item:hover i {
  transform: scale(1.15);
}

/* Section title decorative line animation */
.section-title .highlight::after {
  animation: expandLine 0.8s ease forwards;
  transform-origin: left;
}
@keyframes expandLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ========== PRODUCT PAGE ========== */
.product-page-container { padding: 2rem 1rem 4rem; }
.product-page-root { max-width: 1000px; margin: 0 auto; }
.product-detail-page .product-modal-content {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--light);
  border: 1px solid var(--light-3);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}
.product-detail-page .product-modal-main-image { aspect-ratio: 1; }
.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.product-breadcrumb a { color: var(--primary-dark); text-decoration: none; font-weight: 600; }
.product-breadcrumb a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .product-detail-page .product-modal-content { padding: 1.25rem; }
  .product-detail-page .product-modal-title { font-size: 1.4rem; }
  .product-page-container { padding: 1rem 0.75rem 3rem; }
}

/* ========== CATEGORY PAGE ========== */
.category-page-root { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.category-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.category-icon {
  width: 68px;
  height: 68px;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.category-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
}
.category-icon img {
  width: 100%;
  height: 100%;
  border-radius: 1.25rem;
  object-fit: cover;
}
#categoryProductsGrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (max-width: 768px) {
  .category-page-root { padding: 1rem 0.75rem 3rem; }
  .category-header h1 { font-size: 1.5rem; }
  .category-icon { width: 56px; height: 56px; font-size: 1.4rem; }
}

/* ========== LOGIN CARD (diseño dedicado) ========== */
#loginModal.modal-overlay {
  background: rgba(46, 46, 46, 0.94);
  backdrop-filter: none;
}

.login-modal.modal-container {
  max-width: 380px;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  backdrop-filter: none;
  overflow-y: auto;
  font-family: Arial, Helvetica, sans-serif;
}

.login-modal .modal-close {
  background: #e0e0e0;
  color: #111;
  border: 1px solid #b3b3b3;
  top: 0.9rem;
  right: 0.9rem;
}

.login-modal .modal-close:hover {
  background: #111;
  color: #ffffff;
  border-color: #111;
}

.login-modal .auth-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: none;
}

.login-modal .auth-tab {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 8px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: transparent;
  color: #777;
  font-size: 13px;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  transition: background 0.25s, color 0.25s;
}

.login-modal .auth-tab:hover { color: #111; }

.login-modal .auth-tab.active {
  background: #2c2c2c;
  border-color: #2c2c2c;
  color: #ffffff;
}

.login-title {
  text-align: center;
  margin: 0 0 35px;
  color: #222;
  font-size: 38px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}

.login-modal form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-modal .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.login-modal .form-group label {
  margin: 0 0 8px;
  color: #666;
  font-size: 14px;
  font-weight: 400;
}

.login-modal .form-group label i { display: none; }

.login-modal .form-group input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #ffffff;
  color: #222;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
  transition: border-color 0.25s;
  transform: none;
}

.login-modal .form-group input:focus {
  outline: none;
  border-color: #111;
  box-shadow: none;
  transform: none;
}

.login-modal .remember,
.login-modal .form-options {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 14px;
}

.login-modal .btn-primary.full-width {
  width: 100%;
  height: 50px;
  margin-top: 10px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #2c2c2c;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}

.login-modal .btn-primary.full-width:hover {
  background: #111;
  transform: translateY(-2px);
}

.login-modal .forgot {
  margin-top: 18px;
  display: block;
  text-align: center;
  text-decoration: none;
  color: #777;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
}

.login-modal .forgot:hover { color: #111; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  color: #999;
  font-size: 0.8rem;
  font-family: Arial, Helvetica, sans-serif;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e3e3e3;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 50px;
  margin-top: 0.75rem;
  padding: 0;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #ffffff;
  color: #3c4043;
  font-size: 15px;
  font-weight: 600;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-google i { color: #4285f4; font-size: 1.1rem; }

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
  transform: translateY(-1px);
}

.login-modal .password-reqs {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.login-modal .password-reqs .req {
  color: #666;
  white-space: normal;
  flex-wrap: wrap;
}

.login-modal .otp-hint {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  line-height: 1.5;
  margin: 0.5rem 0 1rem;
}
.login-modal .otp-inputs {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.login-modal .otp-digit {
  width: 3.4rem;
  height: 3.4rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}
.login-modal .otp-digit:focus {
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}
.login-modal .otp-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}
.login-modal .otp-actions a {
  color: #666;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}
.login-modal .otp-actions a:hover { color: #111; }

.login-modal .demo-credentials {
  margin-top: 22px;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  text-align: center;
}

