/* styles.css (Añadir al inicio) */

:root {
  /* ================================== */
  /* ?? Variables de Estilo Profesional */
  /* ================================== */

  /* Colores de Marca */
  --color-primary: #60AF31;
  --color-secondary: #60AF31;
  --color-accent: #60AF31;
 
  /* Colores de header */
  --color-header: #ffffff;
  --color-header-icono: #60AF31;
  --color-header-text: var(--color-text-dark);

  /* Colores de Menú escritorio */
  --color-header-menu-background: #C7425B;
  --color-header-menu-text: #ffffff;
  --color-header-menu-background-active: #60AF31;
  --color-header-menu-text-active: #ffffff;
  --color-header-menu-background-hover: #111111;
  --color-header-menu-text-hover: #ffffff;

  /* Colores de MenúCelular */
  --color-header-menu-movil-text: var(--color-text-dark);

  /* Colores de boton 01 */
  --color-header-btn-uno: var(--color-primary);
  --color-header-btn-uno-text: #ffffff;

  /* Colores de boton 02 — iconos/links sobre cabecera blanca */
  --color-header-btn-dos: transparent;
  --color-header-btn-dos-text: var(--color-text-dark);
  --color-header-btn-dos-hover: #60AF31;
  --color-header-btn-dos-hover-text: #ffffff;

  /* Colores de boton 03 */ 
  --color-header-btn-tres: var(--color-primary); /*Color boton mi cuenta fondo mormal*/
  --color-header-btn-tres-text: #ffffff; /*Color boton mi cuenta letra normal*/

  /* Colores de footer */
  --color-accent-sec: #0a0a0a;
  --color-footer-iconos: #60AF31;
  --color-footer-text-title: #ffffff;
  --color-footer-text: #ffffff;       /*Color texto*/
  --color-footer-text-gris: #ffffff;  /*Color texto mas opaco*/
  --color-footer-marca: #ffffff;  /*Color texto*/

  /* Colores de Carrito */
  --color-cart-title: #ffffff;      /*Color texto mas opaco*/

  /* Colores de fondos */
  --color-background: #fcfcf9;        /* Fondo general c�lido (Blanco roto) */
  --color-surface: #ffffff;           /* Fondo de contenedores (cards, modales) */
  --color-text-dark: #2d2f1f;         /* Texto principal oscuro con tinte oliva */
  --color-text-medium: #6b7060;       /* Texto secundario/descriptivo (gris verdoso medio) */
  --color-text-light: #9ca3af;        /* Texto de ayuda, deshabilitado (gris claro) */

  /* Colores de Borde y Sombra */
  --color-border-light: #e5e7eb;      /* Borde ligero (divisores, inactivos) */
  --color-border-focus: #b2b36e;      /* Borde al hacer foco (Oliva m�s claro) */
  --color-shadow-base: rgba(45, 47, 31, 0.04); /* Sombra suave */
  --color-shadow-hover: rgba(141, 143, 58, 0.15); /* Sombra en hover/acci�n (Oliva transparente) */

  /* Colores de Estado (Botones/Interacci�n) */
  --color-success: #496200;           /* �xito / Confirmaci�n (Igual que Secondary para consistencia) */
  --color-danger: #b71c1c;            /* Error / Advertencia / Eliminar */
  --color-info: #3b82f6;              /* Informativo (Se mantiene est�ndar si no se quiere cambiar) */

  /* Colores de Componente (Ej. Carrito) */
  --color-cart-badge: var(--color-danger); /* Globo de notificaci�n de carrito */
  --color-input-border: #d9dbbc;      /* Borde de inputs en estado normal (Oliva muy claro) */
  --color-desc-badge: #C7425B;

  /* Mapeo de variables antiguas */
  --color-primary-green: var(--color-primary);
  --color-secondary-green: var(--color-secondary);
  --color-light-green: var(--color-accent);
  --card-shadow-color: var(--color-shadow-base);
  --card-border-color: var(--color-border-light);
  --card-hover-border-color: var(--color-border-focus);
  --card-hover-shadow: rgba(141, 143, 58, 0.12); /* Sombra para hover */
  --card-hover-shadow-focus: rgba(141, 143, 58, 0.25);
  --text-dark: var(--color-text-dark);
  --text-medium: var(--color-text-medium);
  --price-color: var(--color-secondary);
  --button-color: var(--color-primary);
}

html{
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-medium);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  font-weight: 600;
}

header.site-header {
  background-color: var(--color-header);
  padding: var(--header-topbar-padding-top, 2px) 0 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(37, 61, 78, 0.08);
}

header .top-bar {
  max-width: var(--container-max, 1320px);
  margin: 0 auto;
  padding: 0 16px var(--header-topbar-padding-bottom, 2px);
}

.top-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  min-height: var(--header-topbar-min-height, 48px);
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.top-bar h1 {
  margin: 0 20px 0 20px;
  font-size: 23px;
  line-height: 1.2;
}

/* Bloque de búsqueda + botones en cabecera */
.search-login button {
  cursor: pointer;
}

/* Input de búsqueda antiguo (fallback) */
.search-login input[type="text"] {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--color-input-border);
}

.search-login button {
  cursor: pointer;
}

/* ==== Buscador de productos en la cabecera ==== */
.search-box {
  position: relative;
  width: 100%;
  max-width: none;
}

/* Popup de resultados */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  box-shadow: 0 4px 10px var(--color-shadow-base);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
  display: none; /* se muestra por JS */
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.search-result-item:hover {
  background-color: var(--color-background);
}

.search-result-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.search-result-info {
  display: flex;
  flex-direction: column;
}

.search-result-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.search-result-price {
  font-size: 0.8rem;
  color: var(--color-text-medium);
}

.search-result-empty {
  padding: 8px;
  font-size: 0.85rem;
  color: var(--color-text-medium);
}

.search-box input#header-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 0;
  border: none;
  font-size: 0.95rem;
  outline: none;
  box-shadow: none;
  transition: none;
}

.search-box input#header-search:focus {
  border: none;
  box-shadow: none;
}

nav {
  position: relative;
  z-index: 999;
  width: 100%;
  margin: 0;
  background: var(--color-header-menu-background);
}


/* =======================================================
   MENU PRINCIPAL
   ======================================================= */
header.site-header > nav {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0 auto;
  width: 100%;
  max-width: min(100%, var(--container-max, 1320px));
  min-width: 0;
  box-sizing: border-box;
  border-bottom: none;
  background: transparent;
}

/* Cada li ocupa un ancho proporcional */
nav ul li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

/* Enlaces del menú: compactos para que quepan todas las opciones */
nav ul li a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 7px 10px;
  font-size: calc(0.88rem - 1pt);
  font-weight: 500;
  font-family: var(--font-heading);
  text-decoration: none;
  color: var(--color-header-menu-text);
  border-radius: 0;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Subrayado suave animado al pasar el mouse */
nav ul li a::after {
  display: none;
}

nav ul li a:hover {
  background-color: var(--color-header-menu-background-hover);
  color: var(--color-header-menu-text-hover);
}

nav ul li a.active {
  background-color: var(--color-header-menu-background-active);
  color: var(--color-header-menu-text-active);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--color-header-menu-underline-active, var(--color-brand-gold));
}

/* Enlace del carrito dentro del nuevo estilo */
nav ul li a.cart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

nav ul li a.cart-link .fa-shopping-cart {
  font-size: 1.5rem;
}

nav ul li a.cart-link .fa-shopping-cart {
  font-size: 1.05rem;
}

/* Logo Principal */
.logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo-img {
  width: auto;
  max-width: var(--header-logo-max-width, 100px);
  height: var(--header-logo-height, 48px);
  object-fit: contain;
  display: block;
}

/* Banner principal */
.banner {
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Contenido principal */
main {
  text-align: center;
  padding: 20px;
}

main.home-main {
  text-align: left;
  padding: 24px 0 48px;
}

/* Ficha producto: menos aire bajo el menú / cabecera */
main.main--producto-ficha {
  padding-top: 10px;
}

/* Listado de productos (estilo general antiguo) */
.productos {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 20px;
}

.producto {
  width: 300px;
  height: auto;
  padding: 10px;
  text-align: center;
  margin-bottom: 20px;
  border: 3px solid transparent;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background-color: var(--color-surface);
  position: relative;
}

/* Botón corazón (favoritos) común a todas las tarjetas de producto */
.btn-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  color: var(--color-text-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 12;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-card-fav:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-card-fav:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-card-fav[aria-pressed="true"] {
  color: #e11d48;
}

.btn-card-fav[aria-pressed="true"]:hover {
  color: #be123c;
}

.btn-card-fav i {
  pointer-events: none;
}

.producto img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10% / 10%;
}

.producto:hover {
  border-color: var(--color-primary);
}

.producto:hover img {
  transform: scale(1.05);
  filter: brightness(100%) contrast(110%);
}

.producto p {
  margin: 10px 0;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-text-dark);
  /* Siempre 2 líneas para alinear precios y botones entre tarjetas */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.2em * 2);
  word-break: break-word;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* FOOTER */
