

/* ============================================================
   ÍNDICE DESPLEGABLE
   ============================================================ */
/* ============================================================
   FIX RESPONSIVE: SUBMENÚ NIVEL 2 (Farmacia → Gato/Perro)
   ============================================================ */

/* En escritorio y tablet: el submenú nivel 2 scrollea si es muy alto */
.has-submenu-nivel2.abierto .indice-submenu-nivel2 {
    max-height: 400px;          /* ya lo tenías */
    overflow-y: auto;           /* ⬅️ NUEVO: scroll interno */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* scroll suave en iOS */
    overscroll-behavior: contain;      /* evita que el scroll se propague al panel */
}

/* En móvil: altura más generosa y scroll garantizado */
@media (max-width: 768px) {
    .has-submenu-nivel2.abierto .indice-submenu-nivel2 {
        max-height: 45vh;       /* ⬅️ Ajusta según tu gusto */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

@media (max-width: 480px) {
    .has-submenu-nivel2.abierto .indice-submenu-nivel2 {
        max-height: 40vh;       /* ⬅️ Suficiente para ver todas las opciones */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}
@media (max-width: 768px) {
    .indice-panel.abierto {
        max-height: 75vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
@media (max-width: 480px) {
    .indice-panel.abierto {
        max-height: 75vh;       /* ⬅️ Un poco más alto para que quepa todo */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
/* Opcional: barra de scroll delgada y estilizada */
.indice-submenu-nivel2::-webkit-scrollbar {
    width: 6px;
}
.indice-submenu-nivel2::-webkit-scrollbar-thumb {
    background: var(--amarillo-turqueza);
    border-radius: 3px;
}
.indice-submenu-nivel2::-webkit-scrollbar-track {
    background: #f0f0f0;
}
   .indice-categorias {
    max-width: 1400px;
    margin: 10px auto 0;
    padding: 0 15px;
    position: relative;
    z-index: 90;
}

.indice-container {
    position: relative;
}

/* Botón principal */
.indice-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--verde-oscuro);
    color: var(--blanco);
    border: none;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--sombra-media);
}

.indice-toggle:hover {
    background: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
}

.indice-arrow {
    transition: transform 0.3s ease;
}

.indice-toggle.activo .indice-arrow {
    transform: rotate(180deg);
}

/* Panel desplegable */
.indice-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 320px;
    background: var(--blanco);
    border-radius: 12px;
    box-shadow: var(--sombra-fuerte);
    border: 1px solid #eee;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 95;
}

.indice-panel.abierto {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
}

/* Lista principal */
.indice-lista {
    list-style: none;
    padding: 8px 0;
}

.indice-item {
    border-bottom: 1px solid #f0f0f0;
}

.indice-item:last-child {
    border-bottom: none;
}

/* Enlaces principales */
.indice-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--verde-oscuro);
    cursor: pointer;
    transition: background 0.2s;
}

.indice-link:hover {
    background: #f0f7f3;
}

.indice-link i:first-child {
    width: 20px;
    text-align: center;
    color: var(--amarillo-turqueza);
}

.indice-sub-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    color: #aaa;
    transition: transform 0.3s ease;
}

.has-submenu.abierto .indice-sub-arrow {
    transform: rotate(90deg);
}
/* ============================================================
   NIVEL 2 DEL ÍNDICE (submenú anidado dentro de "Farmacia")
   ============================================================ */

.has-submenu-nivel2 {
    list-style: none;
    position: relative;
    border-bottom: 1px solid #eaeaea;
}

.has-submenu-nivel2:last-child {
    border-bottom: none;
}

/* Botón del nivel 2 (Farmacia e higiene para gatos/perros) */
.has-submenu-toggle {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px 11px 36px !important;
    background: #f0f7f3 !important;
    border: none;
    text-align: left;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: var(--verde-oscuro) !important;
    cursor: pointer;
    transition: background 0.2s;
}

.has-submenu-toggle:hover {
    background: #e4f0e9 !important;
}

.has-submenu-toggle i:first-child {
    color: var(--amarillo-turqueza);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.indice-nivel2-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    color: #999;
    transition: transform 0.3s ease;
}

.has-submenu-nivel2.abierto .indice-nivel2-arrow {
    transform: rotate(90deg);
}

/* Submenú nivel 2 (oculto por defecto) */
.indice-submenu-nivel2 {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #fafafa;
}

.has-submenu-nivel2.abierto .indice-submenu-nivel2 {
    max-height: 400px;
}

