/* ===== AURA TC - PREMIUM ECOMMERCE THEME ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --ml-yellow: #0D1117;
  --ml-yellow-hover: #161B22;
  --ml-blue: #E94560;
  --ml-blue-hover: #D13550;
  --ml-blue-light: #2A1A2E;
  --ml-green: #00B894;
  --ml-green-light: #1A2E28;
  --ml-red: #F23D4F;
  --ml-orange: #FF7733;
  --ml-gray-dark: #E8E8F0;
  --ml-gray: #B0B0C0;
  --ml-gray-light: #8B8B9E;
  --ml-gray-lighter: #2A2A3E;
  --ml-bg: #0F1119;
  --ml-white: #1A1C2E;
  --ml-shadow: 0 2px 8px 0 rgba(0,0,0,.25);
  --ml-shadow-hover: 0 12px 32px 0 rgba(0,0,0,.45);
  --ml-radius: 10px;
  --ml-radius-lg: 16px;
  --ml-accent-gradient: linear-gradient(135deg, #E94560, #FF6B6B, #C0392B);
  --safe-top: 12px;
  --safe-bottom: 12px;
  --safe-left: 10px;
  --safe-right: 10px;
  font-size: clamp(13.6px, 1vw + 12px, 18.4px);
}

@supports (padding: env(safe-area-inset-top)) {
  :root {
    --safe-top: max(12px, env(safe-area-inset-top));
    --safe-bottom: max(12px, env(safe-area-inset-bottom));
    --safe-left: max(10px, env(safe-area-inset-left));
    --safe-right: max(10px, env(safe-area-inset-right));
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ===== ANIMATED COLOR PANEL ===== */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(233,69,96,0.3); }
  50% { box-shadow: 0 0 40px rgba(233,69,96,0.6); }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--ml-bg);
  color: var(--ml-gray-dark);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: var(--ml-blue); transition: color 0.2s ease; }
a:hover { color: var(--ml-blue-hover); }

/* ===== HEADER / NAVBAR ===== */
.navbar {
  background: linear-gradient(270deg, #0D1117, #1A1A2E, #16213E, #0F3460, #1A1A2E, #0D1117);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.navbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.03);
  color: #FFFFFF;
}

.navbar-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(233,69,96,0.4));
  transition: all 0.3s ease;
}

.navbar-logo:hover img {
  filter: drop-shadow(0 4px 16px rgba(233,69,96,0.7));
  transform: rotate(-3deg) scale(1.05);
}

.navbar-logo span { color: var(--ml-blue); }

.search-container {
  flex: 1;
  max-width: 680px;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 12px 48px 12px 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  outline: none;
  transition: all 0.3s ease;
  background: rgba(26,28,46,0.95);
  color: #E8E8F0;
}

.search-container input:focus {
  box-shadow: 0 4px 16px rgba(233,69,96,0.2);
  border-color: var(--ml-blue);
  background: #1A1C2E;
  color: #E8E8F0;
}

.search-container button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 42px;
  background: var(--ml-blue);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  color: white;
  transition: all 0.2s ease;
}

.search-container button:hover { background: var(--ml-blue-hover); transform: scale(1.05); }

.navbar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.navbar-actions a, .navbar-actions button {
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  padding: 6px 10px;
  border-radius: 8px;
}

.navbar-actions a:hover, .navbar-actions button:hover {
  color: #FFFFFF;
  background: rgba(255,255,255,0.1);
}

.nav-icon {
  height: 24px;
  width: 24px;
  vertical-align: middle;
  color: #fff;
  fill: currentColor;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.navbar-actions a:hover .nav-icon,
.navbar-actions button:hover .nav-icon {
  opacity: 1;
}
body.light-mode .nav-icon {
  color: #222;
  opacity: 0.75;
}
body.light-mode .navbar-actions a:hover .nav-icon,
body.light-mode .navbar-actions button:hover .nav-icon {
  opacity: 1;
}

.cart-icon {
  position: relative;
  font-size: 22px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--ml-blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  animation: pulseGlow 2s ease infinite;
}

/* Sub navbar */
.sub-navbar {
  background: linear-gradient(90deg, #0D1117, #161B22, #0D1117);
  background-size: 200% 100%;
  animation: gradientShift 8s ease infinite;
  border-top: 1px solid rgba(233,69,96,0.15);
  padding: 0;
}

.sub-navbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
}

.sub-navbar-inner a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 6px;
}

.sub-navbar-inner a:hover { color: #FFFFFF; background: rgba(233,69,96,0.15); }

/* ===== HERO / BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, #0D1117 0%, #1A1A2E 20%, #16213E 40%, #0F3460 60%, #E94560 85%, #FF6B6B 100%);
  background-size: 300% 300%;
  animation: gradientShift 10s ease infinite;
  padding: 70px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233,69,96,0.08) 0%, transparent 60%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-banner h1 {
  font-size: 44px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
  letter-spacing: -1px;
  animation: fadeInUp 0.8s ease;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-banner p {
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease 0.2s both;
  font-weight: 400;
}

.hero-banner .hero-cta {
  display: inline-block;
  padding: 16px 42px;
  background: var(--ml-blue);
  color: white;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease 0.4s both;
  box-shadow: 0 4px 20px rgba(233,69,96,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-banner .hero-cta:hover {
  background: var(--ml-blue-hover);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(233,69,96,0.6);
}

/* ===== CATEGORIES BAR ===== */
.categories-section {
  max-width: 1300px;
  margin: 36px auto;
  padding: 0 24px;
  animation: fadeInUp 0.6s ease;
  box-sizing: border-box;
}

.categories-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  justify-content: center;
  justify-items: center;
  align-items: start;
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  max-height: 75vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.category-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--ml-shadow);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--ml-accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-card:hover {
  box-shadow: var(--ml-shadow-hover);
  transform: translateY(-6px);
  border-color: rgba(233,69,96,0.2);
}

.category-card:hover::before { opacity: 1; }

.category-card .cat-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(233,69,96,0.08), rgba(255,107,107,0.08));
  transition: all 0.3s ease;
}

.category-card:hover .cat-icon {
  transform: scale(1.1) rotate(-3deg);
  background: linear-gradient(135deg, rgba(233,69,96,0.15), rgba(255,107,107,0.15));
}