footer {
  background-color: var(--color-footer-bg, #111111);
  padding: 0;
  font-size: 14px;
  margin-top: 10px;
}

.footer-content {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: initial;
  align-items: start;
  flex-wrap: initial;
  gap: 28px 32px;
  text-align: left;
  color: var(--color-footer-text-title);
  max-width: var(--container-max, 1320px);
  margin: 0 auto;
  padding: 40px 20px 16px;
  box-sizing: border-box;
}

.footer-section h4 {
  margin: 0 0 16px;
  padding: 0;
  font-size: calc(1.1rem - 1px);
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-footer-text-title);
  line-height: 1.3;
}

.footer-section p,
.footer-section span {
  margin: 5px 0;
}

.whatsapp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp img {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  text-align: center;
  margin-top: 0;
  padding: 12px 0;
  background-color: var(--color-accent-sec);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.footer-bottom a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: var(--color-header-icono);
  text-decoration: none;
}

/* =======================================================
   BOTÓN FORMATO 01
   ======================================================= */

.btn{
  display:inline-block;
  padding:8px 16px;
  border:none;
  border-radius:6px;
  font-weight:bold;
  cursor:pointer;
  transition:filter .3s ease;
  background-color:var(--color-header-btn-uno);
  color:var(--color-header-btn-uno-text);
  text-decoration: none;
}

.btn:hover{filter:brightness(90%);}

.btn-danger{background:var(--color-danger);color:var(--color-surface);}

.price{font-size:16px;font-weight:bold;margin:.4rem 0;color:var(--color-secondary);}

/* =======================================================
   BOTÓN FORMATO 02
   ======================================================= */

.btn-outline-header {
  display: inline-flex;          /* Alineación correcta de texto e icono si hubiera */
  align-items: center;
  justify-content: center;
  
  /* 🚫 LO MÁS IMPORTANTE: QUITAR EL SUBRAYADO */
  text-decoration: none !important; 
  
  /* Estilo visual */
  background-color: transparent;
  border: 2px solid var(--color-header-btn-dos);
  color: var(--color-header-btn-dos);
  
  /* Forma y Tamaño */
  padding: 6px 20px;
  border-radius: 999px;          /* Forma redondeada completa (Pill shape) */
  font-weight: 700;              /* Texto más gordito para que se lea bien */
  font-size: 0.9rem;
  
  /* Transiciones suaves */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  box-shadow: none;
}

/* EFECTO HOVER (Al pasar el mouse) */
.btn-outline-header:hover {
  background-color: var(--color-header-btn-dos-hover);
  color: var(--color-header-btn-dos-hover-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 216, 32, 0.3);
  border-color: var(--color-header-btn-dos-hover);
}

/* EFECTO ACTIVE (Al hacer clic) */
.btn-outline-header:active {
  transform: translateY(0);
  box-shadow: none;
}

/* =======================================================
   BOTÓN FORMATO 03
   ======================================================= */

.btn-outline-mode { background-color: transparent; border: 2px solid var(--color-header-btn-tres); color: var(--color-header-btn-tres); }
.btn-outline-mode:hover { background-color: var(--color-header-btn-tres); color: var(--color-header-btn-tres-text); transform: translateY(-2px); }

/* ==== Contact Form ==== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 320px;
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
}

.contact-form label {
  font-weight: bold;
  margin-top: 10px;
  color: var(--color-text-dark);
}

.contact-form input,
.contact-form textarea {
  padding: 8px;
  border: 1px solid var(--color-input-border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
}

.contact-form button {
  align-self: flex-start;
}

/* ==== Carrito Mejorado (carrito.php) ==== */
#cart-area {
  overflow-x: auto;
  margin: 20px auto;
  max-width: 1000px;
  width: 90%;
}

#cart-area table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

#cart-area th,
#cart-area td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
}

#cart-area th {
  background-color: var(--color-accent);
  color: var(--color-cart-title);
  font-weight: bold;
}

#cart-area tr:last-child td {
  border-bottom: none;
}


/* ===== Carrito: acciones y total ===== */
.cart-actions {
  margin-top: 20px;
  margin-bottom: 30px;
  display: none;
  justify-content: center;
  gap: 12px;
}

.cart-actions .btn {
  min-width: 150px;
}

.actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.qty-input {
  width: 60px;
  padding: 5px;
  text-align: center;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  font-size: 14px;
  margin-right: 5px;
}

/* ==== Modal Auth ==== */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-content {
  background: var(--color-surface);
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  text-align: center;
}
.modal-content input {
  display: block;
  width: 90%;
  max-width: 250px;
  margin: 10px auto;
  padding: 8px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
}

/* Etiquetas de los campos del modal (Sexo, Fecha nac., etc.) */
.modal-content label.field-label {
  display: block;
  width: 90%;
  max-width: 250px;
  margin: 4px auto 2px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-text-medium);
}

/* Select del modal (Sexo) con mismo tamaño que los inputs */
.modal-content select {
  display: block;
  width: 90%;
  max-width: 276px;
  margin: 0 auto 8px;
  padding: 8px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
}

/* === Checkout modal === */
.checkout-modal-content {
  max-width: 420px;
  width: 95%;
  text-align: left;
}

.checkout-row {
  margin-top: 6px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Fila compacta para DNI / Celular */
.checkout-inline-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.checkout-inline-group label {
  margin: 0;
  min-width: 80px;
  color: var(--color-text-dark);
}

.checkout-inline-group input[type="text"],
.checkout-inline-group input[type="tel"],
.checkout-inline-group input[type="number"] {
  flex: 1;
  margin: 0;
}

.checkout-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.checkout-modal-content input[type="text"],
.checkout-modal-content select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
}

.checkout-actions {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.help-text {
  font-size: 0.8rem;
  color: var(--color-text-medium);
}

/* Secciones de pedido previo */
.order-section {
  background: var(--color-surface);
  margin: 10px auto;
  padding: 15px;
  border-radius: 8px;
  max-width: 900px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.order-section h3 {
  margin-top: 0;
  color: var(--color-text-dark);
}

.order-section .form-group {
  margin: 8px 0;
}

.order-section .form-group input,
.order-section .form-group select {
  width: 100%;
  max-width: 400px;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-input-border);
}

/* ==== Contacto (mapa + formulario) ==== */
.contacto-contenedor {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-mapa {
  flex: 1 1 320px;
  min-width: 600px;
  max-width: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsivo contacto */
@media (max-width: 900px) {
  .contacto-contenedor {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-mapa {
    margin-top: 25px;
    min-width: auto;
  }
}

/* Contenedores de paginación (destacados y catálogo) */
.paginacion-destacados,
.paginacion-catalogo {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-medium);
}

/* Botones flecha paginación */
.btn-paginacion-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-primary);
  color: var(--color-surface);
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-paginacion-icon:hover:not(:disabled) {
  background-color: var(--color-secondary);
  transform: translateY(-1px);
}

.btn-paginacion-icon:disabled {
  background-color: var(--color-border-light);
  cursor: default;
  transform: none;
}

/* Contenedor de los números de página */
.pag-numbers {
  display: flex;
  gap: 6px;
}

/* Cada número de página */
.pag-number {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 14px;
  border: 1px solid var(--color-input-border);
  background-color: var(--color-surface);
  color: var(--color-text-medium);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.pag-number:hover {
  background-color: var(--color-background);
  transform: translateY(-1px);
}

/* Página seleccionada */
.pag-number.active {
  background-color: var(--color-primary);
  color: var(--color-surface);
  border-color: var(--color-primary);
  font-weight: 600;
}

/* Contenedor del título + flechas de destacados */
.destacados-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.destacados-header h2 {
  margin: 0;
  font-size: 20px;
  text-align: center;
  flex: 1;
  color: var(--color-text-dark);
}

/* Botones de flecha (solo destacados y similares/lateral) */
.btn-destacados-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-primary);
  color: var(--color-surface);
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-destacados-arrow:hover:not(:disabled) {
  background-color: var(--color-secondary);
  transform: translateY(-1px);
}

.btn-destacados-arrow:disabled {
  background-color: var(--color-border-light);
  cursor: default;
  transform: none;
}

/* ====================
   Estilos del Carrito
   ==================== */

main h2 {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.cart-wrapper {
  margin-top: 1rem;
  overflow-x: auto;
}



/* Mensaje carrito vacío */
p.empty {
  text-align: center;
  padding: 2rem 0;
  color: var(--color-text-medium);
}

/* Botones de acciones debajo del carrito */
.actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Botones dentro de los modales (auth y carrito) */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* ===== Icono de carrito con contador en la cabecera ===== */

nav ul li a.cart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

nav ul li a.cart-link .fa-shopping-cart {
  font-size: 1.1rem;
}

/* ==== Detalle de producto (producto.php) ==== */

.product-section {
  max-width: 1000px;
  margin: 8px auto;
  padding: 16px;
}

/* Ficha de producto: ancho de pantalla (sin caja centrada estrecha) */
.product-section.product-section--ficha {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 6px clamp(16px, 4vw, 48px) 32px;
  box-sizing: border-box;
}

.product-section h2 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-dark);
}

/* Layout: detalle + destacados laterales */
.product-detail-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Caja del detalle principal */
.product-detail-wrapper {
  background-color: var(--color-surface);
  border-radius: 12px;
  
  /* CAMBIO 1: Sombra más pronunciada (de 0.04 a 0.12 de opacidad) */
  box-shadow: 0 10px 25px rgba(45, 47, 31, 0.12); 
  
  /* CAMBIO 2: Agregamos un borde gris visible */
  border: 1px solid #cbd5e1; 
  
  padding: 16px;
  flex: 1;
}

/* Lateral de destacados */
.product-sidebar {
  width: 260px;
  max-width: 100%;
}

/* Header del bloque lateral */
.product-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}

