/* ==============================================================
   VARIABLES Y RESET
   (se mantienen sin cambios para compatibilidad general)
============================================================== */
:root {
  --color-primary: #2c7a7b;
  --color-primary-hover: #285e61;
  --color-alert: #d69e2e;
  --color-error: #e53e3e;
  --color-text: #333;
  --color-offer: #e53e3e;
  --transition: 0.3s ease;
  --bg-light: #f0f4f8;
  --font: "Arial", sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =================================================================
   BASE & USABILIDAD ― suave para la vista y “finger-friendly”
================================================================= */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation; /* evita gestos no deseados */
  scroll-behavior: smooth; /* desplazamiento agradable */
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  color: var(--color-text);
  padding-bottom: 120px; /* espacio para elementos fijos */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==============================================================
   HEADER (MEJORADO)
============================================================== */
header {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-primary-hover)
  );
  text-align: center;
  padding: 24px 16px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid var(--color-primary-hover);
}

header h1 {
  font-size: clamp(2rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

header h2 {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  color: #e0e0e0;
}

/* ==============================================================
   TOTAL VISIBLE FIJO (estilo caja registradora)
============================================================== */
#total-display {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: linear-gradient(to bottom, #2e2e2e, #1a1a1a);
  padding: 10px 16px;
  border: 1px solid #0f0;
  border-radius: 5px;
  font-family: "Digital-7", "Courier New", monospace;
  font-size: 1em;
  color: #0f0;
  letter-spacing: 1px;
  text-shadow: 0 0 4px #0f0;
  box-shadow:
    inset 0 0 6px #0f0,
    0 4px 8px rgba(0, 255, 0, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
#total-display:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 0 6px #0f0,
    0 6px 12px rgba(0, 255, 0, 0.5);
}

/* ==============================================================
   CONTENEDOR DE PRODUCTOS
============================================================== */
#product-list {
  padding: 10px;
}

/* ==============================================================
   SECCIONES Y TÍTULOS
============================================================== */
.section-title {
  font-size: 1.6em;
  background: var(--color-primary);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0 10px;
}

/* ——— Colores personalizados por sección ——— */
.section-title:nth-of-type(1) {
  background: #c0392b;
}
.section-title:nth-of-type(2) {
  background: #34495e;
}
.section-title:nth-of-type(3) {
  background: #7f8c8d;
}
.section-title:nth-of-type(4) {
  background: #8e44ad;
}
.section-title:nth-of-type(5) {
  background: linear-gradient(
    45deg,
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet
  );
}
.section-title:nth-of-type(6) {
  background: #e67e22;
}
.section-title:nth-of-type(7) {
  background: #f1c40f;
}
.section-title:nth-of-type(8) {
  background: linear-gradient(45deg, pink, violet, magenta);
}
.section-title:nth-of-type(9) {
  background: #27ae60;
}
.section-title:nth-of-type(10) {
  background: #bdc3c7;
}
.section-title:nth-of-type(11) {
  background: #2c3e50;
}
.section-title:nth-of-type(12) {
  background: linear-gradient(
    45deg,
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet
  );
}
.section-title:nth-of-type(13) {
  background: #fff;
  color: #333;
}
.section-title:nth-of-type(14) {
  background: #2ecc71;
}
.section-title:nth-of-type(15) {
  background: #2980b9;
}
.section-title:nth-of-type(16) {
  background: #87ceeb;
}
.section-title:nth-of-type(17) {
  background: #98fb98;
}
.section-title:nth-of-type(18) {
  background: #87ceeb;
}
.section-title:nth-of-type(19) {
  background: repeating-linear-gradient(
    45deg,
    #000,
    #000 5px,
    #008000 5px,
    #008000 10px
  );
}

/* ==============================================================
   CARRUSEL DE PRODUCTOS
============================================================== */
.carousel-container {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 10px;
}
.carousel-container::-webkit-scrollbar {
  height: 6px;
}
.carousel-container::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

/* ==============================================================
   TARJETAS DE PRODUCTO
============================================================== */
.product {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 8px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.product img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-light);
  transition: opacity 0.3s;
}
.product h3 {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 4px;
  text-align: center;
  color: var(--color-primary);
  line-height: 1.3;
  max-height: calc(1.1em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product p {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: 8px;
  text-align: center;
  line-height: 1.3;
  max-height: calc(1.3em * 2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product p s {
  color: #888;
  margin-right: 4px;
}

/* ==============================================================
   ETIQUETA DE OFERTA
============================================================== */
.offer-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(45deg, #ff416c, #ff4b2b);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.offer-tag:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* ==============================================================
   CONTROLES DE CANTIDAD
============================================================== */
.quantity-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.quantity-buttons button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 1em;
  cursor: pointer;
  transition: background var(--transition);
}
.quantity-buttons button:hover {
  background: var(--color-primary-hover);
}
.quantity-buttons input {
  width: 50px;
  padding: 8px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
}

/* ==============================================================
   BOTÓN AGREGAR
============================================================== */
.add-btn {
  width: 100%;
  background: #e41a1c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 1.1em;
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}
.add-btn:hover {
  background: #c31a17;
}
.add-btn.added {
  background: #28a745;
  color: #fff;
  cursor: default;
}

/* ==============================================================
   MODAL DEL CARRITO
============================================================== */
#cart-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #fff;
  width: 90%;
  max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  padding: 20px;
  z-index: 1100;
  transition:
    transform 0.4s,
    opacity 0.4s;
  opacity: 0;
  pointer-events: none;
}
#cart-modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
#cart-modal-content {
  position: relative;
}
#close-modal {
  position: absolute;
  top: 20px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--color-text);
}
#cart-items-modal {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 10px;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  background: #ffffff;
  color: #333333;
  border-bottom: 1px solid #e41a1c;
  font-size: 1em;
}
.cart-item:last-child {
  border-bottom: none;
}
.remove-btn {
  background: var(--color-error);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  transition: background var(--transition);
}
.remove-btn:hover {
  background: #c82333;
}
#modal-total {
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-offer);
  padding: 10px;
  background: #ffccbc;
  border-radius: 8px;
  margin: 12px 0;
}

