:root {
  --primary: #0078ff;
  --secondary: #ff3c78;
  --bg: #f8fafc;
  --text: #222;
  --radius: 12px;
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

/* === NAVBAR === */
.navbar {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
}

.logo span {
  color: var(--secondary);
}

.nav-links a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s;
}

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

.cart-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.cart-btn:hover {
  background: var(--secondary);
}

/* === HERO === */
.hero {
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  color: #fff;
  text-align: center;
  padding: 6rem 1rem;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  animation: fadeInDown 0.8s ease;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

/* === PRODUCTOS === */
.products {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary);
}

/* === ORDENAR PRODUCTOS (LIST BOX) === */
.products-header{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.products-header .section-title{
  margin-bottom: 0;
}

.sort-control{
  justify-self: start;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
}

.sort-control label{
  font-size: .95rem;
  opacity: .9;
}

.sort-control select{
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  font-size: .95rem;
  cursor: pointer;
}

@media (max-width: 700px){
  .products-header{
    grid-template-columns: 1fr;
    justify-items: center;
    margin-bottom: 1.25rem;
  }
  .sort-control{
    justify-self: center;
  }
}




.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.product {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 1rem;
  transition: transform 0.3s;
}

.product:hover {
  transform: translateY(-5px);
}

.product img {
  width: 100%;
  height: 250px; /* 🔹 un poco más grande en PC */
  object-fit: contain; /* 🔹 muestra la imagen completa */
  border-radius: var(--radius);
  background-color: #fff;
  padding: 5px;
  transition: transform 0.3s ease;
  cursor: zoom-in; /* 🔍 indica que se puede ampliar */
}

.product:hover img {
  transform: scale(1.03);
}

/* En pantallas pequeñas (celular), mantiene altura más compacta */
@media (max-width: 600px) {
  .product img {
    height: 220px;
  }
}



.product h3 {
  margin: 1rem 0 0.5rem;
}

.price {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* === DESCRIPCIÓN DE PRODUCTO === */
.product .description {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  text-align: left;
}

.product .description li {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.3rem;
  padding-left: 1.2rem;
  position: relative;
}

.product .description li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
}

/* === BOTÓN AGREGAR === */
.add-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
}

.add-btn:hover {
  background: var(--secondary);
}

/* === CARRITO === */
.cart-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.cart-modal.hidden {
  display: none;
}

.cart-content {
  background: white;
  width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.close-cart {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-checkout {
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  font-weight: 600;
}

/* === DISEÑO DE LOS ITEMS EN EL CARRITO === */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.8rem;
}

.cart-item-info p {
  margin: 0;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item-actions button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.cart-item-actions button:hover {
  background: var(--secondary);
}

.cart-item-actions button.remove {
  background: var(--secondary);
}

.cart-item-actions input {
  width: 45px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.2rem;
}


/* === CONTACTO === */
.contact {
  background: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 1rem auto;
  gap: 1rem;
}

.contact-form input, .contact-form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
}

/* === FOOTER === */
.footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.footer .social a {
  color: #fff;
  margin: 0 0.5rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer .social a:hover {
  color: var(--secondary);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === TOAST — SIEMPRE ENCIMA DE TODO (VERSIÓN MEJORADA) === */
.toast-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 18px 26px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  max-width: 90%; /* ✅ evita que se salga en pantallas pequeñas */
  line-height: 1.4; /* ✅ mejora legibilidad */
  white-space: pre-wrap; /* ✅ permite saltos de línea y texto largo */
  word-wrap: break-word; /* ✅ corta texto si es muy largo */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999999999 !important;
}

.toast-msg.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}


/* 🔹 aseguramos que el fondo borroso quede debajo */
body.modal-open::after {
  z-index: 9998 !important;
}




/* === CHECKOUT MODAL === */
.checkout-note {
  background: #fff7d1;
  padding: 1rem;
  border-left: 5px solid #ffb400;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #333;
  animation: fadeIn 1s ease;
}

.checkout-note .emoji {
  display: inline-block;
  animation: bounce 1.2s infinite;
}

#checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#checkout-form label {
  font-weight: 500;
  margin-top: 0.3rem;
}

#checkout-form input,
#checkout-form select {
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