.product-sidebar-header span {
  font-weight: 700;
  font-size: 14px;
}

.product-sidebar-arrows {
  display: flex;
  gap: 4px;
}

/* Lista vertical de destacados laterales */
.destacados-lateral-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Item individual del lateral */
.destacado-lateral-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background-color: var(--color-surface);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid var(--color-border-light);
}

.destacado-lateral-item:hover {
  background-color: var(--color-background);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.destacado-lateral-img img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.destacado-lateral-info {
  display: flex;
  flex-direction: column;
  gap: 0px;
  text-align: left;
  justify-content: center;
}

.destacado-lateral-name {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  color: var(--color-text-dark);
  line-height: 1.2;
  margin-bottom: 4px;
}

.destacado-lateral-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.destacado-lateral-meta .price-container {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.destacado-lateral-price {
  font-size: 13px;
  color: var(--color-secondary);
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
}

.destacado-lateral-price--discount {
  color: var(--color-desc-badge);
}

.destacado-lateral-stock {
  font-size: 11px;
  color: var(--color-text-medium);
  margin: 0 0 0 auto;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Breadcrumb del detalle del producto */
.product-breadcrumb-block {
  width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
  background: #ffffff;
  background-color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-card, 12px);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

/* Anula estilos globales de nav (menú rojo) */
nav.product-breadcrumb,
.product-breadcrumb-block nav.product-breadcrumb {
  background: #ffffff !important;
  background-color: #ffffff !important;
  position: static;
  z-index: auto;
  width: auto;
  margin: 0;
}

.product-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #000;
  margin: 0;
  padding: 0;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase;
}

.product-breadcrumb-link {
  color: #000;
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: inherit;
}

.product-breadcrumb-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.product-breadcrumb-sep {
  color: #000;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.55;
}

.product-breadcrumb-current {
  color: #000;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: inherit;
}

@media (max-width: 600px) {
  .product-breadcrumb {
    font-size: 0.78rem;
  }
  .product-breadcrumb-current {
    max-width: 200px;
  }
}

/* === Ficha producto 3 columnas (galería | detalle | compra) === */
.product-detail-block {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  background-color: #ffffff;
  padding: 16px 20px 24px;
  border-radius: var(--radius-card, 12px);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.product-detail-block nav.product-breadcrumb {
  background: transparent !important;
  background-color: transparent !important;
  position: static;
  z-index: auto;
  width: auto;
  margin: 0 0 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.product-detail-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.product-ficha-grid {
  display: grid;
  /* Galería | detalle (ancho acotado) | precio — separación uniforme vía column-gap */
  grid-template-columns: minmax(364px, 1.4fr) minmax(240px, 340px) minmax(220px, 0.88fr);
  gap: 20px;
  column-gap: 20px;
  align-items: start;
  margin-top: 0;
}

.product-ficha-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0 0 8px;
  line-height: 1.3;
}

.product-ficha-subtitle {
  margin: 16px 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.product-ficha-col--info {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-ficha-col--cta {
  width: 100%;
  min-width: 0;
}

.product-ficha-col--cta .product-detail-price-stock--cta {
  width: 100%;
  box-sizing: border-box;
}

.product-ficha-panel {
  box-sizing: border-box;
  width: 100%;
}

.product-ficha-panel--detail,
.product-ficha-panel--extra {
  padding: 12px 14px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}

.product-ficha-panel--detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-ficha-panel--extra {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-ficha-col--info .product-ficha-title {
  font-size: 1.12rem;
  text-align: left;
}

/* main tiene text-align:center; la ficha debe ir alineada a la izquierda */
main .product-section.product-section--ficha,
.product-detail-page {
  text-align: left;
}

.product-detail-page .product-detail-description-block,
.product-detail-page .product-share-modern--ficha {
  text-align: left;
}

.product-ficha-col--info .product-detail-caracteristicas {
  text-align: left;
  align-items: stretch;
}

.product-ficha-col--info .pc-group .pc-question {
  text-align: left;
}

.product-ficha-col--info .pc-group .pc-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
  text-align: left;
}

.product-ficha-col--info .pc-chips {
  justify-content: flex-start;
}

.product-ficha-col--info .pc-checks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.product-ficha-col--info .pc-select,
.product-ficha-col--info .pc-parrafo {
  max-width: 100%;
  text-align: left;
}

.product-ficha-col--info .product-share-modern--ficha .share-buttons-row {
  justify-content: flex-start;
}

.product-price-online-note {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-medium);
  margin-top: 4px;
}

.product-detail-price-stock--cta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--color-background, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
}

.product-detail-price-stock--cta .product-detail-actions--en-bloque-precio {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.product-detail-price-stock--cta .product-detail-actions--en-bloque-precio .pedido {
  margin-top: 0;
}

.product-detail-price-old {
  text-decoration: line-through;
  color: var(--color-danger);
  font-size: 0.95rem;
  margin-right: 8px;
}

.price-discount-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-discount-line-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.product-detail-ahorras {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.product-detail-price--destacado {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-secondary);
}

.product-detail-actions--cta .pedido {
  flex-wrap: wrap;
}

.btn-add-cart-ficha {
  flex: 1;
  min-width: 160px;
  background: var(--color-primary, #166534) !important;
  border-color: var(--color-primary, #166534) !important;
  color: #fff !important;
}

.product-sidebar--inline {
  width: 100%;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-light);
}

.product-share-modern--ficha {
  margin-top: 0;
  padding-top: 14px;
  border-top: none;
}

.product-share-modern--ficha .share-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 8px;
}

.product-share-modern--ficha .share-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-gallery {
  display: flex;
  gap: 17px;
  align-items: stretch;
}

.product-gallery-thumbs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.product-gallery-thumbs-col.is-hidden {
  display: none;
}

.product-gallery-tnav {
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  border-radius: 6px;
  width: 39px;
  height: 36px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: var(--color-text-dark);
}

.product-gallery-tnav:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.product-gallery-thumbs-viewport {
  max-height: 392px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 101px;
  scrollbar-width: thin;
}

.product-gallery-thumbs-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px;
}

.product-gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  width: 90px;
  height: 90px;
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-gallery-thumb.is-active {
  border-color: var(--color-primary, #059669);
  box-shadow: 0 0 0 1px var(--color-primary, #059669);
}

.product-gallery-main-col {
  flex: 1;
  position: relative;
  min-width: 0;
}

.product-gallery-hnav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(37, 61, 78, 0.12);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-dark);
  box-shadow: 0 2px 10px rgba(37, 61, 78, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#product-gallery-arrow-left {
  left: 10px;
}

#product-gallery-arrow-right {
  right: 10px;
}

.product-gallery-hnav:hover:not(:disabled) {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
  background: #fff;
}

.product-gallery-hnav:disabled {
  opacity: 0.35;
  cursor: default;
}

.product-gallery-main-view.product-detail-img-wrapper {
  width: 100%;
  max-width: 100%;
  cursor: zoom-in;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  background: var(--color-background, #f8fafc);
  overflow: hidden;
}

/* Imagen principal de la galería (+40% alto respecto al valor base 420px) */
.product-ficha-col--gallery .product-gallery-main-view.product-detail-img-wrapper img {
  max-height: 588px;
}

@media (max-width: 1100px) {
  .product-ficha-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-ficha-col--cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .product-detail-block {
    padding: 12px 14px 20px;
  }

  .product-ficha-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  /* Móvil: calificación, comentario y compartir debajo del bloque de precios */
  .product-ficha-col--gallery {
    order: 1;
    width: 100%;
  }

  .product-ficha-col--info {
    display: contents;
  }

  .product-ficha-panel--detail {
    order: 2;
    width: 100%;
    max-width: 100%;
  }

  .product-ficha-panel--extra {
    order: 6;
    width: 100%;
    max-width: 100%;
  }

  .product-ficha-col--cta {
    order: 5;
    width: 100%;
    max-width: 100%;
    grid-column: auto;
  }

  .product-gallery {
    flex-direction: column;
    gap: 12px;
  }

  .product-gallery-main-col {
    order: 1;
    width: 100%;
  }

  .product-gallery-thumbs-col {
    order: 2;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
  }

  .product-gallery-tnav {
    display: none;
  }

  .product-gallery-thumbs-viewport {
    width: 100%;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }

  .product-gallery-thumbs-viewport::-webkit-scrollbar {
    display: none;
  }

  .product-gallery-thumbs-track {
    flex-direction: row;
    gap: 8px;
    padding: 4px 2px;
  }

  .product-gallery-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
  }

  .product-gallery-hnav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  #product-gallery-arrow-left {
    left: 8px;
  }

  #product-gallery-arrow-right {
    right: 8px;
  }

  .product-ficha-col--gallery .product-gallery-main-view.product-detail-img-wrapper img {
    max-height: 504px;
  }
}

.product-detail-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 👇 Contenedor con overflow y cursor + zoom */
.product-detail-img-wrapper {
  flex: 0 0 360px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
}

.product-detail-img-wrapper img {
  width: 100%;
  max-height: 420px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.2s ease-out;
}

.product-detail-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-detail-category {
  font-size: 0.9rem;
  color: var(--color-text-medium);
}

.product-detail-description {
  font-size: 0.95rem;
  color: var(--color-text-medium);
}

.product-detail-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* Tabla con “todo el detalle” extra del producto */
.product-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-dark);
}

