/* ============================================
   MI TESORO MX – Styles (Professional Clean)
   ============================================ */

:root {
  --bg: #f5f5f7;
  --text: #111111;
  --text-muted: #666666;
  --card: #ffffff;
  --accent: #c62828;
  --accent-hover: #a61e1e;
  --success: #00a650;
  --whatsapp: #25d366;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --border: rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg: #0f0f0f;
  --text: #f0f0f0;
  --text-muted: #aaaaaa;
  --card: #1a1a1a;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
  --border: rgba(255, 255, 255, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ================= LOADER ================= */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================= HEADER ================= */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

body.dark .main-header {
  background: rgba(15, 15, 15, 0.94);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.logo-text h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-center a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.header-center a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.header-center a:hover {
  color: var(--accent);
}

.header-center a:hover::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cart-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, background 0.2s;
}

.cart-btn:hover {
  transform: scale(1.03);
}

body.dark .cart-btn {
  background: #fff;
  color: #111;
}

.cart-btn span {
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.theme-btn:hover {
  background: var(--card);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
  line-height: 1;
}

/* ================= HERO ================= */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 50%, #1a1a2d 100%);
  color: #fff;
  text-align: center;
  padding: 56px 20px 52px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(198, 40, 40, 0.25), transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(21, 101, 192, 0.2), transparent 50%);
  pointer-events: none;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
}

.hero p {
  margin: 0 0 24px;
  font-size: 1rem;
  opacity: 0.85;
  position: relative;
}

.hero a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}

.hero a:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ================= TRUST BAR ================= */
.trust-section {
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 0 20px;
}

.trust-section h2 {
  text-align: center;
  font-size: 1.35rem;
  margin: 0 0 20px;
  font-weight: 700;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.trust-card {
  background: var(--card);
  padding: 18px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.trust-card strong {
  display: block;
}

/* ================= BANNERS ================= */
.banner-envio-gratis,
.banner-spiderman,
.banner-mercadolibre {
  max-width: 1100px;
  margin: 24px auto;
  padding: 22px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.banner-envio-gratis {
  background: linear-gradient(135deg, #1f1f1f, #2d2d2d);
  border: 1px solid #3f3f3f;
  color: #fff;
}

.banner-spiderman {
  background: linear-gradient(135deg, #b71c1c, #1565c0);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Mercado Libre */
.banner-mercadolibre {
  background: linear-gradient(135deg, #fff159 0%, #ffe600 45%, #2d3277 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #111;
}

.banner-mercadolibre .banner-content h2 {
  color: #111;
}

.banner-mercadolibre .banner-content p {
  color: #222;
  opacity: 0.95;
}

.banner-ml-note {
  margin-top: 10px !important;
  font-size: 0.9rem !important;
  background: rgba(0, 0, 0, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  display: inline-block;
  max-width: 560px;
}

.banner-btn-ml {
  background: #2d3277 !important;
  color: #fff !important;
}

.banner-btn-ml:hover {
  background: #1a1f5c !important;
  transform: translateY(-2px);
}

.banner-content {
  text-align: center;
}

.banner-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.banner-content p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
}

.banner-note {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.banner-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  color: #b71c1c;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, background 0.2s;
}

.banner-btn:hover {
  transform: translateY(-2px);
  background: #ffe082;
}

/* ================= CÓMO FUNCIONA ================= */
.como-funciona {
  max-width: 1100px;
  margin: 48px auto;
  padding: 0 20px;
  text-align: center;
}

.como-funciona h2 {
  font-size: 1.4rem;
  margin: 0 0 28px;
  font-weight: 700;
}

.pasos-compra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.paso {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.paso:hover {
  transform: translateY(-4px);
}

.paso span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

body.dark .paso span {
  background: #fff;
  color: #111;
}

.paso p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ================= CATÁLOGO HEADER ================= */
.catalogo-title {
  text-align: center;
  padding: 16px 20px 8px;
}

.catalogo-title h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
}

.catalogo-title p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ================= BUSCADOR + ORDENAR ================= */
.search-wrap {
  max-width: 640px;
  margin: 8px auto 4px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ordenar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ordenar-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

#ordenar {
  appearance: none;
  -webkit-appearance: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 36px 8px 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 200px;
  transition: border-color 0.2s;
}

#ordenar:focus {
  outline: none;
  border-color: var(--accent);
}

body.dark #ordenar {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.search-icon {
  font-size: 1rem;
  opacity: 0.6;
  flex-shrink: 0;
  line-height: 1;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0;
}

.search-box input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.search-clear:hover {
  background: rgba(0, 0, 0, 0.15);
}

body.dark .search-clear {
  background: rgba(255, 255, 255, 0.12);
}

body.dark .search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
}

.search-results-info {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= FILTROS ================= */
.filtros-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 0;
}

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 8px 0;
}

.filtros button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s, transform 0.15s, border-color 0.2s;
}

.filtros button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.filtros button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filtros-toggle {
  display: none;
  margin: 12px auto 0;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.filtros-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ================= CATÁLOGO ================= */
#catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  padding: 28px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.producto {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.producto:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111;
  overflow: hidden;
}

.producto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.producto:hover .producto-img {
  transform: scale(1.05);
}

.info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.info h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.precio {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 4px 0 0;
}

.proximamente-precio {
  font-style: italic;
  opacity: 0.8;
  font-size: 0.9rem;
}

.descripcion-oferta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.boton {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #00c2a8, #00a88f);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: filter 0.2s, transform 0.15s;
}

.boton:hover {
  filter: brightness(1.08);
  transform: scale(1.02);
}

.boton.apartado,
.boton.reservado {
  background: #999;
  color: #fff;
  cursor: not-allowed;
  transform: none;
}

.boton.proximamente {
  background: #888;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.75;
}

.boton.proximamente:hover {
  transform: none;
  filter: none;
}

.sin-stock {
  display: block;
  margin-top: auto;
  padding: 11px;
  background: #222;
  color: #c59d5f;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Badges */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.nuevo {
  background: #00c853;
  color: #fff;
}

.badge.unico,
.badge.ultimo,
.badge.oferta,
.badge.última,
.badge.agotado {
  background: linear-gradient(135deg, #ff5252, #ff1744);
  color: #fff;
}

.badge.exclusivo {
  background: #ff6d00;
  color: #fff;
}

.badge.preventa {
  background: #7b1fa2;
  color: #fff;
}

/* ================= PAGINACIÓN ================= */
.paginacion {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px 48px;
  flex-wrap: wrap;
}

.paginacion button {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.paginacion button:hover:not(:disabled) {
  border-color: var(--accent);
}

.paginacion button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.paginacion button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================= TESTIMONIOS ================= */
.testimonios {
  padding: 48px 20px;
  background: rgba(0, 0, 0, 0.03);
  text-align: center;
}

body.dark .testimonios {
  background: rgba(255, 255, 255, 0.03);
}

.testimonios h2 {
  margin: 0 0 24px;
  font-size: 1.35rem;
  font-weight: 700;
}

.testimonios-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.testimonio {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  text-align: left;
}

.testimonio .stars {
  color: #f5a623;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.testimonio p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.testimonio span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ver-mas-opiniones {
  display: block;
  margin: 20px auto 0;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ver-mas-opiniones:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ================= FOOTER ================= */
.footer {
  background: #111;
  color: #ccc;
  padding: 40px 20px 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 18px;
}

.footer-links a {
  color: #bbb;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ff5252;
}

.footer-copy {
  font-size: 0.82rem;
  color: #777;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 8px;
}

.footer-copy p {
  margin: 0;
}

/* ================= CARRITO DRAWER ================= */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  height: 100dvh;
  background: var(--card);
  color: var(--text);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-header button {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: opacity 0.3s, transform 0.3s;
}

.cart-item.remove,
.cart-item.removed {
  opacity: 0;
  transform: translateX(-80px);
}

.cart-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.cart-info {
  flex: 1;
  min-width: 0;
}

.cart-name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-price {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #e0e0e0;
  color: #111;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: transform 0.15s;
}

.cart-qty-btn:hover {
  transform: scale(1.1);
}

body.dark .cart-qty-btn {
  background: #333;
  color: #fff;
}

.cart-qty-num {
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-remove {
  background: none;
  border: none;
  color: #ff5252;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.15s, transform 0.15s;
}

.cart-remove:hover {
  opacity: 1;
  transform: scale(1.15);
}

.cart-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

#cartTotal {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.cart-legal-mini {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

.cart-legal-mini a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.pasos-carrito {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.8rem;
}

.titulo-pasos {
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 0.85rem;
}

.pasos-carrito ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pasos-carrito li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--text-muted);
}

.pasos-carrito li span {
  width: 20px;
  height: 20px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dark .pasos-carrito li span {
  background: #fff;
  color: #111;
}

.btn-whatsapp {
  display: block;
  background: linear-gradient(135deg, #25d366, #1ebc59);
  color: #000;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: transform 0.2s;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: scale(1.02);
}

.btn-vaciar {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  padding: 6px;
}

.btn-vaciar:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#cartOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#cartOverlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================= WHATSAPP FLOAT ================= */
#whatsappFloat {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: var(--whatsapp);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s;
  text-decoration: none;
}

#whatsappFloat:hover {
  transform: scale(1.08);
}

#whatsappFloat .wa-label {
  display: none;
}

/* ================= TOAST ================= */
.cart-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--card);
  color: var(--text);
  width: 280px;
  max-width: calc(100vw - 40px);
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  display: none;
  border: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}

.cart-toast.show {
  display: block;
}

.cart-toast strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.cart-toast p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.toast-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast-actions button {
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
}

#toastVerCarrito {
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

#toastCerrar {
  background: none;
  font-size: 1rem;
  opacity: 0.6;
  color: var(--text);
}