/* Enlaces del nivel 2 (Antiparasitarios, etc.) */
.indice-sublink-nivel2 {
    width: 100%;
    display: block;
    padding: 10px 20px 10px 68px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    font-size: 0.82rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.indice-sublink-nivel2:last-child {
    border-bottom: none;
}

.indice-sublink-nivel2::before {
    content: '›';
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--amarillo-turqueza);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.indice-sublink-nivel2:hover {
    background: #eef6f1;
    color: var(--verde-oscuro);
    padding-left: 72px;
}

/* ---------- Responsive del nivel 2 ---------- */
@media (max-width: 480px) {
    .has-submenu-toggle {
        padding: 10px 14px 10px 28px !important;
        font-size: 0.82rem !important;
    }

    .indice-sublink-nivel2 {
        padding: 9px 14px 9px 56px;
        font-size: 0.78rem;
    }

    .indice-sublink-nivel2::before {
        left: 40px;
    }

    .indice-sublink-nivel2:hover {
        padding-left: 60px;
    }

    .has-submenu-nivel2.abierto .indice-submenu-nivel2 {
        max-height: 350px;
    }
}
/* Submenú */
.indice-submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fafafa;
}

.has-submenu.abierto .indice-submenu {
    max-height: 400px;
}

.indice-sublink {
    width: 100%;
    display: block;
    padding: 10px 20px 10px 52px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.indice-sublink::before {
    content: '›';
    position: absolute;
    left: 32px;
    color: var(--amarillo-turqueza);
    font-weight: 700;
}

.indice-sublink:hover {
    background: #eef6f1;
    color: var(--verde-oscuro);
    padding-left: 56px;
}

/* ============================================================
   RESPONSIVE DEL ÍNDICE
   ============================================================ */

/* ---------- TABLET (hasta 768px) ---------- */
@media (max-width: 768px) {
    .indice-categorias {
        padding: 0 10px;
        margin-top: 8px;
    }

    .indice-toggle {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    .indice-panel {
        width: 300px;
        max-height: 70vh; /* ⬅️ Se adapta a la altura real de la pantalla */
    }

    .indice-panel.abierto {
        max-height: 70vh;
    }

    .indice-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .indice-sublink {
        padding: 9px 16px 9px 46px;
        font-size: 0.85rem;
    }

    .indice-sublink::before {
        left: 28px;
    }
}

/* ---------- MÓVIL (hasta 480px) ---------- */
@media (max-width: 480px) {
    .indice-categorias {
        padding: 0 10px;
        margin-top: 5px;
    }

    .indice-toggle {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 25px;
    }

    .indice-toggle span {
        flex: 1;
        text-align: center;
    }

    /* Panel ocupa todo el ancho disponible */
    .indice-panel {
        width: 100%;
        left: 0;
        right: 0;
        max-height: 65vh;
        border-radius: 10px;
    }

    .indice-panel.abierto {
        max-height: 65vh;
    }

    .indice-link {
        padding: 12px 14px;
        font-size: 0.88rem;
        gap: 8px;
    }

    .indice-link i:first-child {
        width: 18px;
        font-size: 0.9rem;
    }

    .indice-sublink {
        padding: 9px 14px 9px 42px;
        font-size: 0.82rem;
    }

    .indice-sublink::before {
        left: 24px;
    }

    .indice-sublink:hover {
        padding-left: 46px; /* ⬅️ Evita que se salga en móvil */
    }

    /* Submenús más compactos */
    .has-submenu.abierto .indice-submenu {
        max-height: 300px;
    }
}

/* ---------- MÓVIL PEQUEÑO (hasta 360px) ---------- */
@media (max-width: 360px) {
    .indice-toggle {
        font-size: 0.82rem;
        padding: 10px 12px;
    }

    .indice-link {
        font-size: 0.82rem;
        padding: 10px 12px;
    }

    .indice-sublink {
        font-size: 0.78rem;
        padding: 8px 12px 8px 36px;
    }

    .indice-sublink::before {
        left: 20px;
    }
}
/* ============================================================
   style.css - Pets Yanasu
   ============================================================ */
   /* Contenedor del logo: pone imagen y texto en una sola línea (lado a lado) */
.logo-container {
    display: flex;
    align-items: center; /* Alinea la imagen y el texto al centro verticalmente */
    gap: 8px; /* Espacio pequeño entre la imagen y el texto */
    text-decoration: none;
}

/* Tamaño reducido de la imagen */
.logo-img {
    height: 100px; /* ⬅️ AQUÍ CONTROLAS EL TAMAÑO. Cambia 35px si quieres más grande o más chica */
    width: auto;  /* Mantiene la proporción sin deformar */
    object-fit: contain;
    display: block;
}

/* Texto de la marca (PETSYANASU) */
.logo-text {
    font-size: 1.4rem; /* Tamaño del texto */
    color: var(--verde-oscuro); /* Usa tu color verde */
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0; /* Elimina los márgenes por defecto del H1 */
    white-space: nowrap; /* Evita que el texto se parta en dos líneas */
}
/* ========== ACORDEÓN DESCRIPCIÓN ========== */
.accordion-item {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: #f9f9f9;
    border: none;
    padding: 12px 15px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--verde-oscuro);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f0f7f3;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    color: var(--amarillo-turqueza);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-content p {
    padding: 15px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}
   /* ========== BOTONES DE PRESENTACIÓN ========== */
.btn-presentacion {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    border: 2px solid var(--verde-oscuro);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--verde-oscuro);
    transition: all 0.3s ease;
}

.btn-presentacion:hover {
    background: #f0f7f3;
}

.btn-presentacion.active {
    background: var(--verde-oscuro);
    color: white;
}

#presentacionesContainer h4 {
    margin-bottom: 10px;
    color: var(--verde-oscuro);
    font-size: 1rem;
}
   /* ========== BOTÓN COMPRAR ========== */