.product-detail-table th,
.product-detail-table td {
  border: 1px solid var(--color-border-light);
  padding: 6px 8px;
  text-align: left;
}

.product-detail-table th {
  width: 35%;
  background-color: var(--color-background);
}

/* Responsive detalle producto + lateral */
@media (max-width: 900px) {
  .product-detail-layout {
    flex-direction: column;
  }

  .product-sidebar {
    width: 100%;
  }
}

/* Responsive detalle producto */
@media (max-width: 768px) {
  .product-detail-card {
    flex-direction: column;
    align-items: center;
  }

  .product-detail-img-wrapper {
    width: 80%;
  }

  .product-detail-info {
    width: 100%;
  }
}

.stock {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-medium);
  margin-bottom: 4px;
}

/* ==== Animación de FADE para DESTACADOS, SIMILARES y LATERAL ==== */
#lista-ofertas,
#similares-container,
#destacados-lateral {
  position: relative;
  overflow: visible; 
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0;
  justify-content: center;
  justify-items: center;
}

#prod-cat-destacados,
#destacados,
#nuevos {
  position: relative;
  overflow: visible;
  width: 100%;
  padding: 10px 0;
}

/* clase que activaremos desde JS */
#lista-ofertas.fade,
#prod-cat-destacados.fade,
#destacados.fade,
#similares-container.fade,
#destacados-lateral.fade,
#nuevos.fade {
  animation: destacadosFade 0.4s ease;
}

@keyframes destacadosFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.nosotros {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 20px 0;
}

/* Imagen a la izquierda */
.nosotros img {
  max-width: 35%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

/* Texto a la derecha y justificado */
.nosotros-texto {
  flex: 1;
  text-align: justify;
}

.nosotros-texto p {
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--color-text-medium);
}

/* Responsivo: en pantallas pequeñas se pone en columna */
@media (max-width: 768px) {
  .nosotros {
    flex-direction: column;
  }

  .nosotros img {
    max-width: 100%;
  }
}

/* Página de registro */
.register-page {
  min-height: calc(100vh - 200px); /* ajusta según tu header/footer */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 15px 40px;
  background-color: var(--color-background);
}

.register-wrapper {
  width: 100%;
  max-width: 960px;
}

.register-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 24px 24px 28px;
  box-shadow: 0 8px 24px var(--color-shadow-base);
  border: 1px solid var(--color-border-light);
}

.register-title {
  font-size: 1.6rem;
  margin: 0 0 6px;
  text-align: center;
  color: var(--color-text-dark);
}

.register-subtitle {
  margin: 0 0 20px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-medium);
}

/* Grid de dos columnas en escritorio */
.register-form .form-grid {
  display: flex;
  gap: 20px;
}

.register-form .form-column {
  flex: 1;
}

/* Campos */
.register-form .form-group {
  margin-bottom: 12px;
}

.register-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: var(--color-text-dark);
}

.register-form input,
.register-form select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-input-border);
  box-sizing: border-box;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.register-form input:focus,
.register-form select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(141, 143, 58, 0.2);
}

/* Botón principal */
.register-btn {
  width: 100%;
  margin-top: 18px;
  padding: 10px 0;
  font-size: 1rem;
}

/* Texto inferior */
.register-footer-text {
  margin-top: 14px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-text-medium);
}

.register-footer-text a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.register-footer-text a:hover {
  text-decoration: underline;
}

.register-hint {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Responsive: una sola columna en móvil */
@media (max-width: 768px) {
  .register-card {
    padding: 18px 15px 22px;
  }

  .register-form .form-grid {
    flex-direction: column;
  }
}
/*Boton mi cuenta snormal*/
.btn-mi-cuenta {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-header-btn-cuenta);
  background-color: transparent;
  color: var(--color-header-btn-cuenta-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

/*Boton mi cuenta al pasar el mouse*/
.btn-mi-cuenta:hover {
  background-color: var(--color-header-btn-cuenta-hover);
  color: var(--color-header-btn-cuenta-hover-text);
}

/* ==========================
   Home: Destacados, Nuevos y Similares
   con estilo de catálogo
   ========================== */

/* Contenedor: mismo grid que catálogo */
#lista-ofertas,
#similares-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 270px));
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 32px;
}

.home-main .home-section #prod-cat-destacados,
.home-main .home-section #destacados,
.home-main .home-section #nuevos {
  padding: 0;
}

/* Tarjeta: mismo “card” que catálogo, pero usando .producto */
#lista-ofertas .producto,
#similares-container .producto {
  width: 100%;
  max-width: 250px;
  text-align: left;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 6px 14px var(--card-shadow-color);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.12s ease,
              box-shadow 0.12s ease,
              border-color 0.12s ease;
  margin-bottom: 0;
}

.home-main #prod-cat-destacados .producto,
.home-main #destacados .producto,
.home-main #nuevos .producto {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  text-align: left;
  background: var(--color-surface);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 6px 14px var(--card-shadow-color);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.12s ease,
              box-shadow 0.12s ease,
              border-color 0.12s ease;
  margin-bottom: 0;
}

#lista-ofertas .producto:hover,
.home-main #prod-cat-destacados .producto:hover,
.home-main #destacados .producto:hover,
.home-main #nuevos .producto:hover,
#similares-container .producto:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-focus);
  box-shadow: 0 10px 22px var(--card-hover-shadow);
}

/* Imagen al estilo catálogo (cuadrada, recortada) */
#lista-ofertas .producto img,
#lista-ofertas .producto .catalogo-card-img img,
#prod-cat-destacados .producto img,
#destacados .producto img,
#nuevos .producto img,
#similares-container .producto img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--color-background);
  border: 1px solid var(--color-border-light);
  object-fit: cover;
}

/* Nombre igual que .catalogo-card-name */
#lista-ofertas .producto p,
#lista-ofertas .producto .catalogo-card-name,
#prod-cat-destacados .producto p,
#destacados .producto p,
#nuevos .producto p,
#similares-container .producto p {
  margin: 6px 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text-dark);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* Categoría debajo del nombre */
.producto-category {
  font-size: 0.8rem;
  color: var(--color-text-medium);
  text-align: center;
  margin: 2px 0 0;
  width: 100%;
  box-sizing: border-box;
}

/* Fila precio (izquierda) + stock (derecha), igual que .catalogo-card-meta */
.producto-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
}

.producto-meta .price-container {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.producto-meta .stock {
  font-size: 0.8rem;
  color: var(--color-text-medium);
  margin: 0 0 0 auto;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Precio igual que .catalogo-card-price */
#lista-ofertas .producto .price,
#prod-cat-destacados .producto .price,
#destacados .producto .price,
#nuevos .producto .price,
#similares-container .producto .price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

#lista-ofertas .producto .price--discount,
#prod-cat-destacados .producto .price--discount,
#destacados .producto .price--discount,
#nuevos .producto .price--discount,
#similares-container .producto .price--discount {
  color: var(--color-desc-badge);
}

/* Stock, si lo usas, estilo discreto */
#lista-ofertas .producto .stock,
#prod-cat-destacados .producto .stock,
#destacados .producto .stock,
#nuevos .producto .stock,
#similares-container .producto .stock {
  font-size: 0.8rem;
  color: var(--color-text-medium);
  margin-top: 2px;
}

#lista-ofertas .producto .catalogo-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  flex: 1;
}

#lista-ofertas .producto .catalogo-card-img {
  position: relative;
  padding: 0;
  margin-bottom: 0;
  border-radius: 10px;
  overflow: hidden;
}

#lista-ofertas .producto .catalogo-card-img img {
  border-radius: 0;
}

#lista-ofertas .producto .catalogo-card-foot {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 4px;
}

#lista-ofertas .producto .catalogo-card-qty input[type="number"] {
  box-sizing: border-box;
}

#lista-ofertas .producto button.catalogo-add-cart-btn {
  flex-shrink: 0;
}

/* Contenedor de cantidad + botón, similar a .catalogo-card-foot */
#lista-ofertas .producto .pedido,
#prod-cat-destacados .producto .pedido,
#destacados .producto .pedido,
#nuevos .producto .pedido,
#similares-container .producto .pedido {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

/* Input cantidad tipo pill */
#lista-ofertas .producto .pedido .qty-input,
#prod-cat-destacados .producto .pedido .qty-input,
#destacados .producto .pedido .qty-input,
#nuevos .producto .pedido .qty-input,
#similares-container .producto .pedido .qty-input {
  width: 70px;
  padding: 6px 7px;
  border-radius: 999px;
  border: 1px solid var(--color-input-border);
  font-size: 0.85rem;
}