@keyframes slideIn {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ================= MODAL IMAGEN ================= */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.image-modal.show {
  display: flex;
}

/* Imagen completa, sin recorte (solo al hacer clic) */
.image-modal img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;      /* muestra la imagen completa */
  object-position: center;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: transparent;
}

.close-modal {
  position: fixed;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.45);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.close-modal:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ================= CONFIRM MODAL ================= */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-overlay.show {
  display: flex;
}

.confirm-modal {
  background: var(--card);
  color: var(--text);
  padding: 24px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}

.confirm-modal h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.confirm-modal p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.confirm-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
}

.btn-cancelar {
  background: #e0e0e0;
  color: #111;
}

body.dark .btn-cancelar {
  background: #333;
  color: #fff;
}

.btn-confirmar {
  background: var(--accent);
  color: #fff;
}

/* ================= ANIMATIONS ================= */
.producto.added {
  animation: productPop 0.5s ease;
}

@keyframes productPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .header-center {
    gap: 14px;
  }

  .header-center a {
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .header-center {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .header-center.open {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    padding: 12px 0;
  }

  .header-center a {
    font-size: 1rem;
    padding: 12px 24px;
    width: 100%;
    text-align: center;
  }

  .header-center a::after {
    display: none;
  }

  .logo-text span {
    display: none;
  }

  .hero {
    padding: 40px 16px 36px;
  }

  .filtros {
    max-height: 48px;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .filtros.expandido {
    max-height: 500px;
  }

  .filtros-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  #catalogo {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 20px 14px;
  }

  .info {
    padding: 12px;
  }

  .info h2 {
    font-size: 0.85rem;
  }

  .precio {
    font-size: 0.95rem;
  }

  .boton {
    padding: 10px;
    font-size: 0.85rem;
  }

  .testimonio:nth-child(n + 3) {
    display: none;
  }

  .testimonios.expandido .testimonio {
    display: block;
  }

  .banner-envio-gratis,
  .banner-spiderman,
  .banner-mercadolibre {
    margin: 16px 14px;
    padding: 16px;
  }

  .banner-content h2 {
    font-size: 1.15rem;
  }

  .banner-btn {
    width: 100%;
    text-align: center;
  }

  .banner-ml-note {
    font-size: 0.82rem !important;
  }

  .pasos-compra {
    grid-template-columns: 1fr 1fr;
  }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .main-header {
    padding: 0 12px;
  }

  .logo-text h1 {
    font-size: 1rem;
  }

  .cart-btn {
    padding: 7px 11px;
    font-size: 0.85rem;
  }

  #catalogo {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .pasos-compra {
    grid-template-columns: 1fr;
  }
}