#checkout-form button {
  margin-top: 1rem;
}

@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === LIGHTBOX (visor de imagen ampliada) === */
.image-viewer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity 0.3s;
}

.image-viewer.hidden {
  display: none;
}

.image-viewer img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(255,255,255,0.3);
  animation: zoomIn 0.3s ease;
}

#close-viewer {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* === SLIDER DE PRODUCTOS === */
.slider {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: zoom-in;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slider button.prev,
.slider button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  transition: background 0.2s;
}

.slider button.prev:hover,
.slider button.next:hover {
  background: rgba(0,0,0,0.8);
}

.slider button.prev { left: 10px; }
.slider button.next { right: 10px; }

@media (max-width: 600px) {
  .slider {
    height: 220px;
  }
}

/********* SLIDER MULTI-IMAGEN **********/
.slider {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
}

.slides-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slider button.prev,
.slider button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s;
  display: none; /* las mostramos por JS */
}

.slider button.prev:hover,
.slider button.next:hover {
  background: rgba(0,0,0,0.7);
}

.slider button.prev { left: 10px; }
.slider button.next { right: 10px; }

@media (max-width: 600px) {
  .slider {
    height: 220px;
  }
}

/* === FLECHAS EN VISOR AMPLIADO === */
.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  z-index: 4001;
  transition: background 0.3s;
  user-select: none;
}

.viewer-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

#viewer-prev { left: 30px; }
#viewer-next { right: 30px; }

@media (max-width: 600px) {
  .viewer-arrow {
    font-size: 1.6rem;
    padding: 0.3rem 0.6rem;
  }
}

/* === FIX COMPLETO para Android / iPhone === */

/* Fuerza al carrito y modales a estar siempre encima */
#cart-modal,
#checkout-modal,
#image-viewer {
  position: fixed !important;
  z-index: 9999 !important;
  inset: 0;
}

/* Fondo del carrito */
#cart-modal {
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(4px);
}

/* Asegura que los sliders y productos NUNCA se sobrepongan */
.product,
.slider,
.product * {
  position: relative !important;
  z-index: auto !important;
  transform: none !important;
}

/* Prevenir que animaciones o transiciones de los slides creen nuevas capas */
.slide {
  will-change: opacity;
  transform: none !important;
}

/* === FIX Android flotante + ajuste de desplazamiento === */
html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body.modal-open {
  overflow: hidden !important;
}

#cart-modal .cart-content {
  margin-top: 0 !important;
  transform: translateY(0) !important;
}

/* Fondo oscuro suave cuando el carrito esté abierto */
body.modal-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  z-index: 9998;
}

/* === FIX FINAL SLIDER AUTO === */
.slider .slide {
  opacity: 0 !important;
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.slider .slide.active {
  opacity: 1 !important;
  z-index: 2 !important;
}

/* === BOTÓN FLOTANTE DE CARRITO === */
.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 1.6rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  cursor: grab; /* 🔹 se verá movible */
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.3s ease, opacity 0.4s ease, bottom 0.4s ease;
  user-select: none; /* 🔹 evita seleccionar texto al arrastrar */
  touch-action: none; /* 🔹 esencial para Android/iPhone */
  -webkit-tap-highlight-color: transparent; /* 🔹 quita el flash azul de iPhone */
  opacity: 0;
  pointer-events: none;
}


.floating-cart:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.floating-cart:active {
  cursor: grabbing;
  transform: scale(0.95);
}

/* 🔹 Contador del carrito sobre el botón */
.floating-cart span {
  position: absolute;
  top: 6px;
  right: 9px;
  background: #fff;
  color: var(--secondary);
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 🔹 Aparición con animación suave */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating-cart.show {
  animation: fadeUp 0.4s ease forwards;
}

/* === LIMITES Y FIJACIÓN SEGURA EN MÓVIL === */
html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body.modal-open {
  overflow: hidden !important;
}

/* === EXTRA: Suavidad visual al abrir modales === */
.cart-content,
#checkout-modal .cart-content {
  animation: modalSlideIn 0.35s ease;
}

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

#cart-total.highlight {
  animation: flashTotal 0.4s ease;
}

@keyframes flashTotal {
  0% { color: var(--secondary); transform: scale(1.1); }
  100% { color: var(--text); transform: scale(1); }
}