/* Botón "Agregar al carrito" (acento --color-header-icono, texto oscuro) */
#lista-ofertas .producto .btn,
#prod-cat-destacados .producto .btn,
#destacados .producto .btn,
#nuevos .producto .btn,
#similares-container .producto .btn {
  align-self: flex-end;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background-color: var(--color-header-icono);
  color: var(--color-header-menu-text-hover);
}

.product-detail-actions .pedido .btn {
  background-color: var(--color-header-icono);
  color: var(--color-header-menu-text-hover);
}

.catalogo-card-foot button.catalogo-add-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.3s ease;
  background-color: var(--color-header-icono);
  color: var(--color-header-menu-text-hover);
}

.catalogo-card-foot button.catalogo-add-cart-btn:hover {
  filter: brightness(90%);
}

/* Alinear precio y stock como en el catálogo (misma “fila”) */
#lista-ofertas .producto .price,
#prod-cat-destacados .producto .price,
#destacados .producto .price,
#nuevos .producto .price,
#similares-container .producto .price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-top: 4px;
  float: left;         /* precio a la izquierda */
}

#lista-ofertas .producto .stock,
#prod-cat-destacados .producto .stock,
#destacados .producto .stock,
#nuevos .producto .stock,
#similares-container .producto .stock {
  font-size: 0.8rem;
  color: var(--color-text-medium);
  margin-top: 6px;
  float: right;        /* stock a la derecha */
}

/* La fila de cantidad + botón debe ir debajo de esa línea */
#lista-ofertas .producto .pedido,
#prod-cat-destacados .producto .pedido,
#destacados .producto .pedido,
#nuevos .producto .pedido,
#similares-container .producto .pedido {
  clear: both;         /* baja debajo de price/stock */
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* === Mejora visual del detalle de producto === */

.product-detail-card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.product-detail-img-wrapper {
  flex: 0 0 360px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-background);
  border: 1px solid var(--color-border-light);
}