.category-card .cat-name {
  font-size: 15px;
  color: var(--ml-gray-dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.category-card .cat-count {
  font-size: 13px;
  color: var(--ml-gray-light);
  margin-top: 2px;
}

/* ===== SERVICIOS ===== */
.servicios-section {
  max-width: 1300px;
  margin: 36px auto;
  padding: 0 24px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.servicios-section h2 {
  font-size: 28px; font-weight: 700; color: var(--ml-gray-dark); margin-bottom: 20px;
}
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.servicio-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  padding: 28px 20px;
  display: flex; align-items: flex-start; gap: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--ml-shadow);
  border: 1px solid transparent;
  text-decoration: none; color: inherit;
}
.servicio-card:hover {
  box-shadow: var(--ml-shadow-hover);
  transform: translateY(-4px);
  border-color: rgba(233,69,96,0.15);
}
.servicio-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  transition: transform 0.3s;
}
.servicio-card:hover .servicio-icon { transform: scale(1.1); }
.servicio-info { flex: 1; }
.servicio-info h3 { font-size: 16px; font-weight: 700; color: var(--ml-gray-dark); margin-bottom: 4px; }
.servicio-info p { font-size: 13px; color: var(--ml-gray-light); line-height: 1.4; }

/* ===== PRODUCT GRID ===== */
.products-section {
  max-width: 1300px;
  margin: 36px auto;
  padding: 0 24px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ml-gray-dark);
}

.section-header a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ml-blue);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.section-header a:hover {
  background: var(--ml-blue-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--ml-shadow);
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
  box-shadow: var(--ml-shadow-hover);
  transform: translateY(-8px);
  border-color: rgba(233,69,96,0.15);
}

.product-card .product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--ml-white);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .product-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card .product-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1E2035, #252840);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #555;
}

.product-card .product-info {
  padding: 14px 16px 18px;
}

.product-card .product-info > *:not(:last-child) {
  margin-bottom: 4px;
}

.product-card .product-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--ml-gray-dark);
}

.product-card .product-price-original {
  font-size: 12px;
  color: var(--ml-gray-light);
  text-decoration: line-through;
  margin-left: 8px;
}