/* 🔹 Rebote visual del contador del carrito */
@keyframes bounceScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.floating-cart span.bounce {
  animation: bounceScale 0.3s ease;
}

/* === CAMPOS DEL CHECKOUT (validación + método de pago) === */
#checkout-form select,
#checkout-form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  background: #fff;
  transition: border 0.2s ease;
}

#checkout-form select:focus,
#checkout-form input:focus {
  border-color: var(--primary);
  outline: none;
}

#checkout-form select[required]:invalid,
#checkout-form input[required]:invalid {
  border: 2px solid #ff3c78; /* rojo suave */
  background: #fff5f7;
}

#checkout-form select[required]:valid,
#checkout-form input[required]:valid {
  border: 1px solid #ccc;
  background: #fff;
}

#checkout-form select {
  cursor: pointer;
}

#checkout-form option[value=""] {
  color: #aaa;
}

/* Pequeña animación si intenta enviar vacío */
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

#checkout-form.shake {
  animation: shake 0.4s;
}


/* === 🟢 BOTÓN FLOTANTE DE WHATSAPP (arriba del buscador) === */
.floating-whatsapp {
  position: fixed;
  bottom: 100px;              /* 👈 un poco arriba del botón de búsqueda */
  left: 20px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.4s ease;
  user-select: none;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.floating-whatsapp:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.floating-whatsapp:hover {
  transform: scale(1.05);
}

.floating-whatsapp:active {
  transform: scale(0.95);
}

/* === 🧷 BOTONES DE COMPARTIR POR PRODUCTO === */
.product-share {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.6rem 0 1rem;
}

.product-share button {
  flex: 1;
  border: 1px solid rgba(0,0,0,0.08);
  background: #f7f7f7;
  color: #333;
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.product-share button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.product-share .wa-share-btn {
  background: #25D366;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.product-share .wa-share-btn .wa-btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.product-share .wa-share-btn .wa-btn-icon path {
  fill: #fff;
}


.product-share .copy-link-btn {
  background: #fff;
}

.product.flash {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
}

/* === 🔎 BOTÓN FLOTANTE DE BÚSQUEDA (lado izquierdo) === */
.floating-search {
  position: fixed;
  bottom: 20px;
  left: 20px;                 /* ⇦ opuesto al carrito */
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  font-size: 1.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  cursor: grab;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.3s ease, opacity 0.4s ease;
  user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  pointer-events: none;
}
.floating-search:not(.hidden) { opacity: 1; pointer-events: all; }
.floating-search:active { cursor: grabbing; transform: scale(0.95); }

/* === 🔍 MODAL DE BÚSQUEDA === */
.search-modal {
  position: fixed !important;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999 !important;
}
.search-modal.hidden { display: none; }

.search-content {
  width: min(700px, 92vw);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  position: relative;
}
.close-search {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: none;
  font-size: 1.6rem; cursor: pointer;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .6rem;
  margin-top: .6rem;
}
.search-bar input {
  padding: .7rem .9rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-size: 1rem;
}
.btn-search {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .7rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-search:hover { background: var(--secondary); }

.search-hint {
  margin-top: .6rem;
  font-size: .9rem;
  color: #666;
}

/* === 📌 BANNER DE RESULTADOS === */
.search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  background: #eef5ff;
  border: 1px solid #bcd7ff;
  color: #0b3b84;
  padding: .6rem .8rem;
  border-radius: 10px;
  margin: .6rem auto 1rem;
  max-width: 1200px;
  box-shadow: var(--shadow);
}
.search-banner.hidden { display: none; }
.search-banner-close {
  background: none; border: none;
  font-size: 1rem; cursor: pointer; color: #0b3b84;
}

/* Pequeña animación de “shake” si envían vacío */
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.search-bar.shake { animation: shake .35s; }

/* === 🏷️ BARRA DE CATEGORÍAS === */
.category-bar {
  max-width: 1200px;
  margin: 12px auto 20px;
  padding: 8px 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.category-bar .chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  user-select: none;
}
.category-bar .chip:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}
.category-bar .chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.shipping-box{
  margin:12px 0 8px; padding:12px; border:1px solid #e5e7eb; border-radius:12px;
  background:#fafafa;
}
.shipping-box .row{display:flex; justify-content:space-between; margin:6px 0; font-size:14px;}
.shipping-box .row.total{font-weight:700; font-size:16px; margin-top:8px;}
.shipping-box .hint{display:block; margin-top:6px; color:#6b7280; font-size:12px;}

/* === 🟢 WHATSAPP FLOATING ICON + ANIMATION === */
.floating-whatsapp {
  position: fixed;
  bottom: 100px;
  left: 20px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}
.floating-whatsapp:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}
.floating-whatsapp:hover {
  transform: scale(1.05);
}
.floating-whatsapp:active {
  transform: scale(0.95);
}
.floating-whatsapp .wa-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* === 💬 BURBUJA ANIMADA “Escríbenos por WhatsApp!!!” === */
.whatsapp-bubble {
  position: fixed;
  bottom: 175px;
  left: 95px;
  background: #25D366;
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999;
  font-size: 0.9rem;
}
.whatsapp-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

/* === ⚡ BANNER TEMPORAL CYBER WEEK === */
.cyber-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #ff007f, #007bff);
  color: #fff;
  text-align: center;
  font-weight: 700;
  padding: 10px 0;
  z-index: 9999;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.6s ease;
}
.cyber-banner.show {
  opacity: 1;
  transform: translateY(0);
}
body.banner-shown {
  margin-top: 45px; /* evita que tape el navbar */
}