.product-detail-img-wrapper img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* Columna de info */
.product-detail-info {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Título + chips */
.product-detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-detail-title-block {
  flex: 1;
  min-width: 0;
}

.product-detail-header h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.btn-product-fav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
  color: var(--color-danger);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-product-fav:hover {
  background: var(--color-background);
}

.btn-product-fav[aria-pressed="true"] {
  color: var(--color-danger);
}

.product-detail-chip {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 4px;
  padding: 2px 8px;
  font-size: 0.78rem;
  border-radius: 999px;
  background-color: var(--color-background);
  color: var(--color-text-medium);
}

/* Fila precio / stock */
.product-detail-price-stock {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.product-detail-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.product-detail-stock {
  font-size: 0.9rem;
  color: var(--color-text-medium);
}

.product-detail-views {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-medium);
  margin-top: 4px;
}

.product-detail-views i {
  margin-right: 4px;
  opacity: 0.75;
}

.product-rating-block {
  margin: 0;
  padding: 12px 0;
  border-top: none;
  border-bottom: none;
}

.product-ficha-section {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.product-ficha-section--caracteristicas {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.product-ficha-panel--detail > .product-ficha-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.product-ficha-section--descripcion {
  margin-top: 0;
  padding-top: 12px;
  border-top: none;
}

.product-detail-header-row + .product-ficha-section--descripcion {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.product-ficha-section--rating {
  margin-top: 0;
  padding-top: 12px;
  border-top: none;
}

.product-detail-header-row + .product-ficha-section--rating,
.product-ficha-section--caracteristicas + .product-ficha-section--rating {
  padding-top: 12px;
}

.product-ficha-section--comment {
  margin-top: 0;
  padding-top: 12px;
  border-top: none;
}

.product-rating-block__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.3;
}

.product-rating-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.product-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.product-rating-stars--display .product-star-icon {
  color: #d1d5db;
  font-size: 1rem;
}

.product-rating-stars--display .product-star-icon.is-active {
  color: #f59e0b;
}

.product-rating-count {
  font-size: 0.88rem;
  color: var(--color-text-medium);
}

.product-rating-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 6px;
}

.product-rating-user-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.product-rating-stars--interactive .product-star-btn {
  border: none;
  background: none;
  padding: 2px;
  cursor: pointer;
  color: #d1d5db;
  font-size: 1.15rem;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.product-rating-stars--interactive .product-star-btn:hover,
.product-rating-stars--interactive .product-star-btn.is-hover,
.product-rating-stars--interactive .product-star-btn.is-active {
  color: #f59e0b;
}

.product-rating-stars--interactive .product-star-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.product-rating-stars--interactive .product-star-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.product-rating-user-msg {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: var(--color-primary);
  min-height: 1.2em;
}

.product-comment-block {
  margin-top: 0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-comment-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.product-comment-textarea {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.product-comment-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(192, 179, 2, 0.15);
}

.product-comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-product-comment-send {
  background: var(--color-text-medium, #6c757d);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-product-comment-send:hover:not(:disabled) {
  opacity: 0.92;
}

.btn-product-comment-send:disabled {
  opacity: 0.7;
  cursor: wait;
}

.product-comment-feedback {
  font-size: 0.82rem;
  color: var(--color-text-medium);
}

.product-comment-feedback--ok {
  color: #15803d;
}

.product-comment-feedback--error {
  color: #b91c1c;
}

/* Características tipo formulario (ficha producto) */
.product-detail-caracteristicas {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pc-group .pc-question {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0 0 8px;
  line-height: 1.35;
}

.pc-group .pc-label-row {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-medium, #6b7280);
  margin-bottom: 8px;
}

.pc-opcion-precio {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-secondary, #059669);
  white-space: nowrap;
}

.pc-chip .pc-opcion-precio {
  margin-left: 2px;
}

.pc-check-label .pc-opcion-precio {
  margin-left: 4px;
}

.pc-group .pc-val-display {
  font-weight: 600;
  color: var(--color-secondary, #059669);
}

.pc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-chip {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border-light, #d1d5db);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pc-chip:hover {
  border-color: var(--color-secondary, #059669);
}

.pc-chip.pc-chip-active {
  border-width: 2px;
  border-color: var(--color-primary, #059669);
  box-shadow: 0 0 0 1px var(--color-primary, #059669);
  color: var(--color-secondary, #059669);
  font-weight: 600;
}

.pc-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.pc-select,
.pc-parrafo {
  width: 100%;
  max-width: 420px;
  margin-top: 4px;
}

/* Pedido (cantidad+botón) */
.product-detail-actions .pedido {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Bloque de descripción en ficha producto */
.product-detail-description-block h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.product-detail-description-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-medium);
  line-height: 1.5;
}

/* Compartir en redes */
/* =================================
   ESTILOS COMPARTIR (ICONOS)
   ================================= */

.product-share {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-share span {
  font-weight: 600;
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

.share-buttons-row {
  display: flex;
  gap: 8px;
}

/* Botón Rectangular de WhatsApp con Color Original */
.whatsapp-consult-container {
    margin-top: 15px;
    margin-bottom: 0px;
    text-align: left;
}

.btn-whatsapp-consult {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25D366; /* Verde oficial de WhatsApp */
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.btn-whatsapp-consult:hover {
    background-color: #128C7E; /* Verde más oscuro al pasar el mouse */
}

/* Iconos de compartir: Círculos con borde gris */
.product-share-modern {
    margin-top: 5px;    /* Reducido de 20px a 5px */
    padding-top: 10px;  /* Reducido de 15px a 10px */
    border-top: 1px dashed var(--color-border-light);
}

.share-buttons-row {
    display: flex;
    gap: 10px;
}

.btn-share-outline {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd; /* Borde gris claro */
    background-color: transparent;
    color: #aaa; /* Icono gris claro */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Efecto Hover: se colorean con sus marcas originales al pasar el mouse */
.btn-share-outline[data-network="facebook"]:hover { border-color: #1877F2; color: #1877F2; }
.btn-share-outline[data-network="x"]:hover { border-color: #000; color: #000; }
.btn-share-outline[data-network="email"]:hover { border-color: #7f8c8d; color: #7f8c8d; }
.btn-share-outline[data-network="pinterest"]:hover { border-color: #bd081c; color: #bd081c; }
.btn-share-outline[data-network="linkedin"]:hover { border-color: #0077b5; color: #0077b5; }
/* Responsive para detalle */
@media (max-width: 900px) {
  .product-detail-card {
    flex-direction: column;
  }

  .product-detail-img-wrapper {
    width: 100%;
  }
}

/* Responsive para esos grids */
@media (max-width: 600px) {
  #lista-ofertas,
  #prod-cat-destacados,
  #destacados,
  #nuevos,
  #similares-container {
    grid-template-columns: 1fr;
  }
}

/* ==== Página de autenticación (login / registro) ==== */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 140px); /* restando header/footer aproximado */
  padding: 40px 15px;
  background-color: var(--color-background);
}

/* Layout split (login / registro / recuperar / completar): sin hueco al footer ni fondo del sitio */
main.auth-page.auth-page--split {
  display: block;
  justify-content: unset;
  align-items: unset;
  min-height: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  background: transparent;
  background-color: transparent;
}

main.auth-page.auth-page--split .incorporacion-wrapper,
main.auth-page.auth-page--split .wrapper-datos {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Anula footer { margin-top: 10px } que deja ver el fondo decorativo */
main.auth-page.auth-page--split + footer,
body.page-auth footer,
body.page-auth main ~ footer {
  margin-top: 0 !important;
}

.auth-container {
  background: var(--color-surface);
  border-radius: 10px;
  padding: 25px 20px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 2px 8px var(--color-shadow-base);
  margin: 0 auto;
  text-align: left;
}

.auth-container h2 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  color: var(--color-text-dark);
}

/* ==== Página de autenticación (login / registro / recuperar) ==== */

.auth-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--color-text-dark);
}

/* ✅ CORREGIDO: Agregamos input[type="text"] para el DNI */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none; /* Opcional: para quitar el borde azul por defecto del navegador */
  transition: border-color 0.2s ease;
}

/* Efecto al hacer clic (Focus) */
.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  border-color: var(--color-primary);
}

.auth-form .btn-full {
  width: 100%;
  margin-top: 5px;
}

.auth-alert {
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.auth-alert-error {
  background-color: rgba(183, 28, 28, 0.1); /* var(--color-danger) transparente */
  border: 1px solid var(--color-danger);
  color: #7c1f1f;
}

.auth-alert-success {
  background-color: rgba(73, 98, 0, 0.1); /* var(--color-secondary) transparente */
  border: 1px solid var(--color-secondary);
  color: #3b5000;
}

.auth-links {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-medium);
}

.auth-links a {
  color: var(--color-primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* ==========================
   DRAWER RESPONSIVE (NO afecta escritorio)
   ========================== */

.hamburger {
  display: none;
  width: 40px;
  height: 36px;
  border: 0;
  background: var(--color-surface);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-right: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--color-text-dark);
  border-radius: 999px;
}

/* Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1999;
}
.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer lateral */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 82vw;
  height: 100vh;
  height: 100dvh;
  background: var(--color-surface);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 2000;
  box-shadow: 6px 0 18px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}

/* Header drawer */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-primary);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.drawer-title {
  font-weight: 700;
  color: #fff;
}
.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--color-surface);
  cursor: pointer;
  font-size: 20px;
  line-height: 32px;
  color: var(--color-text-dark);
}

/* Links drawer */
.drawer-menu {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.drawer-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--color-text-dark);
  font-size: calc(1rem - 2pt);
  font-weight: 500;
  border-bottom: 1px solid var(--color-background);
  transition: background .15s ease, color .15s ease;
}
.drawer-menu li a:hover {
  background: rgba(141, 143, 58, 0.1);
  color: var(--color-primary);
}

body.drawer-open { overflow: hidden; }

/* =========================
   Página Pedido Confirmado
   ========================= */

.success-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background-color: var(--color-background);
  min-height: 60vh; /* Para que ocupe buen espacio vertical */
}

.success-card {
  background-color: var(--color-surface);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--color-shadow-base);
  text-align: center;
  max-width: 500px;
  width: 100%;
  border: 1px solid var(--color-border-light);
}

.success-icon {
  font-size: 4rem;
  color: var(--color-success); /* O usa var(--color-primary) */
  margin-bottom: 20px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-card h2 {
  margin: 0 0 15px;
  color: var(--color-text-dark);
  font-size: 1.8rem;
}

.order-number {
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin-bottom: 10px;
}

.order-tracking-code {
  font-size: 1rem;
  color: var(--color-text-dark);
  margin: 0 0 8px;
}

.tracking-code-value {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.success-message--code {
  font-size: 0.92rem;
  line-height: 1.5;
}

.order-number strong {
  color: var(--color-secondary);
  font-size: 1.2rem;
}

.success-message {
  color: var(--color-text-medium);
  margin-bottom: 30px;
  line-height: 1.5;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Botón secundario (borde) */
.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 6px 14px; /* Ajuste para coincidir con tu clase .btn */
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

/* Animación simple para el icono */
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive para el card */
@media (max-width: 600px) {
  .success-card {
    padding: 30px 20px;
  }
  
  .success-icon {
    font-size: 3.5rem;
  }

  .success-actions {
    flex-direction: column;
  }
  
  .success-actions .btn, 
  .success-actions .btn-secondary {
    width: 100%;
    box-sizing: border-box;
  }
}

/* === ESTILOS PARA LISTA DE PEDIDOS === */

.orders-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.order-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.2s;
}

.order-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.order-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-background);
  padding-bottom: 8px;
  margin-bottom: 10px;
  font-weight: bold;
  color: var(--color-text-dark);
}

.order-date {
  color: var(--color-text-medium);
  font-size: 0.85rem;
  font-weight: normal;
}

.order-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.order-info p {
  margin: 2px 0;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.cancel-reason {
  margin-top: 5px !important;
  color: var(--color-danger) !important;
}

/* Badges de estado */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 5px;
  text-transform: uppercase;
}
.badge-default { background: #eee; color: #555; }
.badge-warning { background: #fff3cd; color: #856404; } /* Pendiente */
.badge-info    { background: #d1ecf1; color: #0c5460; } /* Confirmado */
.badge-success { background: #d4edda; color: #155724; } /* Entregado */
.badge-danger  { background: #f8d7da; color: #721c24; } /* Cancelado */

/* Botones pequeños */
.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 120px;
}

.btn-mini {
  padding: 5px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
}
.btn-whatsapp:hover { background-color: #128C7E; }

.btn-outline-danger {
  background: transparent;
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.btn-outline-danger:hover {
  background: var(--color-danger);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  color: white;
}

.rated-info {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: bold;
  text-align: center;
}

@media (max-width: 600px) {
  .order-body {
    flex-direction: column;
    align-items: flex-start;
  }
  .order-actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  .btn-mini {
    flex: 1;
  }
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.dash-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Iconos del dashboard */
.dash-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-orders {
  background-color: #e0f2fe; /* Azul muy claro */
  color: #0284c7;            /* Azul fuerte */
}

.icon-pending {
  background-color: #fef9c3; /* Amarillo claro */
  color: #ca8a04;            /* Amarillo fuerte */
}

.icon-success {
  background-color: #dcfce7; /* Verde claro */
  color: #16a34a;            /* Verde fuerte */
}

.icon-money {
  background-color: #f3e8ff; /* Morado claro */
  color: #9333ea;            /* Morado fuerte */
}

/* Texto de la tarjeta */
.dash-info {
  display: flex;
  flex-direction: column;
}

.dash-label {
  font-size: 0.85rem;
  color: var(--color-text-medium);
}

.dash-value {
  font-size: 1.4rem;
  color: var(--color-text-dark);
  font-weight: 700;
}

/* =================================
   ESTILOS COMPARTIR (ICONOS)
   ================================= */

.product-share {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 12px; /* Espacio entre el texto "Compartir:" y los iconos */
}

.product-share span {
  font-weight: 600;
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

.share-buttons-row {
  display: flex;
  gap: 8px;
}

/* Estilo base del botón redondo */
.btn-share {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: #fff;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-share:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
}

/* Colores de marca */
.btn-share-wa {
  background-color: #25D366; /* WhatsApp Green */
}

.btn-share-fb {
  background-color: #1877F2; /* Facebook Blue */
}

.btn-share-x {
  background-color: #000000; /* X Black */
}

/* =========================================
   ESTILOS CHECKOUT / PEDIDO PREVIO (NUEVO)
   ========================================= */

.checkout-page {
  padding: 20px;
  background-color: var(--color-background);
  min-height: 80vh;
}

.checkout-page h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 1.8rem;
  color: var(--color-text-dark);
}

/* Layout Flex: Izquierda (Resumen) | Derecha (Sidebar) */
.checkout-layout {
  display: flex;
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start; /* Para que el sidebar no se estire */
}

/* === COLUMNA IZQUIERDA === */
.checkout-summary {
  flex: 1; /* Ocupa el espacio restante */
  min-width: 0; /* Evita desbordamientos en flex */
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--color-text-dark);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 8px;
  display: inline-block;
}

.cart-summary-box {
  background: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--color-shadow-base);
  overflow: hidden; /* Para bordes redondeados en tabla */
  border: 1px solid var(--color-border-light);
}

/* Ajustes para la tabla dentro del resumen (hereda de .cart-table) */
.cart-summary-box table {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.checkout-page .checkout-summary.cart-page .catalogo-header {
  margin-bottom: 18px;
}

.checkout-back-btn-container {
  margin-top: 20px;
}

/* === COLUMNA DERECHA (SIDEBAR) === */
.checkout-sidebar {
  width: 380px; /* Ancho fijo para el sidebar */
  flex-shrink: 0; /* No encogerse */
  position: sticky;
  top: 90px; /* Sticky al hacer scroll (ajustar según altura header) */
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-card {
  background: var(--color-surface);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid var(--color-border-light);
}

.checkout-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--color-text-dark);
  font-weight: 700;
}

/* Filas de información clave:valor */
.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
  text-align: left;
}

.info-label {
  color: var(--color-text-medium);
  font-weight: 500;
  text-align: left;
}

.info-value {
  color: var(--color-text-dark);
  text-align: left;
}

/* Bloque de dirección */
.info-block {
  margin-top: 12px;
}

.address-text {
  background: var(--color-background);
  padding: 10px;
  border-radius: 6px;
  margin-top: 5px;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  border: 1px dashed var(--color-input-border);
}

/* Badge de tipo de entrega */
.badge-delivery {
  background-color: var(--color-accent);
  color: var(--color-success); /* O un verde oscuro */
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.85rem;
}

/* Divisor */
.divider {
  border: 0;
  border-top: 1px solid var(--color-border-light);
  margin: 20px 0;
}

/* Info del establecimiento (inyectada por JS) */
.est-info-box {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--color-text-medium);
}

.est-info-box strong {
  color: var(--color-primary);
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}

/* Botón confirmar grande (Estilo base para ambos estados) */
.btn-confirm {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  margin-top: 50px; 
  box-shadow: 0 4px 12px rgba(100, 216, 32, 0.3);
}

.btn-confirm:hover {
  transform: translateY(-2px);
}

/* =================================
   SECCIÓN CATEGORÍAS (HOME)
   ================================= */

/* Contenedor principal */
.categorias-section {
  padding: 20px 15px;
  text-align: center;
  background-color: var(--color-surface); /* Fondo limpio */
  margin-bottom: 10px;
}

.categorias-header h2 {
  font-size: 1.5rem; /* Un poco más pequeño que Destacados */
  color: var(--color-text-dark);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

/* Línea decorativa debajo del título */
.categorias-header h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 8px auto 0;
  border-radius: 2px;
}

/* =========================================
   CARRUSEL DE CATEGORÍAS (Sobreescribe Grid)
   ========================================= */

#categorias-home-container {
  display: flex !important;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 15px 5px 25px 5px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: flex-start;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Tarjeta de Categoría */
.categoria-card {
  background: var(--color-background);
  border-radius: 50% 50% 12px 12px; /* Forma redondeada arriba, cuadrada abajo */
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Wrapper de imagen circular */
.cat-img-wrapper {
  width: 100px; /* Tamaño fijo pequeño (aprox mitad de un producto normal) */
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-surface);
  box-shadow: 0 4px 10px var(--color-shadow-base);
  transition: transform 0.4s ease;
  background-color: #fff;
}

.cat-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0;
  transition: color 0.3s ease;
}

/* --- EFECTO HOVER (Diferente a productos) --- */
.categoria-card:hover {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 8px 20px var(--color-primary-alpha-15, rgba(96, 175, 49, 0.15));
  transform: translateY(-5px);
}

.categoria-card:hover .cat-img-wrapper {
  transform: rotate(5deg) scale(1.1); /* Rota y agranda la imagen */
  border-color: var(--color-primary);
}

.categoria-card:hover .cat-name {
  color: var(--color-secondary);
}

/* Responsive: Móvil */
@media (max-width: 600px) {
  #categorias-home-container {
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en celular */
    gap: 10px;
  }
  
  .cat-img-wrapper {
    width: 70px;
    height: 70px;
  }
  
  .cat-name {
    font-size: 0.75rem;
  }
  
  .categoria-card {
    padding: 10px 5px;
  }
}

/* =========================================
   CORRECCIÓN CENTRADO MENSAJES VACÍOS/ERROR
   ========================================= */
#lista-ofertas .empty,
#prod-cat-destacados .empty,
#destacados .empty,
#nuevos .empty,
#similares-container .empty {
  grid-column: 1 / -1; /* Obliga al elemento a ocupar desde la 1ª hasta la última columna */
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

/* =========================================
   CORRECCIÓN CENTRADO MENSAJE CATEGORÍAS VACÍAS
   ========================================= */
#categorias-home-container .empty {
  grid-column: 1 / -1;  /* Ocupar todo el ancho del grid */
  width: 100%;
  text-align: center;
  padding: 20px 0;
  font-size: 0.95rem;   /* Opcional: unificar tamaño */
  color: var(--color-text-medium); /* Opcional: usar el color de tu tema */
}

/* ... (MANTÉN TODO TU CSS ANTERIOR ARRIBA DE ESTO) ... */

/* =========================================
   CARRUSEL DE CATEGORÍAS (Sobreescribe Grid)
   ========================================= */

/* Convertimos el contenedor en una fila con scroll */
#categorias-home-container {
  display: flex !important;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 15px 5px 25px 5px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: flex-start;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Ocultar barra de scroll en Chrome/Safari */
#categorias-home-container::-webkit-scrollbar {
  display: none;
}

/* Ajustar las tarjetas para que no se encojan */
.categoria-card {
  flex: 0 0 150px; /* Ancho fijo de 150px: no encoger, no crecer */
  min-width: 150px;
  /* Hereda estilos de borde y fondo del CSS anterior */
}

/* Ajustes Responsive */
@media (max-width: 600px) {
  .categoria-card {
    flex: 0 0 130px; /* Más pequeñas en móvil */
    min-width: 130px; 
  }
  
  .cat-img-wrapper {
    width: 80px;
    height: 80px;
  }
}
/* =========================================
   NUEVO ESTILO MODAL CHECKOUT
   ========================================= */

/* Ajuste del contenedor principal del modal */
.checkout-modal-content {
  max-width: 500px;
  width: 95%;
  padding: 0; /* Quitamos padding global para manejarlo por secciones */
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background-color: #f9f9f9;
  font-family: var(--font-body);
}

/* Header */
.checkout-header {
  background-color: var(--color-primary); /* Tu color oliva */
  color: #fff;
  padding: 20px;
  text-align: center;
}

.checkout-header h3 {
  margin: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-header p {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Secciones */
.checkout-section {
  padding: 15px 25px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.checkout-dynamic-area {
  padding: 15px 25px;
  background: #fcfcfc;
}

.section-label {
  display: block;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animación simple */
.animate-fade {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Responsivo */
@media (max-width: 480px) {
  .selection-grid {
    grid-template-columns: 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .checkout-footer {
    flex-direction: column-reverse;
  }
  .checkout-footer button {
    width: 100%;
  }
}

/* =========================================
   ESTILOS CORREGIDOS CHECKOUT (ESPACIADO)
   ========================================= */

/* Espaciado de la tarjeta principal */
.checkout-card {
  background: var(--color-surface);
  padding: 30px 25px; /* Un poco más de aire arriba/abajo */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--color-border-light);
}

/* Títulos */
.checkout-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ✅ AUMENTO DE ESPACIO ENTRE PASOS */
.checkout-step-block {
  margin-bottom: 30px; /* Antes era 10px, ahora da más aire */
}

/* Grid de tarjetas */
.selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 40px; 
}

/* Tarjeta individual */
.selection-card {
  position: relative;
  cursor: pointer;
}

.selection-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  transition: all 0.2s ease;
  height: 100%;
  text-align: center;
  color: #666;
}

/* Estilo Seleccionado */
.selection-card input[type="radio"]:checked + .card-content {
  border-color: var(--color-primary);
  background-color: rgba(192, 179, 2, 0.05);
  color: var(--color-text-dark);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.selection-card input[type="radio"]:checked + .card-content i {
  color: var(--color-primary);
}

.card-content i {
  font-size: 1.6rem;
  margin-bottom: 8px;
  color: #ccc;
}

.card-content span {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.card-content small {
  font-size: 0.75rem;
  margin-top: 4px;
  color: #888;
}

.dynamic-data-container {
  background-color: #f9fafb;
  padding: 10px 10px;
  border-radius: 8px;
  border: 1px dashed var(--color-border-light);
  margin-top: 50px !important;
  position: relative;
  z-index: 1;
}

/* Inputs layout */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-medium);
}

.full-width-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.full-width-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(192, 179, 2, 0.2);
}

/* Input con Icono */
.input-icon-wrapper {
  position: relative;
}
.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}
.input-icon-wrapper input {
  padding-left: 35px;
}

.divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 20px 0;
}

/* Info badge */
.info-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Botón Final */
.btn-full {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Responsive */
@media (max-width: 500px) {
  .form-row-2 {
    grid-template-columns: 1fr; /* Una columna en móvil */
  }
}

/* Botón Final con más espacio */
.btn-primary-pulse {
  background: var(--color-primary); 
  color: #fff; 
  border: none; 
  font-weight: 600; 
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
  transition: transform 0.2s;
  margin-top: 50px; 
}

.btn-primary-pulse:hover { 
  transform: translateY(-2px); 
  filter: brightness(1.1); 
}

/* =========================================
   ESTILOS PERFIL EN DRAWER (MENÚ MÓVIL)
   ========================================= */

.drawer-profile {
  padding: 20px 15px;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Estilo para usuario logueado */
.drawer-profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.drawer-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
}

.drawer-avatar-circle {
  width: 50px;
  height: 50px;
  overflow: hidden;
  border-radius: 50%;
  position: relative;
  background: #fff;
}

.drawer-avatar-wrap--photo .drawer-avatar--initial,
.drawer-avatar-wrap--photo .drawer-avatar--initial[hidden] {
  display: none !important;
}

.drawer-avatar-wrap--initial img.drawer-avatar {
  display: none !important;
}

.drawer-avatar-wrap--photo img.drawer-avatar {
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  border: none;
  border-radius: 0;
  background: #fff;
}

.drawer-avatar-wrap--initial .drawer-avatar--initial:not([hidden]) {
  position: absolute;
  inset: 0;
  display: inline-flex;
}

.drawer-avatar-photo-btn {
  display: none;
  position: absolute;
  right: -3px;
  bottom: -3px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-surface, #fff);
  background: var(--color-primary);
  color: var(--color-surface, #fff);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 0.62rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.drawer-avatar-photo-btn:hover {
  filter: brightness(1.08);
}

.drawer-avatar-photo-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.drawer-avatar-photo-btn:disabled,
.drawer-avatar-photo-btn.is-uploading {
  opacity: 0.65;
  cursor: wait;
}

/* Input de foto del drawer: oculto visualmente (sigue usable vía JS .click()) */
#panel-foto-file,
.mobile-drawer .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.drawer-photo-msg {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.drawer-photo-msg--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.drawer-photo-msg--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@media (max-width: 1024px) {
  .drawer-avatar-wrap {
    width: 68px;
    height: 68px;
  }

  .drawer-avatar-circle {
    width: 70px;
    height: 70px;
  }

  .drawer-avatar-wrap--photo img.drawer-avatar {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    transform: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff;
  }

  .drawer-avatar {
    width: 70px;
    height: 70px;
  }

  .drawer-avatar.drawer-avatar--initial {
    font-size: 1.35rem;
  }

  .drawer-avatar-photo-btn {
    display: inline-flex;
    right: 0;
    bottom: 0;
  }
}

.drawer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: contain;
  object-position: center center;
  border: 2px solid var(--color-primary);
  background-color: #fff;
}

.drawer-avatar.drawer-avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent);
  background-color: var(--color-surface);
  box-sizing: border-box;
}

img.drawer-avatar.drawer-avatar--hidden {
  display: none !important;
}

.drawer-user-details {
  display: flex;
  flex-direction: column;
}

.drawer-username {
  font-weight: 700;
  color: var(--color-text-dark);
  font-size: 1rem;
}

.drawer-role {
  font-size: 0.82rem;
  color: var(--color-primary);
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
}

/* Estilo para invitado */
.drawer-profile-guest {
  text-align: center;
}

.drawer-profile-guest p {
  margin: 0 0 10px;
  color: var(--color-text-medium);
  font-size: 0.9rem;
}

/* Botón del drawer */
.drawer-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: filter 0.2s;
  box-sizing: border-box; /* Importante para que no se salga */
}

.drawer-btn.primary {
  background-color: var(--color-primary);
  color: #fff;
  border: none;
}

.drawer-btn:hover {
  filter: brightness(1.1);
}

/* Ajustes a la lista del menú */
.drawer-menu i {
  width: 24px; /* Ancho fijo para iconos */
  text-align: center;
  margin-right: 10px;
  color: var(--color-text-light);
}

.drawer-menu li a:hover i {
  color: var(--color-primary);
}

.drawer-menu li a.active {
  background-color: var(--color-primary);
  color: var(--color-surface);
  font-weight: 600;
}

.drawer-menu li a.active i {
  color: var(--color-surface);
}

.drawer-menu li a.active:hover {
  background-color: var(--color-primary);
  color: var(--color-surface);
}

.drawer-menu li a.drawer-link-danger.active {
  background-color: var(--color-danger, #b91c1c);
  color: #fff;
}

.drawer-menu li a.drawer-link-danger.active i {
  color: #fff;
}

.drawer-separator {
  height: 1px;
  background-color: var(--color-border-light);
  margin: 10px 16px;
}

.drawer-nav-label {
  padding: 8px 16px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-medium, #6b7280);
  list-style: none;
}

.drawer-link-danger {
  color: var(--color-danger, #b91c1c) !important;
}

.drawer-link-danger i {
  color: var(--color-danger, #b91c1c) !important;
}

.drawer-link-danger:hover {
  background-color: rgba(183, 28, 28, 0.05);
}

/* Cerrar sesión en rojo suave */
#drawer-logout-btn {
  color: var(--color-danger);
}
#drawer-logout-btn i {
  color: var(--color-danger);
}
#drawer-logout-btn:hover {
  background-color: rgba(183, 28, 28, 0.05);
}

/* CONTACTO LAYOUT */
body.site-public .catalogo-section > .catalogo-header {
  margin-bottom: 17px;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

/* Formulario */
.col-form {
  background: var(--color-surface);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--color-border-light);
}
.contact-form-modern .form-group {
  margin-bottom: 15px;
  text-align: left;
}
.contact-form-modern label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-dark);
}
.contact-form-modern input,
.contact-form-modern textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-input-border);
  border-radius: 6px;
  font-family: inherit;
  box-sizing: border-box; 
}
.contact-form-modern input:focus, .contact-form-modern textarea:focus{
    border-color: var(--color-primary);
    outline:none;
}

