:root {
  --color-primary: #1E3A8A;
  --color-primary-dark: #152C6B;
  --color-accent: #F59E0B;
  --color-accent-hover: #D97706;
  --color-bg: #F9FAFB;
  --color-card: #FFFFFF;
  --color-text: #111827;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-badge-red: #EF4444;
  --color-badge-orange: #F59E0B;
  --color-badge-green: #10B981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);

  /* Variables legadas para compatibilidad con otras secciones */
  --azul-rey: var(--color-primary);
  --dorado: var(--color-accent);
  --fondo: var(--color-bg);
  --texto-oscuro: var(--color-text);
  --texto-claro: var(--color-text-muted);
  --verde-btn: var(--color-success);
  --borde-color: var(--color-border);
  --item-bg: #F3F4F6;
}
body.dark-mode {
  --color-bg: #111827;
  --color-card: #1F2937;
  --color-text: #F9FAFB;
  --color-text-muted: #9CA3AF;
  --color-border: #374151;
  --item-bg: #1F2937;
  --fondo: var(--color-bg);
  --texto-oscuro: var(--color-text);
  --texto-claro: var(--color-text-muted);
  --borde-color: var(--color-border);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; outline: none; }
.premium-title { font-family: 'Montserrat', sans-serif; }
body { background-color: var(--fondo); color: var(--texto-oscuro); padding-bottom: 90px; transition: background 0.3s, color 0.3s; scroll-behavior: smooth; }

input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } input[type=number] { -moz-appearance: textfield; }