/* ==============================================================
   BOTÓN "ENVIAR PEDIDO"
============================================================== */
#submit-order {
  display: block;
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.3em;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition);
}
#submit-order:hover {
  background: var(--color-primary-hover);
  transform: scale(1.02);
}

/* ==============================================================
   BOTÓN DEL CARRITO (MOVIBLE)
============================================================== */
#cart-toggle {
  position: fixed;
  bottom: 60px;
  right: 20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 65% 35%,
    rgba(255, 255, 255, 0.9) 5%,
    rgba(255, 215, 0, 0.3) 30%,
    rgba(255, 255, 255, 0.2) 70%
  );
  color: gold;
  border: 3px solid rgba(255, 215, 0, 0.8);
  font-size: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 0 20px 5px rgba(255, 215, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1200;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(5px);
  animation: pulse 2s infinite;
}
#cart-toggle:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow:
    0 0 30px 8px rgba(255, 215, 0, 0.6),
    0 6px 20px rgba(0, 0, 0, 0.4);
  background: radial-gradient(
    circle at 65% 35%,
    rgba(255, 255, 255, 1) 10%,
    rgba(255, 215, 0, 0.5) 40%,
    rgba(255, 255, 255, 0.3) 70%
  );
  filter: brightness(1.1);
}
#cart-toggle:active {
  transform: scale(0.95);
}
.cart-quantity {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50px;
  padding: 8px 12px;
  font-size: 0.9em;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  min-width: 28px;
  text-align: center;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 25px 10px rgba(255, 215, 0, 0.5);
  }
  100% {
    box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.4);
  }
}

/* ==============================================================
   NOTIFICACIÓN TOAST
============================================================== */
.toast {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1em;
  opacity: 0;
  transition:
    opacity 0.5s,
    transform 0.5s;
  z-index: 1300;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==============================================================
   MEDIA‐QUERIES BASE ORIGINALES
============================================================== */
@media (orientation: portrait) {
  .product img {
    height: auto;
    max-height: 190px;
    object-fit: contain;
  }
}

/* ==============================================================
   ESTILOS PARA EL LOGIN
============================================================== */
#login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: url("images/fotoapp.gif") no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1500;
}
#login-form {
  background: rgba(199, 181, 181, 0.046);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(239, 232, 232, 0.002);
  text-align: center;
  width: 320px;
}
#login-form h2 {
  color: var(--color-text);
  margin-bottom: 1rem;
}
#login-form select,
#login-form input,
#login-form button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  transition: var(--transition);
}
#login-form select,
#login-form input {
  background: var(--bg-light);
  color: var(--color-text);
}
#login-form input::placeholder {
  color: #140e0e;
  opacity: 0.8;
}
#login-form input:focus {
  outline: none;
  box-shadow: 0 0 5px var(--color-primary);
}
#login-form button {
  background: #e41a1c;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
}
#login-form button:hover {
  background: #c31a17;
}