/* ==============================
   ⚡ CYBER WEEK BANNER PRO
================================ */

.cyber-week-banner{
  position: relative;
  z-index: 900; /* debajo de navbar sticky, arriba del hero */
  padding: 10px 14px;
  background: #0b0b12;
  overflow: hidden;
}

/* Glow animado de fondo */
.cyber-week-banner::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,60,120,0.22), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(0,120,255,0.22), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06), transparent 35%);
  animation: cyberGlow 6s ease-in-out infinite;
  pointer-events:none;
}

/* Brillo tipo “scan/shimmer” */
.cyber-week-banner::after{
  content:"";
  position:absolute;
  top:0; left:-30%;
  width:30%;
  height:100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: cyberScan 4.5s linear infinite;
  pointer-events:none;
}

@keyframes cyberGlow{
  0%,100%{ transform: scale(1); opacity: .9; }
  50%{ transform: scale(1.06); opacity: 1; }
}
@keyframes cyberScan{
  0%{ left:-35%; }
  100%{ left:105%; }
}

.cyber-week-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 16px;

  /* Borde neón */
  border: 1.5px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 18px rgba(255,60,120,0.25),
    0 0 18px rgba(0,120,255,0.22);
  
  background: linear-gradient(135deg, rgba(255,60,120,0.08), rgba(0,120,255,0.08));
  padding: 12px 14px;
  backdrop-filter: blur(6px);
}

.cyber-left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cyber-badge{
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.25));
  animation: badgePulse 1.8s ease-in-out infinite;
}
@keyframes badgePulse{
  0%,100%{ transform: scale(1); opacity: .9; }
  50%{ transform: scale(1.08); opacity: 1; }
}

.cyber-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .6px;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 10px rgba(255,60,120,0.35),
    0 0 10px rgba(0,120,255,0.35);
  white-space: normal;  /* ✅ permite salto */
  line-height: 1.15;
}

.cyber-subtitle{
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  margin-left: 2px;
  white-space: nowrap;
}

/* Lado derecho countdown */
.cyber-right{
  text-align: right;
}

.cyber-label{
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
  letter-spacing: .4px;
}