.btn-comprar {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: var(--verde-oscuro);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-comprar:hover {
    background: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
}

/* ========== MODAL QR ========== */
.qr-container {
    text-align: center;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    border: 2px dashed var(--amarillo-turqueza);
    margin: 10px 0;
}

.qr-code {
    max-width: 180px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    padding: 10px;
}

.qr-label {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    width: 100%;
}

.btn-whatsapp:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    color: white;
}
/* ---------- VARIABLES ---------- */
:root {
    --amarillo-turqueza: #F2C94C;
    --verde-oscuro: #1A4D2E;
    --blanco: #ffffff;
    --gris-fondo: #f5f5f5;
    --gris-texto: #333;
    --sombra-suave: 0 2px 8px rgba(0, 0, 0, 0.05);
    --sombra-media: 0 5px 15px rgba(0, 0, 0, 0.1);
    --sombra-fuerte: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--gris-fondo);
}

/* ============================================================
   HEADER
   ============================================================ */
header {
    background: var(--blanco);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    display: flex;
    justify-content: space-between; /* ⬅️ Logo a la IZQUIERDA, buscador a la DERECHA */
    align-items: center;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-img {
    height: 40px; /* ⬅️ Tamaño perfecto en escritorio */
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    color: var(--verde-oscuro);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0;
    white-space: nowrap;
}

/* ---------- SEARCH ---------- */
.search-bar {
    display: flex;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    width: 400px; /* ⬅️ Puedes ajustar este ancho si quieres que sea más grande o más pequeña */
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px var(--amarillo-turqueza);
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    flex: 1;
    outline: none;
}

.search-bar button {
    border: none;
    background: var(--amarillo-turqueza);
    padding: 0 20px;
    color: var(--verde-oscuro);
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #e6b83c;
}
/* ============================================================
   SLIDER
   ============================================================ */
.hero-slider {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: var(--gris-fondo);
}

.slider-track {
    display: flex;
    gap: 10px;
    animation: scroll 50s linear infinite;
    width: max-content;
}

.slider-track img {
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ============================================================
   BENEFITS BAR
   ============================================================ */
.benefits-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    background: var(--blanco);
    padding: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

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

.benefit-item i {
    font-size: 1.5rem;
    color: var(--amarillo-turqueza);
}

.benefit-item div {
    display: flex;
    flex-direction: column;
}

.benefit-item strong {
    color: var(--verde-oscuro);
    font-size: 0.9rem;
}

.benefit-item small {
    font-size: 0.75rem;
    color: #777;
}

/* ============================================================
   FILTROS
   ============================================================ */
.category-filters {
    max-width: 1400px;
    margin: 20px auto 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 15px;
}

.filter-btn {
    padding: 8px 25px;
    border: 2px solid #ddd;
    background: var(--blanco);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--verde-oscuro);
    color: var(--blanco);
    border-color: var(--verde-oscuro);
}

/* ---------- SUB-FILTROS ---------- */
.sub-filters {
    max-width: 1400px;
    margin: 5px auto 20px;
    display: none;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 15px;
}

.sub-filters.show {
    display: flex;
}

.subfilter-btn {
    padding: 5px 18px;
    border: 2px solid var(--amarillo-turqueza);
    background: var(--blanco);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--verde-oscuro);
    transition: all 0.3s ease;
}

.subfilter-btn:hover,
.subfilter-btn.active {
    background: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.catalog-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-media);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center;
    background-color: #ffffff;
    padding: 10px;
    border-bottom: 4px solid var(--amarillo-turqueza);
}