/* Captcha */
.captcha-group .captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.captcha-box img {
  border-radius: 4px;
  border: 1px solid var(--color-input-border);
}
.btn-refresh {
  background: var(--color-secondary);
  color: #fff;
  border: none;
  width: 36px; 
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-box input {
  text-align: center;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 10px;
}

/* Mapa */
.col-map {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border-light);
}
.info-card {
  margin: 0;
}
.info-card h3 {
  margin: 0 0 8px;
  color: var(--color-text-dark);
  font-size: 1.15rem;
}
.info-card p {
  margin: 0;
  color: var(--color-text-muted, #64748b);
  font-size: 0.95rem;
  line-height: 1.5;
}
#mapa-tiendas {
  width: 100%;
  flex: 1;
  min-height: 400px;
  border-radius: 10px;
  box-shadow: none;
  border: 1px solid var(--color-border-light);
  z-index: 1;
  overflow: hidden;
}

/* Alertas */
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* =========================================
   NUEVO DISEÑO GESTIÓN DE EVENTOS (MEJORADO)
   ========================================= */

/* 1. BARRA DE HERRAMIENTAS (GENERAL) */
.gestion-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

.gestion-actions {
  display: flex;
  gap: 12px;
}

/* Botón Volver */
.btn-back {
  background-color: transparent;
  color: var(--color-text-medium);
  border: 1px solid var(--color-border-light);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background-color: #f3f4f6;
  color: var(--color-text-dark);
  border-color: #d1d5db;
}