/* Contenedor digital */
.cyber-digital{
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.cyber-unit{
  display: grid;
  place-items: center;
  min-width: 56px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 10px rgba(255,60,120,0.15),
    0 0 10px rgba(0,120,255,0.12);
}

.cyber-num{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  text-shadow:
    0 0 8px rgba(255,60,120,0.35),
    0 0 8px rgba(0,120,255,0.35);
}

.cyber-text{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
  color: rgba(255,255,255,0.7);
}

.cyber-sep{
  color: rgba(255,255,255,0.6);
  font-weight: 800;
  margin: 0 2px;
  animation: sepBlink 1s steps(1) infinite;
}
@keyframes sepBlink{
  50%{ opacity: .25; }
}

/* ✅ Responsive para que NO estorbe */
@media (max-width: 900px){
  .cyber-week-inner{
    grid-template-columns: 1fr;
    text-align: left;
  }
  .cyber-right{
    text-align: left;
  }
  .cyber-digital{
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .cyber-title{
    font-size: 18px;
  }
  .cyber-subtitle{
    display: none; /* compacta en móvil */
  }
}

@media (max-width: 480px){
  .cyber-unit{ min-width: 52px; }
  .cyber-num{ font-size: 18px; }
}

@media (max-width: 600px){
  .cyber-week-inner{
    grid-template-columns: 1fr; /* todo en una columna */
    gap: 10px;
    padding: 10px 12px;
  }

  .cyber-left{
    flex-wrap: wrap; /* ✅ permite que el texto baje */
    align-items: center;
  }

  .cyber-badge{
    font-size: 20px;
  }

  .cyber-title{
    font-size: 16px;      /* más compacto */
    white-space: normal; /* ✅ esencial */
    line-height: 1.2;
  }

  .cyber-subtitle{
    display: none; /* ✅ no estorba en móvil */
  }

  .cyber-right{
    text-align: left;
  }

  .cyber-digital{
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .cyber-unit{
    min-width: 50px;
    padding: 6px 7px;
  }

  .cyber-num{
    font-size: 17px;
  }
}

.cyber-title-sub{
  margin-left: 8px;
  font-weight: 700;
  opacity: .95;
}

@media (max-width: 600px){
  .cyber-title-sub{
    display: block;   /* ✅ se va a la segunda línea */
    margin-left: 0;
    font-size: 14px;
    opacity: .9;
  }
}

/* === 🟣 AVISO CENTRAL TEMPORAL === */
.cyber-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: linear-gradient(90deg, #ff005c, #007bff);
  color: white;
  font-weight: 700;
  text-align: center;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cyber-alert.show {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1.05);
}











/* =========================================================
   ✅ Cell Zone HN: Toggle Tema + Estado DISPONIBLE/AGOTADO
   (por defecto: oscuro)
   ========================================================= */

.nav-actions{
  display:flex;
  align-items:center;
  gap: .6rem;
}

/* Botón tema (se ve pero no estorba) */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.45rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  cursor:pointer;
  font-weight:700;
  font-size:.78rem;
  letter-spacing:.2px;
  user-select:none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover{ transform: translateY(-1px); }
.theme-toggle .t-sep{ opacity:.55; font-weight:600; }
.theme-toggle .t-dark,
.theme-toggle .t-light{ opacity:.55; }
.theme-toggle .is-active{ opacity:1; }

/* Badge de disponibilidad */
.availability{
  width: fit-content;
  margin: .35rem auto .35rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-weight:800;
  font-size:.78rem;
  letter-spacing:.6px;
  text-transform: uppercase;
}
.availability-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.availability.available{
  color:#0f9d72;
  background: rgba(15,157,114,0.10);
  border-color: rgba(15,157,114,0.28);
}
.availability.soldout{
  color:#e24a4a;
  background: rgba(226,74,74,0.10);
  border-color: rgba(226,74,74,0.28);
}

/* =======================
   🌙 Tema oscuro (default)
   ======================= */
body.theme-dark{
  --bg: #0b1220;
  --text: #e8edf5;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
}

body.theme-dark .navbar{
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.theme-dark .product,
body.theme-dark .cart-content,
body.theme-dark .search-banner,
body.theme-dark .category-bar{
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.08);
}

body.theme-dark .product .description li{
  color: #fff;
}

body.theme-dark .nav-links a{
  color: var(--text);
}

body.theme-dark .theme-toggle{
  border-color: rgba(255,255,255,0.14);
  background: rgba(15,23,42,0.55);
  color: var(--text);
}

body.theme-dark .availability{
  border-color: rgba(255,255,255,0.10);
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select{
  background: rgba(2,6,23,0.55);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{
  color: rgba(232,237,245,0.65);
}

/* Si algo queda muy claro, suaviza */
body.theme-dark .close-cart{
  color: rgba(232,237,245,0.85);
}