.product-info {
    padding: 15px;
}

.product-cat {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gris-texto);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--verde-oscuro);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--verde-oscuro);
    color: var(--blanco);
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 15px;
    color: var(--amarillo-turqueza);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--blanco);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 20px;
    color: #999;
}

/* ============================================================
   POPUP ANUNCIO
   ============================================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-overlay.active .popup-container {
    animation: latido 2s ease-in-out infinite;
}

@keyframes latido {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.popup-container {
    position: relative;
    max-width: 450px;  /* ⬅️ Cambia de 500px a 450px (más pequeño) */
    width: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-container a {
    display: block;
}

.popup-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    display: block;
    object-fit: contain;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.popup-close {
    position: absolute;
    top: 10px;      /* ⬅️ Cambia de -15px a 10px (adentro) */
    right: 10px;    /* ⬅️ Cambia de -15px a 10px (adentro) */
    background-color: var(--verde-oscuro);
    color: var(--blanco);
    border: 3px solid var(--blanco);
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: transform 0.2s;
    line-height: 1;
}

.popup-close:hover {
    background-color: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
    transform: scale(1.1);
}

/* ============================================================
   MODAL PRODUCTO CON QR
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--blanco);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    overflow-y: auto;
    box-shadow: var(--sombra-fuerte);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: sticky;
    top: 10px;
    right: 10px;
    float: right;
    background: var(--verde-oscuro);
    color: var(--blanco);
    border: 2px solid var(--blanco);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    transition: transform 0.2s;
    margin: 10px;
}

.modal-close:hover {
    background: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
    transform: scale(1.1);
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px 30px 40px;
}

.modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
}

.modal-product-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-category {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.modal-info h2 {
    font-size: 1.8rem;
    color: var(--verde-oscuro);
    margin: 0;
    line-height: 1.2;
}

.modal-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--amarillo-turqueza);
    background: var(--verde-oscuro);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 8px;
    align-self: flex-start;
}

.modal-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--amarillo-turqueza), transparent);
    margin: 10px 0;
}

.modal-payment h3 {
    color: var(--verde-oscuro);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.modal-instructions {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 5px;
}

.modal-phone {
    font-size: 1.2rem;
    color: var(--verde-oscuro);
    background: #f0f7f3;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    margin: 5px 0 15px;
}

.qr-container {
    text-align: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed var(--amarillo-turqueza);
    margin: 10px 0;
}

.qr-code {
    max-width: 200px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: white;
    padding: 10px;
}

.qr-label {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #444;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--amarillo-turqueza);
    color: var(--verde-oscuro);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    width: 100%;
}

.btn-whatsapp:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-whatsapp i {
    font-size: 1.4rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---------- Tablet ---------- */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav-toggle {
        display: block;
        align-self: flex-start;
    }

    .megamenu {
        display: none;
        flex-direction: column;
        gap: 10px;
        background: var(--blanco);
        padding: 10px;
        border-radius: 10px;
        box-shadow: var(--sombra-media);
    }

    .megamenu.open {
        display: flex;
    }

    .mega-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 10px 20px;
        display: block;
        border-top: none;
    }

    .mega-item:hover .mega-dropdown {
        display: block;
    }

    .search-bar {
        width: 100%;
    }

    .benefits-bar {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Modal */
    .modal-content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .modal-image {
        min-height: 250px;
        padding: 10px;
    }

    .modal-product-img {
        max-height: 300px;
    }

    .modal-info h2 {
        font-size: 1.4rem;
    }

    .modal-price {
        font-size: 1.6rem;
    }

    .modal-close {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .qr-code {
        max-width: 150px;
    }
}

/* ---------- Móvil ---------- */
@media (max-width: 480px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-title {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-image {
        min-height: 180px;
    }

    .modal-product-img {
        max-height: 200px;
    }

    .modal-info h2 {
        font-size: 1.2rem;
    }

    .modal-price {
        font-size: 1.4rem;
        padding: 4px 15px;
    }

    .btn-whatsapp {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
        /* ---------- POPUP MÓVIL (MÁS PEQUEÑO Y SEGURO) ---------- */
    .popup-container {
        max-width: 320px;   /* ⬅️ Un poco más pequeño */
        width: 85%;         /* ⬅️ Ocupa el 85% del ancho */
        margin: 0 auto;
    }

    .popup-img {
        max-height: 70vh;   /* ⬅️ Limita la altura al 70% de la pantalla */
        object-fit: contain;
        border-radius: 10px;
        background: white;
    }

    .popup-close {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
        font-size: 1.4rem;
        border-width: 3px;
    }
}