body.dark-mode .checkout-box, body.dark-mode .cart-item, body.dark-mode .cross-modal-content { background: #1f2937; color: white; border-color: #374151; box-shadow: none; }
body.dark-mode .cat-btn { background: #1F2937; border-color: #374151; color: #F9FAFB; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
body.dark-mode .cat-btn i { color: var(--color-accent); }
body.dark-mode .cat-btn:hover { border-color: var(--color-accent); box-shadow: 0 6px 12px rgba(245, 158, 11, 0.1); transform: translateY(-3px); }
body.dark-mode .cat-btn.active { background: var(--color-accent); color: #111827; border-color: var(--color-accent); }
body.dark-mode .cat-btn.active i { color: #111827; }
body.dark-mode .input-text, body.dark-mode .input-select, body.dark-mode .dob-input { background: #374151; color: white; border-color: #4b5563; }
body.dark-mode .tasa-bcv { background: rgba(0,0,0,0.5); border-color: rgba(245, 167, 0, 0.3); }

#age-gate { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 19, 43, 0.98); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.age-box { background: white; border: 1px solid var(--dorado); padding: 30px; border-radius: 20px; text-align: center; max-width: 320px; width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.8); }
body.dark-mode .age-box { background: #1f2937; color: white; }
.dob-container { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.dob-input { width: 60px; padding: 10px; text-align: center; border: 1px solid var(--borde-color); border-radius: 8px; font-weight: bold; font-size: 16px; } .dob-input#age-y { width: 80px; }
.age-btn { width: 100%; padding: 12px; background: var(--dorado); color: black; border: none; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 16px; transition: 0.2s; letter-spacing: 1px;}
.age-error { color: #ea4335; font-size: 12px; margin-top: 10px; display: none; font-weight: bold; }

/* --- CONTENEDOR PRINCIPAL --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- HEADER E-COMMERCE MODERNO --- */
.site-header { background-color: var(--color-white); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: 0.3s background; }
.header-top-bar { background-color: var(--color-primary-dark); color: #fff; text-align: center; font-size: 12px; font-weight: 500; padding: 8px 16px; }
.header-main-bar { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.header-main-container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: nowrap; }
.header-left { display: flex; align-items: center; gap: 15px; }
.header-brand { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--color-primary); text-decoration: none; }
.brand-icon { font-size: 22px; }
.brand-text { font-size: 18px; font-weight: 700; font-family: 'Poppins', sans-serif; letter-spacing: -0.5px; color: var(--color-text); white-space: nowrap; }
.header-location { display: flex; align-items: center; gap: 8px; cursor: pointer; padding-left: 15px; border-left: 1px solid var(--color-border); }
.location-icon { color: var(--color-text-muted); font-size: 16px; }
.location-text { display: flex; flex-direction: column; line-height: 1.1; }
.location-label { font-size: 10px; color: var(--color-text-muted); }
.location-value { font-size: 12px; font-weight: 600; color: var(--color-text); }
.header-center { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; margin: 0 10px; }
.search-pill { background-color: var(--color-bg); border-radius: var(--radius-md); display: flex; align-items: center; padding: 8px 15px; transition: border-color 0.2s; border: 1px solid var(--color-border); position: relative; width: 100%; max-width: 500px; }
.search-pill:focus-within { background-color: var(--color-white); border-color: var(--color-primary); }
.search-icon { color: var(--color-text-muted); font-size: 15px; margin-right: 12px; }
.search-pill input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--color-text); font-family: inherit; width: 100%; }
.clear-search-icon { color: var(--color-text-muted); font-size: 16px; padding: 0 5px; cursor: pointer; transition: 0.2s; display: none; }
.header-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; background-color: var(--color-bg); color: var(--color-text); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; position: relative; transition: 0.2s; border: none; }
.icon-btn:hover { background-color: var(--color-primary); color: var(--color-white); }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; background-color: var(--color-badge-red); color: var(--color-white); font-size: 10px; font-weight: bold; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--color-white); }

.header-nav-bar { background-color: var(--color-white); border-bottom: 1px solid var(--color-border); }
.header-nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-links-left, .nav-links-right { display: flex; align-items: center; gap: 20px; }
.nav-link { color: var(--color-text-muted); text-decoration: none; font-size: 13px; font-weight: 500; padding: 12px 0; border-bottom: 2px solid transparent; transition: 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.btn-support { background-color: rgba(37, 211, 102, 0.1); color: #25D366; border: none; padding: 6px 12px; border-radius: var(--radius-md); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
.btn-support:hover { background-color: #25D366; color: white; }

/* Adaptación de Dark Mode para el nuevo Header */
body.dark-mode .site-header, body.dark-mode .header-main-bar, body.dark-mode .header-nav-bar { background-color: #1f2937; border-color: #374151; }
body.dark-mode .header-top-bar { background-color: var(--color-primary-dark); }
body.dark-mode .brand-text, body.dark-mode .location-value { color: var(--color-white); }
body.dark-mode .search-pill { background-color: #374151; border-color: #4b5563; }
body.dark-mode .search-pill:focus-within { background-color: #1f2937; border-color: var(--color-accent); }
body.dark-mode .search-pill input { color: var(--color-white); }
body.dark-mode .icon-btn { background-color: #374151; color: var(--color-white); }
body.dark-mode .icon-btn:hover { background-color: var(--color-primary); }
body.dark-mode .icon-btn .badge { border-color: #1f2937; }
body.dark-mode .nav-link { color: #9ca3af; }
body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* Clases Utilitarias para Responsividad del Header */
.desktop-only { display: none !important; }
.mobile-only { display: flex; }

.tasa-bcv { background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; font-size: 11px; display: inline-block; margin-top: 15px; border: 1px solid rgba(245, 167, 0, 0.5); cursor: pointer; }
.tasa-bcv b { color: var(--dorado); font-weight: bold; }
.status-badge { position: absolute; top: 15px; right: 20px; font-size: 10px; font-weight: bold; padding: 5px 10px; border-radius: 20px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); }

/* --- HERO BANNER --- */
.hero-banner { background-color: var(--color-primary); border-radius: var(--radius-lg); padding: 35px 20px; margin: 20px auto; max-width: 1280px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; position: relative; box-shadow: var(--shadow-md); }
body.dark-mode .hero-banner { background-color: var(--color-primary-dark); border: 1px solid #374151; }
.hero-content { z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero-title { color: var(--color-white); font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; letter-spacing: -0.5px; }
.hero-title .highlight { color: var(--color-accent); }
.hero-subtitle { color: var(--color-white); font-size: 14px; opacity: 0.85; line-height: 1.5; margin-bottom: 20px; max-width: 500px; }
.btn-hero { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background-color: var(--color-accent); color: var(--color-text); font-weight: 700; font-size: 14px; padding: 12px 24px; border-radius: var(--radius-full); text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-hero:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(245, 213, 71, 0.4); }
.hero-image { z-index: 1; width: 100%; max-width: 320px; margin-top: 25px; display: flex; justify-content: center; }
.hero-image img { width: 100%; height: 280px; object-fit: cover; border-radius: var(--radius-md); transform: scale(1.05); transition: 0.3s; }

/* --- BANNERS DINÁMICOS Y RESPONSIVOS --- */
.banners-container { display: flex; overflow-x: auto; gap: 15px; padding: 15px 20px 5px 20px; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.banners-container::-webkit-scrollbar { display: none; }
.promo-banner { min-width: 85%; height: 130px; border-radius: 12px; scroll-snap-align: center; display: block; overflow: hidden; position: relative; background: var(--item-bg); flex-shrink: 0; }
.promo-banner img { width: 100%; height: 100%; object-fit: cover; }

/* --- SECCIÓN DE PRODUCTOS Y FILTROS --- */
.tools-container { margin-top: 40px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 10; position: relative; }
.section-title { font-size: 28px; font-weight: 800; color: var(--color-text); letter-spacing: -0.5px; margin: 0; font-family: 'Inter', sans-serif;}

.filters-row-container { display: flex; flex-direction: column; gap: 15px; }
.filters-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; -ms-overflow-style: none; align-items: center; }
.filters-row::-webkit-scrollbar { display: none; }

.filter-chip { background-color: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 8px 16px; font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif; cursor: pointer; white-space: nowrap; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.filter-chip i { font-size: 10px; }
.filter-chip:hover:not(.active) { background-color: var(--item-bg); }
.filter-chip.active { background-color: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }

.sort-container { flex-shrink: 0; }
.sort-select { background-color: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--color-text); cursor: pointer; outline: none; font-family: 'Inter', sans-serif; appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231A1A1A%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 12px top 50%; background-size: 10px auto; padding-right: 30px; }

body.dark-mode .section-title { color: var(--color-white); }
body.dark-mode .filter-chip { background-color: #374151; color: var(--color-white); }
body.dark-mode .filter-chip:hover:not(.active) { background-color: #4B5563; }
body.dark-mode .filter-chip.active { background-color: var(--color-primary); }
body.dark-mode .sort-select { color: var(--color-white); border-color: #4B5563; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); }

.suggestion-item { padding: 12px 15px; border-bottom: 1px solid var(--borde-color); font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.suggestion-item img { height: 30px; width: 30px; object-fit: contain; }

/* Botones Modo Vista (Caja/Unidad) */
.toggle-modo-container { display: inline-flex; width: auto; align-self: flex-start; background: var(--color-bg); padding: 4px; border-radius: var(--radius-full); border: 1px solid var(--color-border); margin-bottom: 15px; }
.btn-modo { border: none; background: transparent; padding: 6px 16px; border-radius: var(--radius-full); font-size: 12px; font-weight: 500; color: var(--color-text-muted); cursor: pointer; transition: all 0.2s; text-align: center; }
.btn-modo:hover { background: var(--item-bg); }
.btn-modo.active { background: var(--color-primary); color: white; }
body.dark-mode .btn-modo { background: #1f2937; color: #9ca3af; border-color: rgba(255,255,255,0.08); }
body.dark-mode .btn-modo.active { background: white; color: black; border-color: white; }
.chk-agotados { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.categorias-scroll { display: flex; overflow-x: auto; padding: 10px 20px 20px; gap: 12px; scrollbar-width: none; scroll-behavior: smooth; }
.cat-btn { background: var(--color-card); border: 1px solid var(--color-border); font-size: 11px; font-weight: 600; color: var(--color-text); padding: 12px 8px; border-radius: var(--radius-md); cursor: pointer; white-space: nowrap; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 85px; box-shadow: var(--shadow-sm); }
.cat-btn i { font-size: 22px; color: var(--color-primary); transition: 0.2s; }
.cat-btn span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; font-family: 'Poppins', sans-serif; letter-spacing: -0.3px; }
.cat-btn:hover { border-color: var(--color-primary); box-shadow: 0 6px 12px rgba(30, 58, 138, 0.1); transform: translateY(-3px); }
.cat-btn.active { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); box-shadow: 0 6px 12px rgba(30, 58, 138, 0.2); }
.cat-btn.active i { color: var(--color-white); }

/* --- GRILLA Y TARJETA DE PRODUCTO MODERNA --- */
.productos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px 20px; max-width: 1280px; margin: 0 auto; }
.producto-card { background: var(--color-card); border-radius: var(--radius-md); padding: 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative; border: 1px solid var(--color-border); transition: all 0.3s ease; cursor: pointer; height: 100%; }
.producto-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
body.dark-mode .producto-card { background: #1f2937; border-color: #374151; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.product-badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; color: var(--color-white); font-family: 'Inter', sans-serif; letter-spacing: 0.5px; box-shadow: var(--shadow-sm); }
.badge-red { background-color: var(--color-badge-red); }
.badge-green { background-color: var(--color-badge-green); }
.badge-orange { background-color: var(--color-badge-orange); }
.badge-agotado { background-color: #6B7280; }

.btn-fav { position: absolute; top: 12px; right: 12px; font-size: 18px; color: #ccc; background: transparent; border: none; cursor: pointer; z-index: 2; transition: 0.2s; padding: 5px; }
.btn-fav:hover { transform: scale(1.1); color: var(--color-badge-red); }
.btn-fav.active { color: var(--color-badge-red); }

.product-img-container { width: 100%; aspect-ratio: 1/1; background-color: #F3F4F6; border-radius: var(--radius-sm); display: flex; justify-content: center; align-items: center; margin-bottom: 12px; overflow: hidden; position: relative; padding: 10px; }
body.dark-mode .product-img-container { background-color: #374151; }
.product-img-container img { width: 100%; height: 100%; object-fit: contain; transition: 0.3s; mix-blend-mode: multiply; }
body.dark-mode .product-img-container img { mix-blend-mode: normal; }
.producto-card:hover .product-img-container img { transform: scale(1.05); }
.producto-card.agotado img { opacity: 0.5; filter: grayscale(100%); }

.producto-titulo { font-size: 14px; font-weight: 500; line-height: 1.3; margin-bottom: 4px; color: var(--color-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; min-height: 36px; font-family: 'Inter', sans-serif; }
.producto-stock { font-size: 11px; color: var(--color-text-muted); margin-bottom: 12px; }

.product-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--color-text-muted); margin-bottom: 12px; font-family: 'Inter', sans-serif; font-weight: 500; }
.product-rating { display: flex; align-items: center; gap: 4px; }
.product-rating i { color: var(--color-accent); font-size: 10px; }

.product-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.product-price-container { display: flex; flex-direction: column; }
.product-price { font-size: 18px; font-weight: 700; color: var(--color-text); line-height: 1; font-family: 'Inter', sans-serif; letter-spacing: -0.5px; margin-bottom: 2px; }
.product-price-bs { font-size: 12px; color: var(--color-text-muted); font-weight: 500; }

.btn-add-cart { width: 36px; height: 36px; border-radius: 50%; background-color: var(--color-accent); color: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s, background 0.2s; font-size: 16px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3); margin-left: 10px;}
.btn-add-cart:hover { transform: scale(1.1); background-color: var(--color-accent-hover); }
.btn-add-cart.disabled { background-color: #D1D5DB; cursor: not-allowed; box-shadow: none; color: #9CA3AF; }
body.dark-mode .btn-add-cart.disabled { background-color: #4B5563; color: #9CA3AF; }

.btn-cargar-mas { grid-column: 1 / -1; background: white; color: var(--color-text); border: 1px solid var(--color-border); padding: 12px; border-radius: 12px; font-weight: bold; font-size: 14px; cursor: pointer; margin-top: 10px; display: none; transition: 0.2s; }

/* --- PIE DE PÁGINA (FOOTER) --- */
.main-footer { background-color: var(--azul-rey); color: white; padding: 40px 20px 110px 20px; text-align: center; border-top-left-radius: 25px; border-top-right-radius: 25px; margin-top: 40px; position: relative; z-index: 10; box-shadow: 0 -4px 15px rgba(0,0,0,0.1); }
body.dark-mode .main-footer { background-color: #060b19; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-logo { width: 65px; height: 65px; border-radius: 12px; border: 2px solid var(--dorado); margin-bottom: 15px; background: white; object-fit: contain; padding: 5px; }
.footer-text { font-size: 12px; color: #ccc; margin-bottom: 20px; line-height: 1.6; }
.footer-social { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.footer-social a { color: var(--dorado); font-size: 24px; transition: 0.2s; text-decoration: none; }
.footer-copy { font-size: 10px; color: #888; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }

.flying-img { position: fixed; width: 50px; height: 50px; object-fit: contain; z-index: 5000; transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); display: flex; justify-content: space-around; padding: 15px 0 20px 0; box-shadow: 0 -2px 15px rgba(0,0,0,0.05); border-top-left-radius: 20px; border-top-right-radius: 20px; z-index: 100; border-top: 1px solid rgba(255,255,255,0.3); }
body.dark-mode .bottom-nav { background: rgba(31, 41, 55, 0.9); border-top: 1px solid rgba(255,255,255,0.05); }
.bottom-nav a { color: var(--texto-claro); font-size: 22px; text-decoration: none; transition: 0.2s; }
.bottom-nav a.active { color: var(--azul-rey); }
body.dark-mode .bottom-nav a.active { color: var(--dorado); }

.modal-fullscreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--color-bg); z-index: 2000; display: none; flex-direction: column; padding: 25px; overflow-y: auto; transition: background 0.3s; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; position: sticky; top: -25px; background: var(--color-bg); padding: 15px 0; z-index: 10; border-bottom: 1px solid var(--color-border); margin-top: -25px; }
.cart-header h2 { color: var(--color-text); font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }

.checkout-box { background: var(--color-card); padding: 20px; border-radius: var(--radius-md); margin-top: 15px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); transition: 0.3s; }
.box-title { font-size: 14px; color: var(--color-primary); font-weight: 700; margin-bottom: 15px; letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }

.cart-item { background: var(--color-card); padding: 12px; border-radius: var(--radius-md); display: flex; align-items: center; margin-bottom: 12px; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); gap: 12px; transition: 0.3s; }
.cart-item-info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; } 
.cart-item-title { font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; color: var(--color-text); font-family: 'Inter', sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } 
.cart-item-price { color: var(--color-text); font-weight: 700; font-size: 15px; font-family: 'Inter', sans-serif; }
.cart-item-price-bs { font-size: 11px; color: var(--color-text-muted); font-weight: 500; }

.cart-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cart-btn { background: var(--item-bg); color: var(--color-text); border: 1px solid var(--color-border); width: 32px; height: 32px; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.cart-btn:hover { background: var(--color-border); }

/* Toggle UI para Envío */
.delivery-toggles input[type="radio"] { display: none; }
.delivery-toggles { display: flex; gap: 10px; margin-bottom: 10px; }
.delivery-toggles .toggle-btn { flex: 1; text-align: center; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--color-text-muted); cursor: pointer; transition: 0.2s; background: var(--color-bg); display: flex; justify-content: center; align-items: center; gap: 8px; }
.delivery-toggles input[type="radio"]:checked + .toggle-btn { background: rgba(30, 58, 138, 0.05); color: var(--color-primary); border-color: var(--color-primary); box-shadow: none; }
body.dark-mode .delivery-toggles .toggle-btn { background: #374151; color: white; border-color: #4b5563; }
body.dark-mode .delivery-toggles input[type="radio"]:checked + .toggle-btn { background: rgba(245, 158, 11, 0.1); color: var(--color-accent); border-color: var(--color-accent); }

.input-text, .input-select { width: 100%; background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; font-family: inherit; outline: none; margin-top: 5px; transition: border-color 0.2s; }
.input-text:focus, .input-select:focus { border-color: var(--color-primary); }
.vuelto-input { font-weight: bold; text-align: center; border: none; border-bottom: 2px solid var(--color-primary); background: transparent; padding: 10px; font-size: 20px; color: var(--color-text); width: 120px; outline: none; }

.total-container { background: var(--color-primary); color: white; padding: 20px; border-radius: var(--radius-lg); margin-top: 20px; text-align: center; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
body.dark-mode .total-container { background: var(--color-card); border: 1px solid var(--color-border); }
.total-usd { font-size: 28px; font-weight: 800; color: white; margin: 5px 0; font-family: 'Inter', sans-serif; letter-spacing: -0.5px; }
body.dark-mode .total-usd { color: var(--color-accent); }
.total-bs { font-size: 14px; color: rgba(255,255,255,0.8); font-weight: 500; font-family: 'Inter', sans-serif; }

.btn-enviar { width: 100%; background: var(--color-success); color: white; border: none; padding: 16px; border-radius: var(--radius-full); font-weight: 700; font-size: 16px; cursor: pointer; margin-top: 20px; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; }
.btn-enviar:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.btn-enviar.disabled { background: var(--color-border); color: var(--color-text-muted); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-maps { background: #4285F4; color: white; border: none; padding: 12px; width: 100%; border-radius: var(--radius-full); font-weight: 700; margin-top: 10px; cursor: pointer; display: none; transition: 0.2s; font-family: inherit; }
.btn-trash { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); border: none; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 16px; cursor: pointer; transition: 0.2s; }
.btn-trash:hover { background: var(--color-danger); color: white; }
.cart-item-img, .cart-item-img-placeholder { width: 55px; height: 55px; object-fit: contain; border-radius: var(--radius-sm); background: var(--item-bg); padding: 5px; flex-shrink: 0; }
.cart-item-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--color-text-muted); }

#toast-container { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: rgba(37, 211, 102, 0.95); color: white; padding: 10px 20px; border-radius: 30px; font-size: 12px; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }

.loader-container { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: var(--texto-claro); }
.spinner { width: 35px; height: 35px; border: 3px solid var(--borde-color); border-top: 3px solid var(--dorado); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- OPTIMIZACIÓN EXCLUSIVA PARA MÓVILES --- */
@media (max-width: 767px) {
    .header-main-container { flex-wrap: wrap !important; gap: 12px; padding: 10px 15px; }
    .header-left, .header-right { flex: 0 0 auto; }
    .header-center { flex: 1 1 100%; order: 3; margin: 0; }
    .search-pill { width: 100%; max-width: 100%; }

    .mobile-header-title { font-size: 16px; font-weight: 700; color: var(--color-text); margin: 0; font-family: 'Inter', sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    body.dark-mode .mobile-header-title { color: var(--color-white); }
    
    .hero-banner { flex-direction: row; text-align: left; padding: 20px 15px; align-items: center; justify-content: space-between; margin: 15px; border-radius: var(--radius-lg); }
    .hero-content { flex: 1; align-items: flex-start; }
    .hero-title { font-size: 18px; margin-bottom: 8px; }
    .hero-subtitle { font-size: 12px; margin-bottom: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .btn-hero { padding: 8px 16px; font-size: 11px; }
    .hero-image { flex: 0 0 100px; margin-top: 0; margin-left: 15px; display: flex; align-items: center; justify-content: center; }
    .hero-image img { width: 100%; height: auto; transform: none; }
    
    .filters-row-container { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
    .filters-row { flex: 1; overflow-x: auto; padding-bottom: 0; gap: 8px; }
    .sort-select { padding: 6px 25px 6px 10px; font-size: 11px; background-size: 8px auto; }
    .filter-chip { padding: 6px 12px; font-size: 11px; }

    .productos-grid { gap: 12px; padding: 0 12px 20px; grid-template-columns: repeat(2, 1fr); }
    .producto-card { padding: 10px; }
    .producto-titulo { font-size: 13px; margin-bottom: 4px; min-height: 34px; }
    .product-meta { font-size: 10px; margin-bottom: 8px; flex-wrap: wrap; gap: 4px; }
    .product-price { font-size: 16px; }
    .product-price-old { font-size: 10px; }
    .btn-add-cart { width: 38px; height: 38px; font-size: 16px; margin-left: 5px; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2); }
    .product-badge { top: 8px; left: 8px; padding: 3px 6px; font-size: 9px; }
    .btn-fav { top: 8px; right: 8px; font-size: 16px; }
}

/* --- OPTIMIZACIÓN EXCLUSIVA PARA PC DE ESCRITORIO --- */
@media (min-width: 768px) {
    .promo-banner { min-width: 450px; max-width: 800px; aspect-ratio: 8 / 3; height: auto; }
    .productos-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } 
    .search-container { max-width: 500px; margin: 0 auto; } 
    .bottom-nav { display: none; } 
    body { padding-bottom: 20px; }
    .main-footer-new { padding-bottom: 40px; }
    
    /* --- AJUSTES DEL HEADER EN PC --- */
    .mobile-only { display: none !important; }
    .desktop-only { display: flex !important; }
    .header-center { margin: 0 30px; }
    .filters-row-container { flex-direction: row; justify-content: space-between; align-items: center; }

    /* --- HERO BANNER EN PC --- */
    .hero-banner { flex-direction: row; text-align: left; padding: 40px 50px; justify-content: space-between; margin: 30px 0; }
    .hero-content { flex: 0 0 55%; align-items: flex-start; }
    .hero-title { font-size: 38px; }
    .hero-subtitle { text-align: left; margin-left: 0; font-size: 15px;}
    .hero-image { flex: 0 0 40%; margin-top: 0; position: relative; display: flex; justify-content: flex-end; }
    .hero-image img { width: 120%; max-width: 480px; transform: scale(1.15) translateX(5%); box-shadow: var(--shadow-md); }
}

@media (min-width: 1024px) {
    .productos-grid { grid-template-columns: repeat(4, 1fr); }
}