/* ==============================================================
   ETIQUETAS DE DESCUENTO
============================================================== */
.discount-tag {
  /* estilo base */
  position: absolute;
  top: 8px;
  right: 1px;
  padding: 5px 10px;
  border-radius: 3px;
  color: #fff;
  font-size: 0.8em;
  z-index: 2;
  margin-bottom: 2px;
}
.discount-tag.twoXone {
  background: #e41a1c;
}

/* Badge Central Glassmorphism (Elegante y con contraste) */
.promo-overlay-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro semitransparente */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #00f2fe; /* Cian neón para máximo contraste con el rojo */
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.4rem;
    z-index: 100;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    animation: flash-blink-glow-new 2s infinite;
    width: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* Color especial para Regalos (Fucsia Glass) */
.promo-overlay-badge.is-gift {
    color: #ff0080; /* Fucsia */
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

@keyframes flash-blink-glow-new {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 35px rgba(0, 242, 254, 0.3); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Color especial para Regalos */
.promo-overlay-badge.is-gift {
    background-color: rgba(213, 63, 140, 0.95); /* Rosa/Fucsia */
}

@keyframes flash-blink-glow {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 25px rgba(229, 62, 62, 0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.discount-tag.twoXone {
  background-color: #4caf50;
}
.discount-tag.threeXtwo {
  background-color: #2196f3;
}
.discount-tag.secondUnit70 {
  background-color: #9c27b0;
}
.discount-tag.twentyPercent {
  background-color: #ff9800;
}
.discount-tag.fiftyPercent {
  background-color: #d32f2f;
}
.discount-tag.gift {
  background-color: #e91e63;
}
.discount-tag.travel {
  background-color: #3f51b5;
}
.discount-tag.draw {
  background-color: #f44336;
}
.discount-tag.promoWeb {
  background-color: #ff5722;
}

/* ——— Nuevos descuentos ——— */
.discount-tag.client-card25 {
  background-color: #00bcd4;
  border: 1px solid #fff;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 5px;
}
.discount-tag.client-card15 {
  background-color: #0097a7;
  border: 1px solid #fff;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 5px;
}
.discount-tag.second-unit50 {
  background-color: #ffeb3b;
  color: #000;
  border: 1px solid #fff;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 5px;
}

/* ==============================================================
   CONTENEDOR DE IMAGEN
============================================================== */
.product-image-container {
  position: relative;
  display: inline-block;
}
.logo-container {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  box-shadow: none;
}
.logo-container img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin: 0;
  transition: transform 0.3s;
}
.logo-container img:hover {
  transform: scale(1.1);
}

/* ==============================================================
   BLOQUE FOCO
============================================================== */
.focus-logo {
  position: absolute;
  top: 80px;
  left: 70px;
  z-index: 2;
}
.focus-text {
  display: inline-block;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 3px;
  animation: blink 1.5s infinite;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.foco1 .focus-text {
  background-color: gold;
  color: #333;
}
.foco2 .focus-text {
  background-color: #6c757d;
  color: white;
}
.foco3 .focus-text {
  background-color: #cd7f32;
  color: white;
}
.foco4 .focus-text {
  background-color: #6f42c1;
  color: white;
}

/* ==============================================================
   BOTÓN AÑADIR AL CARRITO
============================================================== */
.add-to-cart {
  background-color: #28a745;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s;
  font-size: 14px;
}
.add-to-cart:hover {
  background-color: #218838;
  transform: translateY(-1px);
}

/* ==============================================================
   DETALLES DEL PRODUCTO
============================================================== */
.product-details {
  padding: 8px;
  font-size: 0.9em;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes flash-blink-glow {
  0%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.8);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(229, 62, 62, 1);
  }
}

.promo-overlay-badge {
  position: absolute;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #e53e3e !important;
  color: white !important;
  padding: 12px 24px !important;
  border-radius: 50px !important;
  font-weight: 900 !important;
  font-size: 1.6rem !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  z-index: 9999 !important;
  pointer-events: none;
  animation: flash-blink-glow 1.2s infinite ease-in-out !important;
  border: 4px solid white !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ==============================================================
   DROPDOWN FILTRO COMPACTO
============================================================== */
.dropdown-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem auto;
  padding: 1.2rem;
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  width: 95%;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 320px;
}
.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(
    135deg,
    var(--color-primary, #2a6df5) 0%,
    var(--color-secondary, #1a5de8) 100%
  );
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.15px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(42, 109, 245, 0.2);
}
.dropdown-content {
  display: none;
  position: absolute;
  background: #ffffff;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  z-index: 1000;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 10px;
  padding: 8px 0;
}
.dropdown-content a {
  color: #2d3748;
  padding: 14px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropdown-content a:hover,
.dropdown-content a:focus {
  background: #f8fafc;
  transform: translateX(3px);
}
@media (hover: none) {
  .dropdown-content a:hover {
    background: inherit;
    transform: none;
  }
  .dropdown-content a:active {
    background: #f1f5f9;
    transform: scale(0.98);
  }
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dropdown-content.show {
  display: block;
  animation: slideIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (max-width: 768px) {
  .filter-dropdown-btn {
    font-size: 1.125rem;
    padding: 18px 32px;
    min-height: 44px;
  }
  .dropdown-content a {
    font-size: 1rem;
    padding: 16px 24px;
  }
  .dropdown-container {
    padding: 1rem;
    margin: 1rem auto;
  }
}

/* ==============================================================
   AUXILIAR
============================================================== */
#store {
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.95em;
}
.date-range-tag {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #4a5568, #2d3748);
  color: white;
  padding: 8px 20px;
  border-radius: 0 0 15px 15px;
  font-size: 12px;
  z-index: 3;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  animation:
    float 3s ease-in-out infinite,
    pulse 2s infinite;
  font-weight: 600;
  letter-spacing: 0.8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}
.product {
  position: relative;
  overflow: visible;
}
.date-range-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  background: #48bb78;
  border-radius: 50%;
  animation: blink 1.5s infinite;
  filter: drop-shadow(0 0 3px #48bb78);
}
@keyframes float {
  0% {
    transform: translate(-50%, -15px);
  }
  50% {
    transform: translate(-50%, -5px);
  }
  100% {
    transform: translate(-50%, -15px);
  }
}
@media (orientation: landscape) {
  .product img {
    max-height: 250px;
    object-fit: contain;
  }
  .product {
    flex: 0 0 280px;
  }
}

/* ==============================================================
   ——— OPTIMIZACIONES EXTRA PARA DISPOSITIVOS MÓVILES ———
   (Todo lo anterior se mantiene.  Solo sobreescribimos donde
    realmente mejora la experiencia táctil y evitamos “zoom”)
============================================================== */
@media (max-width: 600px) {
  /* Tamaños de texto base ligeramente mayores */
  body,
  input,
  select,
  button {
    font-size: 16px;
  }

  /* Cabecera más compacta */
  header {
    padding: 20px 14px;
  }
  header h1 {
    font-size: 1.9rem;
  }
  header h2 {
    font-size: 1rem;
  }

  /* Carrusel con snapping para deslizamiento con dedo */
  .carousel-container {
    padding-left: 6px;
    gap: 8px;
    scroll-snap-type: x mandatory;
  }
  .product {
    flex: 0 0 170px;
    padding: 6px;
  }
  .product img {
    height: 150px;
  }
  .product,
  .offer-tag,
  .discount-tag {
    scroll-snap-align: start;
  }

  /* Botones “finger-friendly” (mín. 44 px alto) */
  .add-btn,
  .add-to-cart,
  .quantity-buttons button,
  #submit-order,
  .filter-dropdown-btn {
    min-height: 44px;
    font-size: 1rem;
  }

  /* Inputs de cantidad más cómodos */
  .quantity-buttons input {
    width: 56px;
    padding: 10px;
    font-size: 1rem;
  }

  /* Botón flotante del carrito: versión compacta */
  #cart-toggle {
    width: 72px;
    height: 72px;
    font-size: 2.2em;
    bottom: 24px;
    right: 16px;
  }

  /* Display total más pequeño y no flotante cuando se toca */
  #total-display {
    left: 12px;
    bottom: 16px;
    padding: 6px 10px;
  }
  #total-display:hover {
    transform: none;
  }

  /* Modal ocupa casi toda la pantalla vertical en móvil */
  #cart-modal {
    width: 95%;
    max-width: 95%;
  }
  #cart-items-modal {
    max-height: 45vh;
  }
}

/* ==============================================================
   INDICADORES DEL PANEL DE ADMINISTRACIÓN
============================================================== */
.admin-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: pulse-indicator 2s infinite;
}