.product-card .product-discount {
  color: var(--ml-green);
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

.product-card .product-name {
  font-size: 15px;
  color: var(--ml-gray-dark);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  font-weight: 500;
}

.product-card .envio-gratis {
  color: var(--ml-green);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.product-card .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.product-card .fav-btn:hover { background: var(--ml-white); transform: scale(1.15); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }

/* Boost badge & boosted card */
.product-card.boosted { border: 2px solid #FDCB6E; box-shadow: 0 4px 20px rgba(253,203,110,0.25); }
.product-card.boosted:hover { border-color: #f39c12; box-shadow: 0 8px 30px rgba(253,203,110,0.35); }
.boost-badge { position: absolute; top: 12px; left: 12px; background: linear-gradient(135deg, #FDCB6E, #f39c12); color: #000; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; z-index: 2; letter-spacing: 0.3px; }

/* Banners patrocinados */
.sponsored-banners-section { max-width: 1300px; margin: 20px auto; padding: 0 24px; }
.sponsored-banner-link { display: block; position: relative; border-radius: var(--ml-radius-lg); overflow: hidden; }
.sponsored-banner-img { width: 100%; height: auto; max-height: 240px; object-fit: cover; border-radius: var(--ml-radius-lg); display: block; }
.sponsored-label { position: absolute; bottom: 8px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 4px; }

/* ===== CATALOG PAGE ===== */
.catalog-layout {
  max-width: 1300px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
}

.filters-sidebar {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  padding: 24px;
  box-shadow: var(--ml-shadow);
  align-self: start;
  position: sticky;
  top: 80px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.filters-sidebar:hover { border-color: rgba(233,69,96,0.1); box-shadow: var(--ml-shadow-hover); }

.filters-sidebar h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 18px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.filter-group select,
.filter-group input[type="number"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius);
  font-size: 14px;
  outline: none;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--ml-blue);
}

.filter-price-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-price-range input {
  flex: 1;
  min-width: 0;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ml-gray);
  cursor: pointer;
  margin-top: 8px;
}

.filter-check input[type="checkbox"] {
  accent-color: var(--ml-blue);
}

.filter-cat-list {
  list-style: none;
}

.filter-cat-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--ml-gray-lighter);
}

.filter-cat-list li a {
  font-size: 14px;
  color: var(--ml-gray);
  display: flex;
  justify-content: space-between;
}

.filter-cat-list li a:hover { color: var(--ml-blue); }
.filter-cat-list li a .cat-qty { color: var(--ml-gray-light); font-size: 12px; }

.catalog-results .results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.catalog-results .results-header h2 {
  font-size: 20px;
  font-weight: 400;
  color: var(--ml-gray-dark);
}

.catalog-results .results-header span {
  font-size: 14px;
  color: var(--ml-gray-light);
}

.sort-options {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.sort-options span { color: var(--ml-gray-light); }

.sort-options a {
  color: var(--ml-gray);
  padding: 4px 8px;
  border-radius: 4px;
}

.sort-options a:hover, .sort-options a.active {
  color: var(--ml-blue);
  background: var(--ml-blue-light);
}

/* Product list view */
.product-list-item {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  display: flex;
  overflow: hidden;
  margin-bottom: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.product-list-item:hover {
  box-shadow: var(--ml-shadow-hover);
}

.product-list-item .list-img {
  width: 200px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--ml-white);
  padding: 16px;
}

.product-list-item .list-img img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.product-list-item .list-placeholder {
  width: 220px;
  min-height: 220px;
  background: linear-gradient(135deg, #1E2035, #252840);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #555;
  flex-shrink: 0;
}

.product-list-item .list-info {
  padding: 20px;
  flex: 1;
}

.product-list-item .list-info .product-name {
  font-size: 18px;
  color: var(--ml-gray-dark);
  font-weight: 400;
  margin-bottom: 12px;
}

.product-list-item .list-info .product-price {
  font-size: 28px;
  font-weight: 400;
  color: var(--ml-gray-dark);
}

.product-list-item .list-info .installments {
  font-size: 14px;
  color: var(--ml-green);
  margin-top: 4px;
}

.product-list-item .list-info .envio-gratis {
  color: var(--ml-green);
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.product-list-item .list-info .seller-info {
  font-size: 12px;
  color: var(--ml-gray-light);
  margin-top: 12px;
}

/* ===== PRODUCT DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.hidden { display: none; }

.modal-content {
  background: var(--ml-white);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.3s ease;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ml-gray);
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover { background: var(--ml-gray-lighter); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.product-detail .detail-gallery {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ml-white);
  border-right: 1px solid var(--ml-gray-lighter);
  min-height: 400px;
}

.product-detail .detail-gallery img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.product-detail .detail-gallery .no-image {
  font-size: 80px;
  color: #ddd;
}

.product-detail .detail-info {
  padding: 24px;
}

.detail-info .detail-condition {
  font-size: 12px;
  color: var(--ml-gray-light);
  text-transform: capitalize;
  margin-bottom: 8px;
}

.detail-info h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ml-gray-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.detail-info .detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-info .stars { color: var(--ml-blue); font-size: 16px; }
.detail-info .rating-count { font-size: 13px; color: var(--ml-gray-light); }

.detail-info .detail-price {
  font-size: 36px;
  font-weight: 300;
  color: var(--ml-gray-dark);
}

.detail-info .detail-original-price {
  font-size: 16px;
  color: var(--ml-gray-light);
  text-decoration: line-through;
}

.detail-info .detail-discount {
  color: var(--ml-green);
  font-size: 18px;
  font-weight: 600;
  margin-left: 8px;
}

.detail-info .detail-installments {
  font-size: 16px;
  color: var(--ml-green);
  margin-top: 8px;
}

.detail-info .detail-shipping {
  margin-top: 16px;
  padding: 12px;
  background: var(--ml-green-light);
  border-radius: var(--ml-radius);
  color: var(--ml-green);
  font-size: 14px;
  font-weight: 600;
}

.detail-info .detail-stock {
  margin-top: 16px;
  font-size: 14px;
}

.detail-info .stock-available { color: var(--ml-green); }
.detail-info .stock-low { color: var(--ml-orange); }
.detail-info .stock-none { color: var(--ml-red); }

.detail-info .detail-quantity {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-info .detail-quantity label {
  font-size: 14px;
  color: var(--ml-gray);
}

.detail-info .detail-quantity select {
  padding: 6px 12px;
  border: 1px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius);
  font-size: 14px;
}

.detail-info .detail-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-info .detail-desc {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ml-gray-lighter);
}

.detail-info .detail-desc h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.detail-info .detail-desc p {
  font-size: 14px;
  color: var(--ml-gray);
  line-height: 1.6;
}

/* Reviews section */
.reviews-section {
  padding: 24px;
  border-top: 1px solid var(--ml-gray-lighter);
  grid-column: 1 / -1;
}

.reviews-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--ml-gray-lighter);
}

.review-item:last-child { border-bottom: none; }

.review-item .review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.review-item .review-stars { color: var(--ml-blue); font-size: 14px; }
.review-item .review-author { font-size: 13px; color: var(--ml-gray); font-weight: 600; }
.review-item .review-date { font-size: 12px; color: var(--ml-gray-light); }
.review-item .review-text { font-size: 14px; color: var(--ml-gray-dark); margin-top: 4px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--ml-accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,69,96,0.45); }

.btn-secondary {
  background: var(--ml-blue-light);
  color: var(--ml-blue);
}
.btn-secondary:hover { background: #3A1A2E; }

.btn-success {
  background: linear-gradient(135deg, #00B894, #00D2A0);
  color: white;
  box-shadow: 0 4px 15px rgba(0,184,148,0.3);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,184,148,0.45); }

.btn-danger {
  background: linear-gradient(135deg, #F23D4F, #E74C5E);
  color: white;
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(242,61,79,0.35); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--ml-blue);
  color: var(--ml-blue);
}
.btn-outline:hover { background: var(--ml-blue-light); transform: translateY(-2px); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-whatsapp:hover { background: #1da851; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,211,102,0.35); }

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
}

.btn-block { width: 100%; }

/* ===== CART ===== */
.cart-page {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.cart-items {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  padding: 24px;
}

.cart-items h2 {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ml-gray-lighter);
  align-items: center;
  transition: background 0.2s;
}

.cart-item:hover {
  background: var(--ml-bg);
  border-radius: var(--ml-radius);
}

.cart-item:last-child { border-bottom: none; }

.cart-item .cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--ml-radius);
}

.cart-item .cart-item-placeholder {
  width: 80px;
  height: 80px;
  background: var(--ml-gray-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border-radius: var(--ml-radius);
}

.cart-item .cart-item-info { flex: 1; }
.cart-item .cart-item-name { font-size: 16px; color: var(--ml-gray-dark); }
.cart-item .cart-item-shipping { font-size: 12px; color: var(--ml-green); font-weight: 600; margin-top: 4px; }

.cart-item .cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ml-gray-lighter);
  background: var(--ml-white);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item .qty-btn:hover { background: var(--ml-gray-lighter); }
.cart-item .qty-value { font-size: 16px; min-width: 24px; text-align: center; }
.cart-item .cart-item-price { font-size: 20px; font-weight: 400; min-width: 100px; text-align: right; }
.cart-item .cart-item-delete { color: var(--ml-blue); font-size: 13px; cursor: pointer; background: none; border: none; }
.cart-item .cart-item-delete:hover { color: var(--ml-blue-hover); }

.cart-summary {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 80px;
}

.cart-summary h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
}

.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--ml-gray);
}

.cart-summary .summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 600;
  color: var(--ml-gray-dark);
  padding-top: 16px;
  border-top: 1px solid var(--ml-gray-lighter);
  margin-top: 12px;
  margin-bottom: 20px;
}

/* ===== DASHBOARD ===== */
.dashboard-layout {
  max-width: 1300px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.dash-sidebar {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  padding: 20px;
  align-self: start;
}

.dash-sidebar .user-info {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ml-gray-lighter);
  margin-bottom: 16px;
}

.dash-sidebar .user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ml-accent-gradient);
  color: white;
  font-size: 30px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 4px 15px rgba(233,69,96,0.3);
}

.dash-sidebar .user-name { font-size: 18px; font-weight: 700; }
.dash-sidebar .user-email { font-size: 14px; color: var(--ml-gray-light); }

.dash-menu { list-style: none; }
.dash-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--ml-radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--ml-gray);
  transition: all 0.2s ease;
}
.dash-menu li a:hover, .dash-menu li a.active {
  background: var(--ml-blue-light);
  color: var(--ml-blue);
  font-weight: 600;
}

.dash-content {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  padding: 24px;
}

.dash-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* ===== ADMIN ===== */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  box-shadow: var(--ml-shadow);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--ml-shadow-hover); border-color: rgba(233,69,96,0.1); }

.stat-card .stat-icon { font-size: 38px; margin-bottom: 10px; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: var(--ml-gray-dark); }
.stat-card .stat-label { font-size: 14px; color: var(--ml-gray-light); margin-top: 4px; font-weight: 500; }

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ml-gray-lighter);
  margin-bottom: 20px;
}