/* Botones de Acción (Editar/Ver) */
.btn-action {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
}

.btn-edit {
  background-color: #f0fdf4; /* Verde muy claro */
  color: var(--color-primary);
  border: 1px solid rgba(20, 166, 202, 0.2);
}

.btn-edit:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.btn-view {
  background-color: var(--color-secondary);
  color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-view:hover {
  background-color: var(--color-primary);
  transform: translateY(-1px);
}

/* 2. TARJETA PRINCIPAL DEL EVENTO */
.gestion-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  align-items: flex-start;
}

/* Imagen del evento */
.gestion-img-container {
  flex: 0 0 180px; /* Ancho fijo en escritorio */
  width: 180px;
  height: 210px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  background-color: var(--color-background);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.gestion-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Información del evento */
.gestion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.gestion-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--color-text-dark);
  font-weight: 800;
  line-height: 1.2;
}

/* Grid de Metadatos (Fechas, Sexo) */
.gestion-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
  gap: 15px;
  padding: 15px 0;
  border-top: 1px dashed var(--color-border-light);
  border-bottom: 1px dashed var(--color-border-light);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #e0f2fe; /* Azul muy suave */
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.meta-content {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-text-medium);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--color-text-dark);
  font-weight: 600;
}

/* Sección de Compartir */
.gestion-share-section label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-medium);
  margin-bottom: 8px;
}

.share-input-group {
  display: flex;
  background: var(--color-background);
  border: 1px solid var(--color-input-border);
  border-radius: 8px;
  padding: 4px;
  max-width: 500px;
}

.share-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  outline: none;
  min-width: 0; /* Evita que el input crezca más de lo debido */
}

.btn-copy {
  background-color: var(--color-text-dark);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-copy:hover {
  background-color: #000;
}

/* 3. TABS (Ajuste de margen) */
.event-tabs {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-border-light);
  display: flex;
  gap: 20px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 5px;
  font-size: 1rem;
  color: var(--color-text-medium);
  cursor: pointer;
  position: relative;
  font-weight: 600;
}

.tab-btn.active {
  color: var(--color-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* Toast global: debajo del menú sticky, por encima del breadcrumb (nav z-index 999) */
.app-toast {
  position: fixed;
  z-index: 1100;
  left: 50%;
  top: 12px;
  transform: translate(-50%, -8px);
  background: var(--color-header-menu-background);
  color: var(--color-header-menu-text);
  padding: 12px 20px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, top .15s ease;
  max-width: min(92vw, 440px);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 24px var(--color-shadow-hover);
}
.app-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.app-toast--ok {
  background: var(--color-primary);
  color: var(--color-header-btn-uno-text);
}