/* ================= PÁGINAS LEGALES ================= */
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.legal-container > h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.legal-container .subtitle {
  margin: 0 0 32px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.legal-section h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.legal-section h3 {
  margin: 18px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal-section p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.legal-section a:hover {
  opacity: 0.85;
}

.legal-highlight {
  background: rgba(198, 40, 40, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin: 14px 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

body.dark .legal-highlight {
  background: rgba(198, 40, 40, 0.15);
}

.legal-highlight strong {
  color: var(--accent);
}

/* Breadcrumb / back link for legal pages */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.legal-back:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .legal-container {
    padding: 28px 16px 48px;
  }

  .legal-section {
    padding: 18px 16px;
  }

  .legal-section h2 {
    font-size: 1.05rem;
  }

  .legal-section p {
    font-size: 0.9rem;
  }
}

/* ================= FAQ ================= */
.faq-search-wrap {
  max-width: 100%;
  margin: 0 0 28px;
}

.faq-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.faq-search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.faq-search-box input::placeholder {
  color: var(--text-muted);
}

.faq-category {
  margin-bottom: 28px;
}

.faq-category h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  transition: background 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "▾";
  font-size: 0.85rem;
  opacity: 0.55;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item summary:hover {
  background: rgba(0, 0, 0, 0.03);
}

body.dark .faq-item summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-answer {
  padding: 0 18px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.faq-answer p {
  margin: 0 0 10px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0 0 10px;
  padding-left: 1.25rem;
}

.faq-answer li {
  margin-bottom: 4px;
}

.faq-answer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.faq-note {
  background: rgba(198, 40, 40, 0.08);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-top: 8px !important;
  font-size: 0.88rem;
}

body.dark .faq-note {
  background: rgba(198, 40, 40, 0.15);
}

.faq-cta {
  text-align: center;
  margin: 36px 0 12px;
  padding: 28px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.faq-cta p {
  margin: 0 0 14px;
  font-weight: 600;
  font-size: 1rem;
}

.faq-cta .banner-btn {
  margin-top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================= HORARIO BAR ================= */
.horario-bar {
  text-align: center;
  padding: 8px 16px;
  font-size: 0.8rem;
  background: #111;
  color: #eee;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.dark .horario-bar {
  background: #000;
  color: #ccc;
}

.footer-horario {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin: 12px 0 0;
}

/* ================= FILTROS EXTRA ================= */
.filtros-extra-wrap {
  max-width: 900px;
  margin: 8px auto 0;
  padding: 0 20px;
}

.filtros-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.filtro-extra {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.filtro-extra:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filtro-extra.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ================= AVISARME ================= */
.btn-avisarme {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 8px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  transition: background 0.2s;
}

.btn-avisarme:hover {
  background: rgba(198, 40, 40, 0.08);
}

/* ================= ENVÍO GRATIS BAR ================= */
.envio-gratis-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
}

.envio-gratis-text {
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.35;
}

.envio-gratis-track {
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}

body.dark .envio-gratis-track {
  background: rgba(255,255,255,0.12);
}

.envio-gratis-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00a650, #00c853);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.envio-gratis-fill.completo {
  background: linear-gradient(90deg, #00c853, #69f0ae);
}

.cart-legal-resumen {
  margin-top: -4px;
}

/* ================= CÓMO PAGAR ================= */
.como-pagar {
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 20px;
  text-align: center;
}

.como-pagar h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.como-pagar-intro {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pasos-pago {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.paso-pago {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  box-shadow: var(--shadow);
  text-align: center;
}

.paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.paso-pago strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.paso-pago p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.como-pagar-note {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ================= PRUEBA SOCIAL ================= */
.testimonios-sub {
  text-align: center;
  margin: -8px 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 700px;
  margin: 0 auto 24px;
}

.social-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.social-stat strong {
  display: block;
  font-size: 1rem;
  color: var(--accent);
}

.social-stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .social-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================= PÁGINAS CONTENIDO (blog, nosotros, preventas activas) ================= */
.page-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 50%, #1a1a2d 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px 36px;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.page-hero p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

.content-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.card-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card-block h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.card-block p {
  margin: 0 0 10px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.card-block p:last-child {
  margin-bottom: 0;
}

.card-block ul {
  margin: 0;
  padding-left: 1.2rem;
}

.card-block li {
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Preventas activas cards */
.preventa-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preventa-card .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preventa-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.preventa-status.abierta {
  background: #00c853;
  color: #fff;
}

.preventa-status.proxima {
  background: #ff6d00;
  color: #fff;
}

.preventa-status.cerrada {
  background: #999;
  color: #fff;
}

/* Blog */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.blog-card .blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.blog-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.blog-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-card p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.6;
  opacity: 0.92;
}

.blog-card p:last-of-type {
  margin-bottom: 0;
}

.blog-card ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.blog-card a {
  color: var(--accent);
  font-weight: 600;
}

.blog-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

/* Plantillas operación */
.plantilla-box {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 8px 0;
  font-family: ui-monospace, monospace;
}

@media (max-width: 768px) {
  .horario-bar {
    font-size: 0.72rem;
    padding: 7px 10px;
  }

  .pasos-pago {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================= VOLVER ARRIBA ================= */
.btn-volver-arriba {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 850;
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-volver-arriba.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn-volver-arriba:hover {
  background: var(--accent-hover, #a61e1e);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .btn-volver-arriba {
    bottom: 86px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  #ordenar {
    min-width: 0;
    width: 100%;
  }

  .ordenar-wrap {
    width: 100%;
  }
}

/* ================= SKELETON CATÁLOGO ================= */
.catalogo-skeleton .skeleton-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 0 0 16px;
  box-shadow: var(--shadow);
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(90deg, #e8e8e8 25%, #f4f4f4 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

body.dark .skeleton-img {
  background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
  background-size: 200% 100%;
}

.skeleton-line {
  height: 12px;
  margin: 14px 16px 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f4f4f4 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

.skeleton-line.short {
  width: 40%;
  margin-top: 0;
}

.skeleton-btn {
  height: 40px;
  margin: 12px 16px 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f4f4f4 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

body.dark .skeleton-line,
body.dark .skeleton-btn {
  background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-img,
.skeleton-line,
.skeleton-btn {
  animation-duration: 1.4s; /* un poco más suave */
}

.loader-mini {
  display: none !important;
}

/* ================= HERO CON IMAGEN ================= */
.hero-with-image {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a1a;
  /* Cambia esta ruta por tu foto real */
  background-image:
    linear-gradient(135deg, rgba(20, 10, 10, 0.75), rgba(15, 15, 30, 0.7)),
    url("imgs/hero.jpg");
  background-size: cover;
  background-position: center;
}

.hero-with-image .hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
}

.hero-with-image h2,
.hero-with-image p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ================= MÉTODOS DE PAGO ================= */
.metodos-pago {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.metodo-pago {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  min-width: 130px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.metodo-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 4px;
}

.metodo-pago strong {
  font-size: 0.9rem;
}

.metodo-pago span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ================= PULSO CARRITO ================= */
.cart-btn.cart-pulse {
  animation: cartPulse 0.65s ease;
}

.cart-btn.cart-pulse span {
  animation: cartBadgePop 0.65s ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.12); }
  60% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes cartBadgePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ================= PÁGINA 404 ================= */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.page-404 .code {
  font-size: clamp(4rem, 15vw, 7rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 8px;
}

.page-404 h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.page-404 p {
  margin: 0 0 28px;
  color: var(--text-muted);
  max-width: 400px;
}

.page-404 .btn-home {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.page-404 .btn-home:hover {
  background: var(--accent-hover, #a61e1e);
  transform: translateY(-2px);
}

/* ================= BANNER PAW PATROL ================= */
.banner-pawpatrol {
  max-width: 1100px;
  margin: 24px auto;
  padding: 22px 24px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 45%, #ffca28 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.banner-pawpatrol .banner-content {
  text-align: center;
}

.banner-pawpatrol .banner-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.banner-pawpatrol .banner-content p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.5;
  color: #fff;
}

.banner-btn-paw {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  color: #1565c0;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.banner-btn-paw:hover {
  transform: translateY(-2px);
  background: #fff59d;
  color: #0d47a1;
}

@media (max-width: 768px) {
  .banner-pawpatrol {
    margin: 16px 14px;
    padding: 16px;
  }

  .banner-pawpatrol .banner-content h2 {
    font-size: 1.15rem;
  }

  .banner-btn-paw {
    width: 100%;
    text-align: center;
  }
}


/* Mejor focus visible */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Respetar reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== CARRITO MÓVIL – más espacio para productos ========== */
@media (max-width: 768px) {
  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }

  .cart-header {
    padding: 12px 14px;
  }

  .cart-header h2 {
    font-size: 1rem;
  }

  .cart-items {
    padding: 12px;
    gap: 10px;
  }

  .cart-item {
    padding: 10px;
  }

  .cart-img {
    width: 52px;
    height: 52px;
  }

  .cart-footer {
    padding: 12px 14px 16px;
    gap: 8px;
  }

  /* Ocultar o compactar lo menos importante en móvil */
  .pasos-carrito {
    display: none; /* Los pasos ya se explican en la página, no hacen falta aquí */
  }

  .cart-legal-mini {
    font-size: 0.7rem;
    line-height: 1.35;
  }

  /* Dejar solo 1 o 2 textos legales, no todos */
  .cart-legal-resumen {
    display: none;
  }

  #cartTotal {
    font-size: 1.05rem;
  }

  .envio-gratis-bar {
    padding: 8px 10px;
  }

  .envio-gratis-text {
    font-size: 0.72rem;
  }

  .btn-whatsapp {
    padding: 13px;
    font-size: 0.92rem;
  }

  .btn-vaciar {
    padding: 4px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .cart-btn {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .cart-btn span {
    font-size: 0.65rem;
    padding: 1px 6px;
    min-width: 18px;
  }

  .theme-btn {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
}

/* ================= BANNER PREVENTA (dinámico) ================= */
.banner-preventa {
  max-width: 1100px;
  margin: 28px auto 24px;          /* más espacio arriba y abajo */
  padding: 22px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.banner-preventa .banner-content {
  text-align: center;
}

.banner-preventa .banner-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.banner-preventa .banner-content p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.5;
  color: #fff;
}

.banner-preventa .banner-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  color: #1565c0;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}

.banner-preventa .banner-btn:hover {
  transform: translateY(-2px);
  background: #fff59d;
  color: #0d47a1;
}

/* Temas */
.banner-preventa--paw {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 45%, #ffca28 100%);
}

.banner-preventa--marvel {
  background: linear-gradient(135deg, #b71c1c 0%, #c62828 40%, #1a237e 100%);
}

.banner-preventa--generic {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 50%, #1a1a2d 100%);
}

/* Móvil */
@media (max-width: 768px) {
  .banner-preventa {
    margin: 20px 14px 16px;
    padding: 16px;
  }

  .banner-preventa .banner-content h2 {
    font-size: 1.15rem;
  }

  .banner-preventa .banner-btn {
    width: 100%;
    text-align: center;
  }
}

/* ================= CARRITO VACÍO ================= */
.cart-empty {
  text-align: center;
  padding: 8px 0 4px;
}

.cart-empty-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.cart-empty-sub {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-ver-catalogo {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}

.btn-ver-catalogo:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .cart-empty-title {
    font-size: 1rem;
  }

  .cart-empty-sub {
    font-size: 0.8rem;
  }

  .btn-ver-catalogo {
    width: 100%;
    padding: 12px;
  }
}

.viendo-ahora {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.9;
}

body.dark .viendo-ahora {
  opacity: 0.85;
}

.ultima-pieza {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e53935;
}

.btn-seguir-comprando {
  display: block;
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}

.btn-seguir-comprando:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .cart-toast {
    top: auto;
    bottom: 90px;   /* arriba del botón de WhatsApp */
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}

.sin-resultados {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
}

.sin-resultados-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.sin-resultados-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-limpiar-filtros {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.contador-productos {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.btn-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

.btn-wishlist:hover {
  transform: scale(1.1);
}

body.dark .btn-wishlist {
  background: rgba(30, 30, 30, 0.9);
}

/* ================= CARRUSEL PREVENTAS ================= */
.carousel-preventas {
  max-width: 1100px;
  margin: 28px auto 24px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 28px 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.carousel-slide .banner-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.carousel-slide h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.carousel-slide p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
  line-height: 1.5;
}

.carousel-slide .banner-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.carousel-slide .banner-btn:hover {
  transform: translateY(-2px);
}

/* === TEMAS === */
.carousel-slide--paw {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 45%, #ffca28 100%);
}
.carousel-slide--paw .banner-btn {
  color: #1565c0;
}
.carousel-slide--paw .banner-btn:hover {
  background: #fff59d;
  color: #0d47a1;
}

.carousel-slide--marvel {
  background: linear-gradient(135deg, #b71c1c 0%, #c62828 40%, #1a237e 100%);
}
.carousel-slide--marvel .banner-btn {
  color: #b71c1c;
}
.carousel-slide--marvel .banner-btn:hover {
  background: #ffcdd2;
  color: #7f0000;
}

.carousel-slide--harry {
  background: linear-gradient(135deg, #1a237e 0%, #283593 40%, #4a148c 70%, #f9a825 100%);
}
.carousel-slide--harry .banner-btn {
  color: #1a237e;
}
.carousel-slide--harry .banner-btn:hover {
  background: #ffe082;
  color: #311b92;
}

.carousel-slide--ghost {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 40%, #4a0000 100%);
  border-color: rgba(255, 255, 255, 0.08);
}
.carousel-slide--ghost .banner-btn {
  background: #c62828;
  color: #fff;
}
.carousel-slide--ghost .banner-btn:hover {
  background: #ff5252;
  color: #fff;
}

.carousel-slide--meli {
  background: linear-gradient(135deg, #2d3277 0%, #1e214d 50%, #12142e 100%);
  border-color: rgba(255, 230, 0, 0.2);
}

.carousel-slide--meli .banner-btn {
  background: #ffe600;
  color: #333;
  font-weight: 700;
}

.carousel-slide--meli .banner-btn:hover {
  background: #ffea33;
  color: #000;
}

.carousel-slide--generic {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a1a 50%, #1a1a2d 100%);
}
.carousel-slide--generic .banner-btn {
  color: #111;
}

/* Flechas */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  backdrop-filter: blur(4px);
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.08);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 5;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: #fff;
  transform: scale(1.25);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Móvil – carrusel completo */
@media (max-width: 768px) {
  .carousel-preventas {
    margin: 20px 14px 16px;
    border-radius: 12px;
  }

  .carousel-track {
    /* asegura que cada slide ocupe todo el ancho visible */
    width: 100%;
  }

  .carousel-slide {
    min-width: 100%;
    width: 100%;
    padding: 20px 16px 42px; /* más espacio abajo para los dots */
    box-sizing: border-box;
  }

  .carousel-slide h2 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .carousel-slide p {
    font-size: 0.88rem;
  }

  .carousel-slide .banner-btn {
    width: 100%;
    text-align: center;
    margin-top: 14px;
    padding: 12px 16px;
  }

  /* Flechas más pequeñas y menos invasivas */
  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
    background: rgba(0, 0, 0, 0.55);
  }

  .carousel-prev { left: 6px; }
  .carousel-next { right: 6px; }

  /* Dots más visibles y con espacio */
  .carousel-dots {
    bottom: 10px;
    gap: 7px;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }
}

.header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.site-logo{
    width:56px;
    height:56px;
    object-fit:contain;
    border-radius:50%;   /* quítalo si tu logo no es circular */
}

/* Respetar reduced motion */
@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}.btn-seguir-comprando.hidden {
   display: none !important;
 }

 @media (max-width: 768px) {

     .site-logo{
         width: 40px;
         height: 40px;
     }

     .header-left{
         gap: 8px;
     }

     .logo-text h1{
         font-size: 1.1rem;
     }

     .logo-text span{
         font-size: 0.75rem;
     }

 }
 .hero-cta {
   display: inline-block;
   background: var(--accent);
   color: #fff;
   padding: 14px 32px;
   border-radius: 999px;
   font-weight: 700;
   font-size: 1rem;
   transition: background 0.2s, transform 0.15s;
   box-shadow: 0 8px 24px rgba(198, 40, 40, 0.35);
 }

 .hero-cta:hover {
   background: var(--accent-hover);
   transform: translateY(-2px);
 }

 .hero-trust {
   margin: 18px 0 0;
   font-size: 0.85rem;
   opacity: 0.85;
   letter-spacing: 0.02em;
 }

 .cart-total-wrap {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 4px 0 2px;
 }

 .cart-total-label {
   font-size: 0.95rem;
   font-weight: 600;
   color: var(--text-muted);
 }

 .cart-total-amount {
   font-size: 1.35rem;
   font-weight: 800;
   color: var(--accent);
   letter-spacing: -0.02em;
 }

 /* Botón WhatsApp más potente */
 .btn-whatsapp {
   display: block;
   background: linear-gradient(135deg, #25d366, #1ebe57);
   color: #000;
   padding: 15px;
   border-radius: 14px;
   font-weight: 800;
   font-size: 1rem;
   text-align: center;
   transition: transform 0.2s, box-shadow 0.2s;
   box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
   letter-spacing: 0.01em;
 }

 .btn-whatsapp:hover {
   transform: scale(1.025);
   box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5);
 }

 /* ===== RESUMEN CARRITO ===== */
 .cart-summary {
   background: var(--bg);
   border-radius: 12px;
   padding: 12px 14px;
   margin-bottom: 4px;
 }
 .cart-summary-row {
   display: flex;
   justify-content: space-between;
   font-size: 0.9rem;
   margin-bottom: 6px;
 }
 .cart-summary-total {
   margin-top: 8px;
   padding-top: 8px;
   border-top: 1px solid var(--border);
   font-weight: 800;
   font-size: 1.15rem;
 }
 .cart-summary-total span:last-child {
   color: var(--accent);
 }
 .cart-discount span:last-child {
   color: #00a650;
 }
 .cart-summary-note {
   font-size: 0.72rem;
   color: var(--text-muted);
   margin: 4px 0 0;
   text-align: center;
 }
 .text-success { color: #00a650; }

 /* Cupón */
 .cart-coupon {
   display: flex;
   gap: 8px;
   margin-top: 8px;
 }
 .cart-coupon input {
   flex: 1;
   border: 1px solid var(--border);
   border-radius: 10px;
   padding: 10px 12px;
   font-size: 0.88rem;
   background: var(--card);
   color: var(--text);
   font-family: inherit;
 }
 .cart-coupon button {
   background: var(--accent);
   color: #fff;
   border: none;
   border-radius: 10px;
   padding: 0 14px;
   font-weight: 600;
   cursor: pointer;
   font-size: 0.85rem;
 }
 .cupon-msg {
   font-size: 0.78rem;
   text-align: center;
   margin: 4px 0 0;
 }
 .cupon-msg.success { color: #00a650; }
 .cupon-msg.error { color: #e53935; }

 /* Notas */
 .cart-notas {
   margin-top: 8px;
 }
 .cart-notas label {
   display: block;
   font-size: 0.78rem;
   font-weight: 600;
   color: var(--text-muted);
   margin-bottom: 4px;
 }
 .cart-notas textarea {
   width: 100%;
   border: 1px solid var(--border);
   border-radius: 10px;
   padding: 10px 12px;
   font-size: 0.85rem;
   font-family: inherit;
   background: var(--card);
   color: var(--text);
   resize: vertical;
   min-height: 60px;
 }

 /* Opciones de pago */
 .cart-pago-opciones {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 8px;
   margin: 8px 0;
 }
 .btn-pago-opcion {
   padding: 11px 8px;
   border-radius: 12px;
   border: 2px solid var(--border);
   background: transparent;
   color: var(--text);
   font-weight: 600;
   font-size: 0.85rem;
   cursor: pointer;
   font-family: inherit;
   transition: all 0.2s;
 }
 .btn-pago-opcion.active {
   border-color: var(--accent);
   background: rgba(198, 40, 40, 0.08);
   color: var(--accent);
 }
 .btn-pago-opcion:hover {
   border-color: var(--accent);
 }

 /* ===== STICKY ENVÍO GRATIS ===== */
 .sticky-envio-bar {
   position: fixed;
   bottom: 0;
   left: 0;
   right: 0;
   z-index: 800;
   background: var(--card);
   border-top: 1px solid var(--border);
   box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
   padding: 10px 16px 12px;
   padding-bottom: max(12px, env(safe-area-inset-bottom));
 }
 .sticky-envio-inner {
   max-width: 500px;
   margin: 0 auto;
 }
 .sticky-envio-text {
   font-size: 0.82rem;
   text-align: center;
   margin-bottom: 6px;
   font-weight: 500;
 }
 .sticky-envio-track {
   height: 7px;
   background: rgba(0,0,0,0.08);
   border-radius: 999px;
   overflow: hidden;
 }
 body.dark .sticky-envio-track {
   background: rgba(255,255,255,0.12);
 }
 .sticky-envio-fill {
   height: 100%;
   width: 0%;
   background: linear-gradient(90deg, #00a650, #00c853);
   border-radius: 999px;
   transition: width 0.35s ease;
 }
 .sticky-envio-fill.completo {
   background: linear-gradient(90deg, #00c853, #69f0ae);
 }

 /* Ajuste para que el botón de WhatsApp float no quede tapado */
 @media (max-width: 768px) {
   #whatsappFloat {
     bottom: 70px;
   }
   .btn-volver-arriba {
     bottom: 130px;
   }
 }

 .urgencia-real {
   margin: 2px 0 0;
   font-size: 0.78rem;
   font-weight: 700;
   color: #e53935;
   animation: pulseUrgencia 1.8s ease-in-out infinite;
 }
 @keyframes pulseUrgencia {
   0%, 100% { opacity: 1; }
   50% { opacity: 0.7; }
 }

 .search-box {
   position: relative;
 }
 .search-suggestions {
   position: absolute;
   top: calc(100% + 6px);
   left: 0;
   right: 0;
   background: var(--card);
   border: 1px solid var(--border);
   border-radius: 14px;
   box-shadow: var(--shadow-hover);
   z-index: 50;
   overflow: hidden;
   max-height: 320px;
   overflow-y: auto;
 }
 .suggestion-item {
   display: flex;
   justify-content: space-between;
   align-items: center;
   width: 100%;
   padding: 12px 16px;
   border: none;
   background: transparent;
   color: var(--text);
   font-family: inherit;
   font-size: 0.9rem;
   cursor: pointer;
   text-align: left;
   transition: background 0.15s;
 }
 .suggestion-item:hover {
   background: rgba(198, 40, 40, 0.08);
 }
 .suggestion-name {
   flex: 1;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   padding-right: 12px;
 }
 .suggestion-price {
   font-weight: 700;
   color: var(--accent);
   font-size: 0.85rem;
   flex-shrink: 0;
 }

 .cart-drawer {
   display: flex;
   flex-direction: column;
 }

 .cart-items {
   flex: 1 1 auto;
   overflow-y: auto;
   min-height: 120px;          /* asegura que siempre se vean productos */
   max-height: none;
   -webkit-overflow-scrolling: touch;
 }

 .cart-footer {
   flex-shrink: 0;
   max-height: 55vh;           /* el footer no puede comerse más de la mitad */
   overflow-y: auto;
   padding: 12px 16px 16px;
   gap: 8px;
 }

 /* Compactar un poco el resumen */
 .cart-summary {
   padding: 10px 12px;
 }
 .cart-summary-row {
   margin-bottom: 4px;
   font-size: 0.85rem;
 }
 .cart-summary-total {
   font-size: 1.1rem;
   margin-top: 6px;
   padding-top: 6px;
 }

 .cart-notas textarea {
   min-height: 48px;
   rows: 2;
 }

 .cart-coupon input {
   padding: 8px 10px;
   font-size: 0.85rem;
 }

 /* En móvil el footer aún más compacto */
 @media (max-width: 768px) {
   .cart-footer {
     max-height: 50vh;
     padding: 10px 12px 14px;
   }
   .pasos-carrito {
     display: none; /* ya lo tenías, mantenlo */
   }
 }

 /* Compartir wishlist */
 .btn-compartir-wishlist {
   display: block;
   width: 100%;
   margin-top: 6px;
   padding: 10px;
   border-radius: 12px;
   border: 1px solid var(--border);
   background: transparent;
   color: var(--text);
   font-weight: 600;
   font-size: 0.88rem;
   cursor: pointer;
   font-family: inherit;
   transition: border-color 0.2s, color 0.2s;
 }
 .btn-compartir-wishlist:hover {
   border-color: var(--accent);
   color: var(--accent);
 }

 /* Cupón aplicado */
 .cart-coupon-activo {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   background: rgba(0, 166, 80, 0.1);
   border: 1px solid rgba(0, 166, 80, 0.35);
   border-radius: 10px;
   padding: 10px 12px;
   font-size: 0.85rem;
 }
 .btn-borrar-cupon {
   background: none;
   border: 1px solid #e53935;
   color: #e53935;
   border-radius: 8px;
   padding: 6px 10px;
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   font-family: inherit;
   white-space: nowrap;
 }
 .btn-borrar-cupon:hover {
   background: rgba(229, 57, 53, 0.1);
 }

 /* ========== TESTIMONIOS CON FOTO ========== */
 .testimonios {
   padding: 48px 20px;
   background: rgba(0, 0, 0, 0.03);
   text-align: center;
 }
 body.dark .testimonios {
   background: rgba(255, 255, 255, 0.03);
 }
 .testimonios h2 {
   margin: 0 0 8px;
   font-size: 1.35rem;
   font-weight: 700;
 }
 .testimonios-sub {
   margin: 0 0 24px;
   color: var(--text-muted);
   font-size: 0.9rem;
 }
 .testimonios-grid {
   max-width: 960px;
   margin: 0 auto;
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
   gap: 16px;
   text-align: left;
 }
 .testimonio {
   background: var(--card);
   padding: 18px;
   border-radius: var(--radius);
   box-shadow: var(--shadow);
   border: 1px solid var(--border);
   font-size: 0.9rem;
 }
 .testimonio-header {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-bottom: 10px;
 }
 .testimonio-foto {
   width: 48px;
   height: 48px;
   border-radius: 50%;
   object-fit: cover;
   flex-shrink: 0;
   background: #ddd;
 }
 .testimonio-header strong {
   display: block;
   font-size: 0.9rem;
 }
 .testimonio-header span {
   font-size: 0.75rem;
   color: var(--text-muted);
 }
 .testimonio .stars {
   color: #f5a623;
   letter-spacing: 2px;
   margin-bottom: 6px;
   font-size: 0.85rem;
 }
 .testimonio p {
   margin: 0;
   line-height: 1.45;
   color: var(--text);
 }

 /* ========== CONTADOR / TRUST EXTRA ========== */
 .trust-extra {
   max-width: 900px;
   margin: 40px auto;
   padding: 0 20px;
 }
 .trust-extra-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 12px;
 }
 .trust-extra-item {
   background: var(--card);
   border: 1px solid var(--border);
   border-radius: 14px;
   padding: 18px 12px;
   text-align: center;
   box-shadow: var(--shadow);
 }
 .trust-extra-item strong {
   display: block;
   font-size: 1.25rem;
   color: var(--accent);
   margin-bottom: 4px;
 }
 .trust-extra-item span {
   font-size: 0.78rem;
   color: var(--text-muted);
 }
 @media (max-width: 600px) {
   .trust-extra-grid {
     grid-template-columns: 1fr 1fr;
   }
 }

 /* ========== BADGES DE CONFIANZA ========== */
 .badges-confianza {
   max-width: 900px;
   margin: 0 auto 40px;
   padding: 0 20px;
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 10px;
 }
 .badge-confianza {
   background: var(--card);
   border: 1px solid var(--border);
   border-radius: 999px;
   padding: 10px 16px;
   font-size: 0.82rem;
   font-weight: 600;
   box-shadow: var(--shadow);
   color: var(--text);
 }

 /* ========== EMPAQUE / CÓMO LLEGA ========== */
 .empaque-section {
   max-width: 900px;
   margin: 0 auto 48px;
   padding: 0 20px;
   text-align: center;
 }
 .empaque-section h2 {
   margin: 0 0 8px;
   font-size: 1.35rem;
   font-weight: 700;
 }
 .empaque-sub {
   margin: 0 0 24px;
   color: var(--text-muted);
   font-size: 0.9rem;
 }
 .empaque-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 16px;
 }
 .empaque-card {
   background: var(--card);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   overflow: hidden;
   box-shadow: var(--shadow);
 }
 .empaque-card img {
   width: 100%;
   height: 160px;          /* controla el tamaño */
   object-fit: cover;
   display: block;
   background: #eee;
 }
 .empaque-card p {
   margin: 0;
   padding: 12px;
   font-size: 0.88rem;
   font-weight: 600;
 }
 @media (max-width: 600px) {
   .empaque-grid {
     grid-template-columns: 1fr;
   }
   .empaque-card img {
     height: 180px;
   }
 }

 /* ================= REFERENCIAS ================= */
 .nav-active {
   color: var(--accent) !important;
 }
 .nav-active::after {
   width: 100% !important;
 }

 .referencias-info {
   text-align: center;
   padding: 12px 20px 4px;
   font-size: 0.9rem;
   color: var(--text-muted);
 }

 .referencias-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
   gap: 18px;
   padding: 20px 20px 8px;
   max-width: 1200px;
   margin: 0 auto;
 }

 .ref-card {
   background: var(--card);
   border-radius: var(--radius);
   overflow: hidden;
   box-shadow: var(--shadow);
   border: 1px solid var(--border);
   cursor: zoom-in;
   transition: transform 0.25s ease, box-shadow 0.25s ease;
   aspect-ratio: 1 / 1;
 }

 .ref-card:hover {
   transform: translateY(-5px);
   box-shadow: var(--shadow-hover);
 }

 .ref-card img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
   transition: transform 0.3s ease;
 }

 .ref-card:hover img {
   transform: scale(1.04);
 }

 /* Lightbox */
 .ref-lightbox {
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.94);
   display: none;
   align-items: center;
   justify-content: center;
   z-index: 9999;
   padding: 16px;
 }

 .ref-lightbox.show {
   display: flex;
 }

 .ref-lightbox img {
   max-width: min(94vw, 1100px);
   max-height: 88vh;
   object-fit: contain;
   border-radius: 10px;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
   user-select: none;
 }

 .ref-lb-close {
   position: fixed;
   top: 16px;
   right: 20px;
   width: 44px;
   height: 44px;
   border-radius: 50%;
   border: none;
   background: rgba(0, 0, 0, 0.5);
   color: #fff;
   font-size: 1.6rem;
   cursor: pointer;
   z-index: 10001;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: background 0.2s;
 }

 .ref-lb-close:hover {
   background: rgba(0, 0, 0, 0.75);
 }

 .ref-lb-prev,
 .ref-lb-next {
   position: fixed;
   top: 50%;
   transform: translateY(-50%);
   width: 48px;
   height: 48px;
   border-radius: 50%;
   border: none;
   background: rgba(0, 0, 0, 0.5);
   color: #fff;
   font-size: 2rem;
   cursor: pointer;
   z-index: 10001;
   display: flex;
   align-items: center;
   justify-content: center;
   transition: background 0.2s, transform 0.15s;
   backdrop-filter: blur(4px);
 }

 .ref-lb-prev:hover,
 .ref-lb-next:hover {
   background: rgba(0, 0, 0, 0.75);
   transform: translateY(-50%) scale(1.08);
 }

 .ref-lb-prev { left: 16px; }
 .ref-lb-next { right: 16px; }

 .ref-lb-counter {
   position: fixed;
   bottom: 20px;
   left: 50%;
   transform: translateX(-50%);
   background: rgba(0, 0, 0, 0.55);
   color: #fff;
   padding: 6px 16px;
   border-radius: 999px;
   font-size: 0.85rem;
   font-weight: 600;
   z-index: 10001;
 }

 @media (max-width: 768px) {
   .referencias-grid {
     grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
     gap: 12px;
     padding: 16px 14px 8px;
   }

   .ref-lb-prev,
   .ref-lb-next {
     width: 40px;
     height: 40px;
     font-size: 1.6rem;
   }

   .ref-lb-prev { left: 8px; }
   .ref-lb-next { right: 8px; }
 }

 @media (max-width: 480px) {
   .referencias-grid {
     grid-template-columns: 1fr 1fr;
     gap: 10px;
   }
 }

.testimonios-cta {
  text-align: center;
  margin-top: 36px;
}

/* ===== MODO CLARO (por defecto, sin .dark) ===== */
.btn-ver-referencias {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;

  background: #ffffff;
  border: 1px solid #c5c5c5;
  color: #1a1a1a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-ver-referencias:hover,
.btn-ver-referencias:focus-visible {
  background: #f5f5f5;
  border-color: #999;
  color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* ===== MODO OSCURO ===== */
body.dark .btn-ver-referencias {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: none;
}

body.dark .btn-ver-referencias:hover,
body.dark .btn-ver-referencias:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}