.admin-tabs button {
  padding: 14px 24px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--ml-gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.admin-tabs button:hover { color: var(--ml-blue); background: var(--ml-blue-light); }
.admin-tabs button.active {
  color: var(--ml-blue);
  border-bottom-color: var(--ml-blue);
  font-weight: 700;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ml-gray-light);
  border-bottom: 2px solid var(--ml-gray-lighter);
  font-weight: 700;
}

.data-table td {
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--ml-gray-lighter);
  color: var(--ml-gray-dark);
}

.data-table tr { transition: all 0.2s ease; }
.data-table tr:hover td { background: #1E2035; }

.data-table .thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-pending { background: #3D3520; color: #FFD54F; }
.badge-processing { background: var(--ml-blue-light); color: var(--ml-blue); }
.badge-shipped { background: #252640; color: #9A9BCA; }
.badge-delivered { background: var(--ml-green-light); color: var(--ml-green); }
.badge-cancelled { background: #3D1E22; color: var(--ml-red); }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #1E2035 25%, #252840 50%, #1E2035 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--ml-radius);
}

.skeleton-text { height: 16px; margin-bottom: 8px; width: 80%; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-box { height: 60px; width: 100%; }

/* Data table responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ml-radius);
}

.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-track { background: #1A1C2E; border-radius: 3px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--ml-gray-lighter); border-radius: 3px; }

/* Footer for all pages */
.footer-mini {
  background: var(--ml-yellow);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  margin-top: 40px;
}
.footer-mini a { color: var(--ml-blue); text-decoration: none; }
.footer-mini a:hover { text-decoration: underline; }
.footer-mini img { height: 32px; vertical-align: middle; margin-right: 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ml-gray-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
  background: var(--ml-bg);
  color: var(--ml-gray-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 4px rgba(233,69,96,0.1);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== AUTH MODAL ===== */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.auth-modal.hidden { display: none; }

.auth-box {
  background: var(--ml-white);
  border-radius: 14px;
  padding: 16px 14px;
  max-width: 90%;
  min-width: 280px;
  width: 340px;
  margin: auto;
  max-height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: scaleIn 0.3s ease;
}

.auth-box h2 {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  color: var(--ml-gray-dark);
}

.auth-box .auth-switch {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ml-gray);
}

.auth-box .auth-switch a {
  color: var(--ml-blue);
  cursor: pointer;
  font-weight: 600;
}

.auth-box .auth-error {
  background: #3D1E22;
  color: var(--ml-red);
  padding: 6px;
  border-radius: var(--ml-radius);
  font-size: 11px;
  margin-bottom: 6px;
  text-align: center;
  display: none;
}

.auth-box .form-group {
  margin-bottom: 6px;
}

.auth-box .form-group input,
.auth-box .form-group select {
  padding: 7px 10px;
  font-size: 13px;
}

.auth-box .form-group label {
  margin-bottom: 2px;
  font-size: 11px;
}

.phone-prefix {
  background: rgba(255,255,255,0.08);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ml-gray-dark);
  white-space: nowrap;
}

body.light-mode .phone-prefix {
  background: rgba(0,0,0,0.06);
  color: #1A1A2E;
}

.login-method-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 3px;
}
.login-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.login-tab.active {
  background: var(--ml-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(233,69,96,0.3);
}
body.light-mode .login-method-tabs {
  background: rgba(0,0,0,0.06);
}
body.light-mode .login-tab {
  color: rgba(0,0,0,0.4);
}
body.light-mode .login-tab.active {
  color: #fff;
}

.auth-box .btn {
  padding: 8px 16px;
  font-size: 13px;
}

.auth-box .btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

@media (max-height: 700px) {
  .auth-modal { padding: 4px; }
  .auth-box { padding: 12px 10px; border-radius: 10px; max-height: calc(100vh - 10px); }
  .auth-box h2 { font-size: 16px; margin-bottom: 6px; }
  .auth-box .form-group { margin-bottom: 4px; }
  .auth-box .form-group input,
  .auth-box .form-group select { padding: 6px 8px; font-size: 12px; }
  .auth-box .btn { padding: 6px 12px; font-size: 12px; }
}

/* Divider "o continúa con" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #aaa;
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #2A2A3E;
}

/* Google fallback button */
.btn-google-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 2px solid #2A2A3E;
  border-radius: 50px;
  background: #1A1C2E;
  font-size: 15px;
  font-weight: 600;
  color: #E8E8F0;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-google-fallback:hover {
  border-color: #4285F4;
  background: #1E2040;
}

/* Código de verificación - 6 dígitos */
.codigo-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}
.codigo-digit {
  width: 48px;
  height: 56px;
  border: 2px solid #2A2A3E;
  border-radius: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #E8E8F0;
  background: #1A1C2E;
  transition: all 0.2s;
  outline: none;
}
.codigo-digit:focus {
  border-color: var(--ml-blue);
  background: #222440;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.15);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.pagination button {
  padding: 10px 16px;
  border: 1px solid var(--ml-gray-lighter);
  background: var(--ml-white);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ml-blue);
  transition: all 0.2s ease;
}

.pagination button:hover { background: var(--ml-blue-light); transform: translateY(-1px); }
.pagination button.active { background: var(--ml-blue); color: white; border-color: var(--ml-blue); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }
.pagination button:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 28px;
  border-radius: 14px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  z-index: 5000;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

.toast-success { background: linear-gradient(135deg, #00B894, #00D2A0); }
.toast-error { background: linear-gradient(135deg, #F23D4F, #E74C5E); }
.toast-info { background: linear-gradient(135deg, #E94560, #FF6B6B); }

/* ===== TRANSFERENCIA / PAGO ===== */
.transfer-box {
  background: linear-gradient(135deg, #151728, #1A1C30);
  border: 2px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius-lg);
  padding: 20px;
  text-align: center;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.transfer-box:hover { border-color: rgba(233,69,96,0.2); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.transfer-icon { font-size: 36px; margin-bottom: 8px; }

.transfer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 12px;
}

.transfer-clabe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ml-white);
  border: 2px dashed var(--ml-blue);
  border-radius: var(--ml-radius);
  padding: 12px 16px;
  margin: 8px 0;
}

.clabe-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ml-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clabe-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--ml-blue);
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

.clabe-copy {
  background: var(--ml-blue-light);
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.clabe-copy:hover { background: var(--ml-blue); color: white; transform: scale(1.1); }

.transfer-instructions {
  margin-top: 12px;
  text-align: left;
}

.transfer-instructions p {
  font-size: 14px;
  color: var(--ml-gray);
  padding: 4px 0;
  line-height: 1.5;
}

.transfer-instructions p::first-letter { font-weight: 700; }

.payment-section { border-top: 1px solid var(--ml-gray-lighter); margin-top: 12px; }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== SUBSCRIPTION PLANS ===== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.plan-card {
  background: var(--ml-white);
  border: 2px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius-lg);
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.plan-card:hover { border-color: var(--ml-blue); transform: translateY(-6px); box-shadow: var(--ml-shadow-hover); }
.plan-card.recommended { border-color: var(--ml-blue); position: relative; box-shadow: 0 8px 30px rgba(233,69,96,0.15); }
.plan-card.recommended::before {
  content: 'MÁS POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ml-accent-gradient);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.plan-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 10px;
}

.plan-card .plan-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--ml-gray-dark);
  margin: 14px 0;
}

.plan-card .plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--ml-gray-light);
}

.plan-card .plan-features {
  list-style: none;
  margin: 20px 0;
  text-align: left;
}

.plan-card .plan-features li {
  padding: 8px 0;
  font-size: 15px;
  color: var(--ml-gray);
}

.plan-card .plan-features li::before {
  content: '✓ ';
  color: var(--ml-green);
  font-weight: 700;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon { font-size: 72px; margin-bottom: 20px; }
.empty-state h3 { font-size: 22px; font-weight: 600; color: var(--ml-gray-dark); margin-bottom: 10px; }
.empty-state p { font-size: 15px; color: var(--ml-gray-light); margin-bottom: 24px; }

/* ===== LOADER ===== */
.loader {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--ml-gray-lighter);
  border-top-color: var(--ml-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== CONTRATACIONES ===== */
.contrataciones-section {
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1b2a 40%, #1b0a2e 100%);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contrataciones-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 500px; height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(77,159,255,0.12), transparent 70%);
  pointer-events: none;
}
.contrataciones-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}
.contrataciones-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
.contrataciones-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(77,159,255,0.3);
}
.contrataciones-section p {
  color: rgba(200,215,240,0.75);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.contrataciones-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  border-radius: 30px;
  background: linear-gradient(135deg, #4d9fff, #7c3aed);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 28px rgba(77,159,255,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.contrataciones-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 36px rgba(124,58,237,0.45);
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(180deg, var(--ml-white) 0%, #0F1119 100%);
  border-top: 2px solid var(--ml-gray-lighter);
  margin-top: 60px;
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ml-gray-dark);
  margin-bottom: 16px;
}

.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a {
  font-size: 14px;
  color: var(--ml-gray);
  transition: all 0.2s ease;
  padding: 2px 0;
}

.footer ul li a:hover { color: var(--ml-blue); }

.footer-bottom {
  max-width: 1300px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--ml-gray-lighter);
  text-align: center;
  font-size: 14px;
  color: var(--ml-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ===== TIPO SELECTOR (REGISTRO) ===== */
.tipo-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.tipo-option {
  flex: 1;
  position: relative;
}

.tipo-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tipo-option label {
  display: block;
  padding: 6px 8px;
  border: 2px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 600;
  color: var(--ml-gray);
}

.tipo-option input[type="radio"]:checked + label {
  border-color: var(--ml-blue);
  background: var(--ml-blue-light);
  color: var(--ml-blue);
}

.tipo-option label .tipo-icon {
  display: inline;
  font-size: 16px;
  margin-right: 4px;
}

.vendedor-info-box {
  background: linear-gradient(135deg, #2A1A2E, #251A28);
  border: 1px solid #3D2A3E;
  border-radius: var(--ml-radius);
  padding: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--ml-gray-dark);
  text-align: center;
}

.vendedor-info-box .precio-vendedor {
  font-size: 15px;
  font-weight: 700;
  color: var(--ml-blue);
  margin: 1px 0;
}

.vendedor-info-box .trial-info {
  color: var(--ml-green);
  font-weight: 600;
}

/* Vendor subscription dashboard card */
.vendor-sub-card {
  background: var(--ml-white);
  border: 2px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.vendor-sub-card:hover { transform: translateY(-3px); box-shadow: var(--ml-shadow-hover); }

.vendor-sub-card.active {
  border-color: var(--ml-green);
  background: var(--ml-green-light);
}

.vendor-sub-card.expired {
  border-color: var(--ml-red);
  background: #2A1518;
}

.vendor-sub-card .sub-status {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.vendor-sub-card .sub-detail {
  font-size: 15px;
  color: var(--ml-gray);
  margin-bottom: 6px;
}

/* ===== RESPONSIVE ===== */

/* Tablets grandes y laptops pequeñas */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 220px 1fr; gap: 16px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; justify-content: center; }
  .product-detail { grid-template-columns: 1fr 1fr; }
  .search-container { max-width: 480px; }
  .navbar-actions { gap: 14px; }
  .navbar-actions a, .navbar-actions button { font-size: 13px; padding: 6px 8px; }
  .nav-icon { height: 22px; width: 22px; }
  .admin-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

/* Tablets */
@media (max-width: 768px) {
  .navbar-inner { flex-wrap: wrap; }
  .search-container { order: 3; flex-basis: 100%; max-width: 100%; margin-top: 8px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .cart-page { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .product-list-item { flex-direction: column; }
  .product-list-item .list-img, .product-list-item .list-placeholder { width: 100%; min-height: 180px; }
  .form-row { grid-template-columns: 1fr; }
  .navbar-actions { gap: 10px; }
  .nav-icon { height: 20px; width: 20px; }
  .hero-banner h1 { font-size: 28px; }
  .hero-banner { padding: 40px 16px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; justify-content: center; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .plans-grid { grid-template-columns: 1fr 1fr; }
  .hero-banner p { font-size: 15px; }
  .categories-section h2, .section-header h2 { font-size: 22px; }
  .modal-content { margin: 10px; }
}

/* Móviles */
@media (max-width: 480px) {
  .navbar-actions a span, .navbar-actions a:not(.cart-icon):not(#navLogin):not(#navUser):not(#navLogout) { font-size: 12px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card .product-info { padding: 10px 12px 14px; }
  .product-card .product-price { font-size: 18px; }
  .product-card .product-name { font-size: 13px; }
  .categories-section { padding: 0 12px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0; max-width: 420px; margin: 0 auto; }
  .category-card { padding: 12px 8px; min-width: 0; }
  .category-card .cat-icon { font-size: 24px; width: 48px; height: 48px; }
  .category-card .cat-name { font-size: 15px; }
  .hero-banner h1 { font-size: 22px; }
  .hero-banner p { font-size: 14px; }
  .hero-banner .hero-cta { padding: 12px 28px; font-size: 14px; }
  .admin-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .plans-grid { grid-template-columns: 1fr; }
  .empty-state { padding: 40px 16px; }
  .cart-item { flex-wrap: wrap; }
  .aviso-legal-banner { font-size: 12px; padding: 10px 16px; }
}

/* ===== ASISTENTE IA CHATBOT ===== */
.ia-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ml-blue), var(--ml-accent));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 28px rgba(233,69,96,0.45);
  transition: transform 0.3s, box-shadow 0.3s;
}
.ia-fab:hover { transform: scale(1.1); box-shadow: 0 8px 36px rgba(233,69,96,0.6); }
.ia-fab-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; pointer-events: none; }
.ia-fab-pulse {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 3px solid var(--ml-accent); opacity: 0;
  animation: iaPulse 2s ease-out infinite;
}
@keyframes iaPulse { 0% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1.3); opacity: 0; } }

.ia-chat {
  position: fixed; bottom: 28px; right: 28px; z-index: 10000;
  width: 380px; max-height: 540px; border-radius: 20px;
  background: #1a1c2e; backdrop-filter: blur(20px);
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  display: flex; flex-direction: column;
  animation: iaChatIn 0.3s ease;
  overflow: hidden;
}
.ia-chat.hidden { display: none; }
@keyframes iaChatIn { from { opacity:0; transform: translateY(20px) scale(0.95); } to { opacity:1; transform: translateY(0) scale(1); } }

.ia-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--ml-dark), #1a1f2e);
  color: #fff; border-radius: 20px 20px 0 0;
}
.ia-chat-header-info { display: flex; align-items: center; gap: 12px; }
.ia-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); padding: 2px; }
.ia-chat-name { font-size: 15px; font-weight: 700; }
.ia-chat-status { font-size: 12px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 5px; }
.ia-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; display: inline-block; }
.ia-chat-close {
  background: rgba(0,0,0,0.45); border: none; color: #FFFFFF;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px;
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
  padding: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ia-chat-close:hover { background: rgba(0,0,0,0.6); }

.ia-chat-body {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: 360px; min-height: 260px;
}
.ia-chat-body::-webkit-scrollbar { width: 5px; }
.ia-chat-body::-webkit-scrollbar-thumb { background: #3A3A4E; border-radius: 8px; }

.ia-msg { display: flex; }
.ia-msg-bot { justify-content: flex-start; }
.ia-msg-user { justify-content: flex-end; }
.ia-msg-bubble {
  max-width: 82%; padding: 12px 16px; border-radius: 18px;
  font-size: 14px; line-height: 1.5; word-wrap: break-word;
}
.ia-msg-bot .ia-msg-bubble {
  background: #1E2035; color: #E8E8F0;
  border-bottom-left-radius: 4px;
}
.ia-msg-user .ia-msg-bubble {
  background: linear-gradient(135deg, var(--ml-blue), var(--ml-accent));
  color: #fff; border-bottom-right-radius: 4px;
}

.ia-typing span {
  display: inline-block; width: 8px; height: 8px;
  background: #555; border-radius: 50%; margin: 0 2px;
  animation: iaTypingDot 1.2s infinite;
}
.ia-typing span:nth-child(2) { animation-delay: 0.2s; }
.ia-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes iaTypingDot { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.ia-suggestions {
  display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px;
}
.ia-suggestion {
  background: rgba(233,69,96,0.08); border: 1px solid rgba(233,69,96,0.2);
  color: #B0B0C0; padding: 7px 14px; border-radius: 20px;
  font-size: 12.5px; cursor: pointer; transition: all 0.2s;
  white-space: nowrap;
}
.ia-suggestion:hover {
  background: var(--ml-blue); color: #fff; border-color: var(--ml-blue);
}

.ia-chat-footer {
  display: flex; gap: 10px; padding: 14px 16px;
  border-top: 1px solid #2A2A3E; background: #151728;
  border-radius: 0 0 20px 20px;
}
.ia-chat-footer input {
  flex: 1; border: 1.5px solid #2A2A3E; border-radius: 24px;
  padding: 10px 18px; font-size: 14px; outline: none;
  transition: border-color 0.2s; background: #1A1C2E; color: #E8E8F0;
}
.ia-chat-footer input:focus { border-color: var(--ml-blue); }
.ia-chat-footer button {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--ml-blue), var(--ml-accent));
  color: #fff; font-size: 18px; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ia-chat-footer button:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(233,69,96,0.4); }

@media (max-width: 480px) {
  .ia-chat {
    width: 85%;
    max-width: calc(100vw - var(--safe-left) - var(--safe-right));
    right: var(--safe-right);
    bottom: var(--safe-bottom);
    max-height: 80vh;
    max-height: 80dvh;
    border-radius: 12px;
    font-size: 0.95rem;
  }
  .ia-chat-body { padding: 12px; min-height: 200px; }
  .ia-msg-bubble { padding: 10px 12px; font-size: 13px; }
  .ia-chat-footer { padding: 10px 12px; }
  .ia-chat-footer input { padding: 8px 14px; font-size: 13px; }
  .ia-fab { bottom: 18px; right: 18px; width: 56px; height: 56px; }
}

/* Asistente IA - Light mode */
body.light-mode .ia-chat {
  background: #fff;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12);
  color: #1a1a2e;
}
body.light-mode .ia-msg-bot .ia-msg-bubble {
  background: #f0f0f5;
  color: #1a1a2e;
}
body.light-mode .ia-suggestion {
  background: rgba(233,69,96,0.06);
  border-color: rgba(233,69,96,0.25);
  color: #333;
}
body.light-mode .ia-suggestion:hover {
  background: var(--ml-blue);
  color: #fff;
}
body.light-mode .ia-chat-footer {
  background: #f5f5f8;
  border-top: 1px solid #e0e0e5;
}
body.light-mode .ia-chat-footer input {
  background: #fff;
  color: #1a1a2e;
  border-color: #d0d0d8;
}
body.light-mode .ia-chat-footer input::placeholder {
  color: #999;
}
body.light-mode .ia-chat-body::-webkit-scrollbar-thumb {
  background: #ccc;
}

/* ===== BANNER DESCARGA APP ===== */
.app-download-banner {
  background: linear-gradient(135deg, #E94560, #C43850);
  padding: 10px 16px;
  position: relative;
  z-index: 95;
}
.app-download-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}
.app-download-icon { font-size: 28px; flex-shrink: 0; }
.app-download-text { text-align: left; }
.app-download-text strong { display: block; color: #fff; font-size: 14px; }
.app-download-text span { color: rgba(255,255,255,0.85); font-size: 12px; }
.app-download-btn {
  background: #fff;
  color: #E94560;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
}
.app-download-btn:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.app-download-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
}
.app-download-close:hover { color: #fff; }
@media (max-width: 600px) {
  .app-download-inner { gap: 8px; }
  .app-download-text strong { font-size: 13px; }
  .app-download-btn { padding: 6px 14px; font-size: 12px; }
}

/* ===== AVISO LEGAL / DISCLAIMER ===== */
.aviso-legal-banner {
  background: linear-gradient(135deg, #2A2515, #252015);
  border-bottom: 2px solid #5D4020;
  padding: 14px 24px;
  text-align: center;
  font-size: 13px;
  color: #C8A070;
  line-height: 1.6;
  position: relative;
  z-index: 90;
}
.aviso-legal-banner strong { color: #FF8C00; }
.aviso-legal-banner a { color: var(--ml-blue); text-decoration: underline; cursor: pointer; font-weight: 600; }

.aviso-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
.aviso-modal-overlay.hidden { display: none; }
.aviso-modal {
  background: #1A1C2E; border-radius: 18px; max-width: 560px; width: 92%; max-height: 85vh;
  overflow-y: auto; padding: 32px; box-shadow: 0 20px 60px rgba(0,0,0,.55);
  animation: scaleIn .25s;
}
.aviso-modal h2 { font-size: 22px; text-align: center; margin-bottom: 8px; color: #FF8C00; }
.aviso-modal .aviso-icon { text-align: center; font-size: 48px; margin-bottom: 12px; }
.aviso-modal .aviso-section { background: #2A2515; border-left: 4px solid #5D4020; padding: 14px 16px; border-radius: 8px; margin: 14px 0; }
.aviso-modal .aviso-section.danger { background: #2A1518; border-left-color: #E53935; }
.aviso-modal .aviso-section h3 { font-size: 15px; margin: 0 0 6px; }
.aviso-modal .aviso-section p { font-size: 13px; margin: 0; color: #C8A070; line-height: 1.6; }
.aviso-modal .aviso-section.danger p { color: #FF6B6B; }
.aviso-modal .aviso-accept {
  display: block; width: 100%; margin-top: 20px; padding: 14px;
  background: var(--ml-accent-gradient); color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .2s;
}
.aviso-modal .aviso-accept:hover { transform: scale(1.02); }

/* Admin modal usuario */
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9999; display: flex; align-items: center; justify-content: center; animation: fadeIn .2s; }
.admin-modal-overlay.hidden { display: none; }
.admin-modal-content { background: #1A1C2E; border-radius: 16px; max-width: 520px; width: 92%; max-height: 85vh; overflow-y: auto; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: scaleIn .25s; position: relative; }
.admin-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #8B8B9E; }
.admin-modal-close:hover { color: #E8E8F0; }

/* ===== DARK / LIGHT MODE TOGGLE ===== */
.theme-toggle {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #fff;
}
.theme-toggle:hover { background: rgba(255,255,255,0.25); transform: rotate(30deg); }

body.light-mode { --ml-bg: #F4F6FA; --ml-white: #FFFFFF; --ml-gray-dark: #1A1A2E; --ml-gray: #4A4A5A; --ml-gray-lighter: #E8E8F0; --ml-blue-light: #FDE8EC; --ml-green-light: #E6F7ED; --ml-shadow: 0 2px 8px rgba(0,0,0,.04); --ml-shadow-hover: 0 12px 32px rgba(0,0,0,.14); }
body.light-mode .navbar { background: linear-gradient(270deg, #1a237e, #283593, #3949ab, #1565c0, #283593, #1a237e); background-size: 400% 400%; animation: gradientShift 12s ease infinite; }
body.light-mode .sub-navbar { background: linear-gradient(90deg, #1a237e, #283593, #1a237e); background-size: 200% 100%; animation: gradientShift 8s ease infinite; }
body.light-mode .footer { background: #1a237e; }
body.light-mode .footer h4 { color: #fff; }
body.light-mode .footer ul li a { color: rgba(255,255,255,0.75); }
body.light-mode .footer ul li a:hover { color: #fff; }
body.light-mode .footer-bottom { color: rgba(255,255,255,0.6); border-top-color: rgba(255,255,255,0.15); }
body.light-mode .donadores-section { background: linear-gradient(135deg,#e8eaf6 0%,#f5f5f5 100%) !important; }
body.light-mode .donadores-section h2 { color: #1a1a2e !important; }
body.light-mode .donadores-section p { color: rgba(0,0,0,0.7) !important; }

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ml-white);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}
.autocomplete-dropdown.show { display: block; }
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--ml-gray-lighter);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--ml-blue-light); }
.autocomplete-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }
.autocomplete-item .ac-info { flex: 1; }
.autocomplete-item .ac-name { font-size: 14px; font-weight: 500; color: var(--ml-gray-dark); }
.autocomplete-item .ac-price { font-size: 13px; font-weight: 600; color: var(--ml-blue); }

/* ===== NOTIFICATION BELL ===== */
.notif-bell {
  position: relative;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: none;
  border: none;
  color: rgba(255,255,255,0.9);
}
.notif-bell:hover { background: rgba(255,255,255,0.1); color: #fff; }
.notif-badge {
  position: absolute;
  top: 0;
  right: 2px;
  background: var(--ml-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  display: none;
}
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 440px;
  overflow-y: auto;
  background: var(--ml-white);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  z-index: 1002;
  display: none;
}
.notif-dropdown.show { display: block; }
.notif-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ml-gray-lighter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--ml-gray-dark);
}
.notif-dropdown-header a { font-size: 13px; font-weight: 500; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ml-gray-lighter);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notif-item:hover { background: var(--ml-bg); }
.notif-item.unread { background: var(--ml-blue-light); }
.notif-item-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item .notif-title { font-size: 14px; font-weight: 600; color: var(--ml-gray-dark); }
.notif-item .notif-msg { font-size: 13px; color: var(--ml-gray); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item .notif-time { font-size: 11px; color: var(--ml-gray-light); margin-top: 4px; }

/* Real-time notification toast */
.notif-toast-rt {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  background: var(--ml-white);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 360px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-left: 4px solid var(--ml-blue);
}
.notif-toast-rt.show { transform: translateX(0); }
.notif-toast-rt .notif-toast-icon { font-size: 26px; flex-shrink: 0; }
.notif-toast-rt strong { font-size: 14px; color: var(--ml-gray-dark); display: block; }
.notif-toast-rt p { font-size: 12px; color: var(--ml-gray); margin: 2px 0 0; }

/* ===== MESSAGING UI ===== */
.chat-container {
  display: flex;
  height: 500px;
  border: 1px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius-lg);
  overflow: hidden;
}
.chat-sidebar {
  width: 280px;
  border-right: 1px solid var(--ml-gray-lighter);
  overflow-y: auto;
  background: var(--ml-white);
}
.chat-conv-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ml-gray-lighter);
  cursor: pointer;
  transition: background 0.15s;
}
.chat-conv-item:hover, .chat-conv-item.active { background: var(--ml-blue-light); }
.chat-conv-item .conv-name { font-size: 14px; font-weight: 600; }
.chat-conv-item .conv-preview { font-size: 12px; color: var(--ml-gray-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-item .conv-unread { background: var(--ml-blue); color: white; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; float: right; }
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--ml-bg);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-msg.sent { align-self: flex-end; background: var(--ml-blue); color: white; border-bottom-right-radius: 4px; }
.chat-msg.received { align-self: flex-start; background: var(--ml-white); color: var(--ml-gray-dark); border-bottom-left-radius: 4px; box-shadow: var(--ml-shadow); }
.chat-msg .msg-time { font-size: 11px; opacity: 0.7; margin-top: 4px; }
.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--ml-gray-lighter);
  background: var(--ml-white);
}
.chat-input-area input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--ml-gray-lighter);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
}
.chat-input-area input:focus { border-color: var(--ml-blue); }
.chat-input-area button {
  padding: 10px 20px;
  background: var(--ml-blue);
  color: white;
  border: none;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-input-area button:hover { background: var(--ml-blue-hover); }

/* ===== TRACKING TIMELINE ===== */
.tracking-timeline { padding: 16px 0; }
.tracking-step {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  position: relative;
}
.tracking-step::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: -12px;
  width: 2px;
  background: var(--ml-gray-lighter);
}
.tracking-step:last-child::before { display: none; }
.tracking-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ml-gray-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}
.tracking-step.active .tracking-dot { background: var(--ml-blue); color: white; }
.tracking-step.completed .tracking-dot { background: var(--ml-green); color: white; }
.tracking-info .tracking-title { font-size: 14px; font-weight: 600; }
.tracking-info .tracking-date { font-size: 12px; color: var(--ml-gray-light); }
.tracking-info .tracking-desc { font-size: 13px; color: var(--ml-gray); margin-top: 2px; }

/* ===== COUPON INPUT ===== */
.coupon-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.coupon-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius);
  font-size: 14px;
}
.coupon-row button {
  padding: 10px 16px;
  background: var(--ml-green);
  color: white;
  border: none;
  border-radius: var(--ml-radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.coupon-applied {
  background: var(--ml-green-light);
  color: var(--ml-green);
  padding: 8px 14px;
  border-radius: var(--ml-radius);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

/* ===== POINTS BADGE ===== */
.points-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #5D4037;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== WISHLIST ===== */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.wishlist-card {
  background: var(--ml-white);
  border-radius: var(--ml-radius-lg);
  padding: 16px;
  box-shadow: var(--ml-shadow);
  transition: all 0.2s ease;
}
.wishlist-card:hover { box-shadow: var(--ml-shadow-hover); }
.wishlist-card h4 { font-size: 16px; margin-bottom: 8px; }
.wishlist-card .wl-meta { font-size: 12px; color: var(--ml-gray-light); }

/* ===== VENDOR BADGE ===== */
.vendor-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #4CAF50, #66BB6A);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ===== ADDRESS CARDS ===== */
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.address-card {
  border: 1px solid var(--ml-gray-lighter);
  border-radius: var(--ml-radius-lg);
  padding: 16px;
  position: relative;
  transition: all 0.2s;
}
.address-card.default { border-color: var(--ml-blue); background: var(--ml-blue-light); }
.address-card .addr-default-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--ml-blue);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
}

/* ===== IMAGE GALLERY ===== */
.detail-gallery-multi { display: flex; gap: 8px; }
.detail-gallery-multi .gallery-main { flex: 1; }
.detail-gallery-multi .gallery-main img { width: 100%; border-radius: var(--ml-radius-lg); }
.detail-gallery-multi .gallery-thumbs { display: flex; flex-direction: column; gap: 6px; width: 70px; }
.detail-gallery-multi .gallery-thumbs img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.detail-gallery-multi .gallery-thumbs img:hover,
.detail-gallery-multi .gallery-thumbs img.active { border-color: var(--ml-blue); }

/* ===== RESPONSIVE ADJUSTMENTS FOR NEW COMPONENTS ===== */
@media (max-width: 768px) {
  .chat-container { flex-direction: column; height: 600px; }
  .chat-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--ml-gray-lighter); }
  .notif-dropdown { width: 300px; right: -50px; }
  .detail-gallery-multi { flex-direction: column-reverse; }
  .detail-gallery-multi .gallery-thumbs { flex-direction: row; width: 100%; overflow-x: auto; }
  .detail-gallery-multi .gallery-thumbs img { width: 60px; height: 60px; }
}

/* ===== ZOOM LOCK & MOBILE OVERFLOW PREVENTION ===== */
html {
  touch-action: manipulation;
}
*, *::before, *::after { max-width: 100vw; }
body {
  overflow-x: hidden;
  touch-action: pan-y;
}

@media (max-width: 480px) {
  body { padding-left: 0; padding-right: 0; }
  .navbar-actions { justify-content: center; gap: 8px; width: 100%; }
  .nav-icon { height: 18px; width: 18px; }
  .navbar-actions a, .navbar-actions button { display: flex; align-items: center; justify-content: center; }
  .notif-bell { display: flex; align-items: center; justify-content: center; }
  .cart-icon { display: flex; align-items: center; justify-content: center; }
  #themeToggle { display: flex; align-items: center; justify-content: center; }
  #navLogin, #navUser { display: flex; align-items: center; justify-content: center; }
  .ia-fab { display: flex; align-items: center; justify-content: center; }
  .auth-box { padding: 14px 12px; border-radius: 12px; }
  .auth-box h2 { font-size: 17px; }
  .login-method-tabs { margin-bottom: 10px; }
  .login-tab { font-size: 12px; padding: 7px 0; }
  .ia-chat-header { padding: 12px 14px; }
  .hero-banner { padding: 10px 12px 32px; }
}