.admin-indicator.new-product {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 2px solid #155724;
}

.admin-indicator.quantity-alert {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  color: #212529;
  border: 2px solid #856404;
}

/* Animación para los indicadores */
@keyframes pulse-indicator {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
}

/* Asegurar que los productos tengan posición relativa para los indicadores */
.product {
  position: relative;
}

/* Ajustar el z-index de otros elementos para que no interfieran */
.offer-tag,
.discount-tag,
.focus-logo {
  z-index: 5;
}

/* ==============================================================
   ANIMACIONES PARA NOTIFICACIONES DEL ADMIN
============================================================== */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes pulse-urgent {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

@keyframes pulse-error {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes pulse-limited {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes pulse-exclusive {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 66, 193, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(111, 66, 193, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 66, 193, 0);
  }
}

@keyframes pulse-new {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse-sale {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

@keyframes pulse-promotion {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1deg);
  }
  75% {
    transform: rotate(-1deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes pulse-offer {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Clases de animación para notificaciones */
.pulse-urgent {
  animation: pulse-urgent 1.5s infinite;
}

.pulse-error {
  animation: pulse-error 2s infinite;
}

.pulse-limited {
  animation: pulse-limited 1s infinite;
}

.pulse-exclusive {
  animation: pulse-exclusive 3s infinite;
}

.pulse-new {
  animation: pulse-new 2.5s infinite;
}

.pulse-sale {
  animation: pulse-sale 2s infinite;
}

.pulse-promotion {
  animation: pulse-promotion 1.8s infinite;
}

.pulse-offer {
  animation: pulse-offer 2.2s infinite;
}

/* ==============================================================
   NOTIFICACIONES MEJORADAS PARA MÓVILES
============================================================== */
@media (max-width: 768px) {
  #admin-notifications {
    left: 10px !important;
    right: 10px !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 60vh !important;
  }

  .admin-notification {
    font-size: 0.9rem !important;
    padding: 12px 16px !important;
    margin-bottom: 12px !important;
  }

  .admin-notification strong {
    font-size: 1rem !important;
  }

  .admin-notification div[style*="font-size: 0.95rem"] {
    font-size: 0.85rem !important;
  }
}

/* Mejorar contraste y legibilidad */
.admin-notification {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.admin-notification strong {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Animación de entrada para notificaciones */
@keyframes slideInFromLeft {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.admin-notification {
  animation: slideInFromLeft 0.5s ease-out;
}

/* Mejorar botón X de notificaciones para móvil */
@media (max-width: 768px) {
  .admin-notification {
    margin-bottom: 12px;
    padding: 16px 20px;
  }

  .admin-notification .close-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
  }

  .admin-notification .close-btn:active {
    background: rgba(255, 255, 255, 0.7) !important;
    transform: scale(0.95);
  }
}

/* --- DISEÑO DE SECCIONES Y ORDENACIÓN --- */
.section {
    margin-bottom: 50px; /* Mayor separación entre carruseles */
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding-bottom: 10px;
}

.section-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(90deg, #c53030 0%, #a21d1d 100%); /* Default Rojo */
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Temas específicos por sección */
.section-header-container.theme-red { background: linear-gradient(90deg, #e53e3e 0%, #c53030 100%); }
.section-header-container.theme-black { background: linear-gradient(90deg, #2d3748 0%, #000000 100%); }
.section-header-container.theme-gray { background: linear-gradient(90deg, #a0aec0 0%, #718096 100%); }
.section-header-container.theme-brown { background: linear-gradient(90deg, #8b4513 0%, #5d2906 100%); }
.section-header-container.theme-multi { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%, #6b8eff 100%); }
.section-header-container.theme-orange { background: linear-gradient(90deg, #ed8936 0%, #c05621 100%); }
.section-header-container.theme-green { background: linear-gradient(90deg, #48bb78 0%, #2f855a 100%); }
.section-header-container.theme-blue { background: linear-gradient(90deg, #4299e1 0%, #2b6cb0 100%); }
.section-header-container.theme-gold { background: linear-gradient(90deg, #d69e2e 0%, #b7791f 100%); }
.section-header-container.theme-purple { background: linear-gradient(90deg, #9f7aea 0%, #805ad5 100%); }

.section-title-wrapper {
    flex: 1;
}

.section-header-container .section-title {
    margin: 0;
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section-controls {
    display: flex;
    gap: 10px;
}

.order-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.1rem;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.order-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.order-btn:active {
    transform: translateY(0);
}

/* Ajustes para el carrusel con el nuevo diseño */
.carousel-container {
    padding: 0 10px 10px 10px;
}
