@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root{
    --background-color: rgb(255, 255, 255);
    --color-principal: rgb(196, 163, 47);
    --color-secundario: rgb(239,191, 4);
    --color-texto: rgb(0, 0, 0);
    --color-titulo: rgb(143, 117, 4);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
}

html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden; 
    position: relative;
}

body{
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-top: 80px;
}

@media (max-width: 984px) {
    main {
        padding-top: 70px;
    }
}

/*Header*/

header {
    position: fixed;
    top: 0;
    z-index: 10;
    width: 100%;
    height: 80px;
    color: var(--color-texto);
    background-color: var(--background-color);
}

header .contenedor{
    width: 100%;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    gap: 20px;
}

/*LOGO*/

header .logo {
    display: flex;
    align-items: center;
}

header .logo img{
    width: 120px;
    height: 100px;
    border-radius: 5px;
    margin-right: 5px;
}

header .logo span {
    font-size: 21px;
    font-weight: 600;
    color: var(--color-titulo);
}

/*Menu Opciones*/

header .menu-opciones {
    background-color: var(--background-color);
    height: auto;
}

header .menu-opciones ul{
    display: flex;
    flex-direction: row;
}

header .menu-opciones li{
    list-style: none;
    margin: 15px;
}

/* MENU CATEGORIAS */

.has-mega {
    position: relative;
}

/* Contenedor del menú */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 999;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-col h4 {
    color: var(--color-principal);
    margin-bottom: 15px;
    font-size: 16px;
}

.mega-sublist {
    max-height: 170px;          
    overflow-y: auto;
    padding-right: 6px;       
}

.mega-sublist::-webkit-scrollbar {
    width: 6px;
}

.mega-sublist::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.mega-sublist::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.mega-col a {
    display: block;
    color: var(--color-texto);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 14px;
    transition: 0.2s ease;
}

.mega-col a:hover {
    color: var(--color-principal);
    transform: translateX(5px);
}

header .menu-opciones a{
    color: var(--color-texto);
    text-decoration: none;
    transition: color 0.2s ease;
}

header .menu-opciones a:hover{
    color: var(--color-principal);
}

/*Controles usuario*/

header .controles-usuario{
    display: flex;
    gap: 20px;
    align-items: center;
    order: 1;
}

header .controles-usuario ion-icon{
    font-size: 25px;
    cursor: pointer;
    color: var(--color-principal);
    transition: color 0.2s ease;
}

header .controles-usuario ion-icon:hover{
    color: var(--color-secundario);
}


header .controles-usuario ion-icon icon-inner:hover{
    color: var(--color-secundario);
}

/* OVERLAY BÚSQUEDA */

.overlay-busqueda {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.overlay-busqueda.activo {
    opacity: 1;
    pointer-events: all;
}

.busqueda-box {
    background: white;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeDown 0.3s ease;
    position: relative;
    width: 100%;
    max-width: 520px;
}

.busqueda-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
}

.busqueda-box button {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.busqueda-resultados {
    margin-top: 10px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,.2);
    z-index: 9999;
    overflow: hidden;
}

.busqueda-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.busqueda-item:hover {
    background: #f6f6f6;
}

.busqueda-item img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
}

.busqueda-item span {
    font-size: 14px;
    color: #222;
}

.busqueda-ver-todo {
    text-align: center;
    padding: 12px;
    background: var(--color-principal);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: all .1s ease;
}

.busqueda-ver-todo:hover{
    background: var(--color-secundario);
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARRITO SIDEBAR */

.carrito {
    position: fixed;
    top: 0;
    right: -100%;
    width: 340px;
    height: 100vh;
    background: var(--background-color);
    box-shadow: -8px 0 25px rgba(0,0,0,.15);
    padding: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: right 0.35s ease;
}

.carrito.activo {
    right: 0;
}

.carrito.reveal {
    opacity: 0;
    transform: translateX(40px);
}

.carrito.activo.reveal {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.carrito h3 {
    font-size: 22px;
    color: var(--color-titulo);
    text-align: center;
    border-bottom: 2px solid var(--color-secundario);
    padding-bottom: 10px;
    margin-bottom: 5px;
}

/* LISTA DE PRODUCTOS */

#lista-carrito {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

#lista-carrito::-webkit-scrollbar {
    width: 5px;
}

#lista-carrito::-webkit-scrollbar-thumb {
    background: var(--color-secundario);
    border-radius: 10px;
}

/* Producto individual */
.carrito-item {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: fadeUp 0.3s ease;
}

.carrito-item strong {
    color: var(--color-texto);
    font-size: 14px;
}

.carrito-item span {
    font-size: 13px;
    color: #555;
}

#total-carrito {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-texto);
    text-align: center;
    margin-top: 5px;
}

/* BOTONES */

#btn-limpiar-carrito,
.carrito button {
    border: none;
    padding: 12px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#btn-limpiar-carrito {
    background: linear-gradient(
        135deg,
        var(--color-principal),
        var(--color-secundario)
    );
    color: white;
    box-shadow: 0 4px 10px rgba(196,163,47,.4);
}

.carrito button:last-child {
    background: transparent;
    color: var(--color-titulo);
    border: 2px solid var(--color-principal);
}

#btn-limpiar-carrito:hover,
.carrito button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,.15);
}

.btn-ir-pagar {
    display: block;
    text-align: center;
    text-decoration: none;

    background: linear-gradient(
        135deg,
        var(--color-principal),
        var(--color-secundario)
    );
    color: white;
    padding: 14px;
    border-radius: 30px;
    font-weight: bold;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(196,163,47,.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-ir-pagar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}


/* CONTADOR CARRITO */

.icono-carrito-wrapper {
    position: relative;
    cursor: pointer;
}

#icono-carrito {
    font-size: 25px;
    margin-top: 5px;
}

#contador-carrito {
    position: absolute;
    top: -1px;
    right: -8px;
    background: linear-gradient(
        135deg,
        var(--color-principal),
        var(--color-secundario)
    );
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    transform: scale(0);
    transition: transform 0.25s ease;
}

/* Cuando hay productos */
#contador-carrito.activo {
    transform: scale(1);
}

/* Alerta producto agregado al carrito */ 

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(200%); 
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 9999;
    border-left: 5px solid #10b981;
    min-width: 250px;
}

.toast.mostrar {
    transform: translateX(0);
}

.toast ion-icon {
    font-size: 24px;
    color: #10b981;
}

.toast span {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.toast.error {
    border-left-color: #ef4444;
}

/* PRODUCTOS CARRITO */

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfd;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    animation: fadeUp 0.3s ease;
}

.carrito-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.carrito-item-info strong {
    font-size: 14px;
    color: var(--color-texto);
}

.carrito-item-info span {
    font-size: 13px;
    color: #555;
}

.btn-eliminar {
    border: none;
    background: linear-gradient(
        135deg,
        var(--color-principal),
        var(--color-secundario)
    );
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(196,163,47,.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-eliminar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

/* Carrito vacío */
.carrito-vacio {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-top: 40px;
}


header #btn-signup{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--color-principal);
    color: var(--color-texto);
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s ease;
}

header #btn-signup:hover{
    background-color: var(--color-secundario);
}

header #btn-menu{
    display: none;
}

/* ALERTA INICIAR SESION */

.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-modal.activo {
    display: flex;
}

.auth-box {
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    animation: scaleIn .25s ease;
}

.auth-box h3 {
    color: var(--color-principal);
    margin-bottom: 10px;
}

.auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.auth-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.1s ease;
}

.auth-actions button:hover{
    box-shadow: 2px 5px 0px rgba(0, 0, 0, 0.363);
    transform:translateX(1px);
}

.auth-actions button.sec {
    background: #eee;
    color: #000;
    transition: all 0.1s ease;
}

.auth-actions button.sec:hover {
    box-shadow: 2px 5px 0px rgba(0, 0, 0, 0.363);
    transform:translateX(1px);
}

@keyframes scaleIn {
    from { transform: scale(.9); opacity: 0 }
    to { transform: scale(1); opacity: 1 }
}

/* USER MENU */

.user-menu {
    position: relative;
    z-index: 10001;
}

.user-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-texto);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    z-index: 10002;
}

.user-btn .arrow {
    font-size: 10px;
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: #fff;
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all .25s ease;
    z-index: 9999;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--color-texto);
    font-size: 14px;
}

.user-dropdown a:hover {
    background: rgba(0,0,0,.05);
}

/* Mostrar dropdown */
.user-menu.open .user-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mobile-only {
    display: none;
}

/* AVATAR HEADER */

.user-btn-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-principal);
}

.user-name {
    white-space: nowrap;
    max-width: 110px; /* más corto */
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-btn-avatar:hover .user-avatar-sm {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/*Responsive NAVBAR*/

@media (max-width: 984px){

    header {
        height: 80px;
        background-color: var(--background-color);
    }

    header .contenedor {
        display: flex;
        flex-wrap: nowrap; 
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0; 
        padding: 0 20px; 
        gap: 15px;
        height: 100%;
    }

    /* Botón hamburguesa */
    header #btn-menu{
        display: block;
        font-size: 30px;
        cursor: pointer;
        color: var(--color-principal);
        order: 3; 
    }

    #btn-signup,
    .user-menu {
        display: none !important;
    }

    header .logo span {
        font-size: 18px;
    }

    header .controles-usuario {
        gap: 12px;
        order: 2; 
    }

    .mobile-only {
        display: block;
    }

    header .menu-opciones{
        position: absolute;
        top: 80px; 
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        max-height: 0;
        overflow: hidden;
        border-bottom: none;
        transition: max-height 0.5s ease, box-shadow 0.3s ease;
        z-index: 9;
        box-shadow: 0 0 0 rgba(0,0,0,0); 
    }

    /* Estado abierto */
    header .menu-opciones.mostrar{
        max-height: 100vh;
        padding-bottom: 30px;
        border-bottom: 2px solid var(--color-principal);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    }

    header .menu-opciones ul{
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    header .menu-opciones li {
        width: 100%;
        text-align: center;
        margin: 15px 0;
    }

    header .logo { 
        order: 1; 
        flex-shrink: 0;
    }
    
    header .logo img {
        width: 80px; 
        height: auto;
        margin: 0;
    }

    .mega-menu {
        display: none;
    }
}

@media (max-width:600px){
    header .logo span{
        display: none;
    }
    header .logo img{
        margin-top: 15px;
    }
}

@media (max-width:501px){
    header .logo span{
        display: none;
    }
}

/*CONTENIDO*/

/* HERO SLIDER */

.hero-full {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 400px;
    overflow: hidden;
}

.hero-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;  
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: none !important;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content p {
    color: #f1f1f1;
    font-size: 22px;
    font-weight: 500;
}

/* FLECHAS */

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    font-size: 32px;
    cursor: pointer;
    z-index: 5;
    transition: 0.3s;
}

.hero-arrow:hover {
    background: var(--color-principal);
    color: #fff;
}

.hero-arrow.left { left: 20px; }
.hero-arrow.right { right: 20px; }

/* RESPONSIVE */

@media (max-width: 1024px) {
    .hero-full {
        height: 50vh; 
        min-height: 400px; 
    }
}

@media (max-width: 768px) {
    .hero-full{
        height: 300px;
        min-height: unset;
    }

    .hero-slide {
        background-position: center center;
    }

    .hero-arrow{
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .hero-full {
        height: 200px; 
    }

    .hero-arrow{
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

@media (max-width: 350px) {
    .hero-full {
        height: 220px;
    }

    .hero-arrow{
        width: 20px;
        height: 20px;
        font-size: 5px;
    }
}

/* CATEGORÍAS HOME */

.categorias-home {
    width: 100%;
    padding: 120px 0 120px;
    background-color: #fff;
    background: #fff;
}

.categorias-header {
    text-align: center;
    margin-bottom: 40px;
    overflow: visible;
}

.categorias-sub {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-principal);
}

/* SLIDER */

.categorias-slider {
    overflow: hidden;
    max-width: 1800px;
    margin: 0 auto;
}

.categorias-track {
    display: flex;
    gap: 20px;
    transition: transform 0.6s ease;
}

/* CADA CATEGORÍA */

.categoria-item {
    flex: 0 0 calc((100% - 60px) / 4);
    height: 420px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border-radius: 18px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.categoria-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.65),
        rgba(0,0,0,0.25),
        rgba(0,0,0,0)
    );
    z-index: 1;
}

.categoria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.categoria-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}

.categoria-item:hover img {
    transform: scale(1.08);
}

.categoria-item span {
    position: absolute;
    bottom: 45px;
    left: 30px;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}

.categoria-item:hover img {
    transform: scale(1.08);
}

.categorias-wrapper{
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 60px;
}

/* FLECHAS */

.cat-arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.95);
    color: var(--color-principal);
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 5;
    transition: all 0.25s ease;
}

.cat-arrow.left{ left: 10px; }
.cat-arrow.right{ right: 10px; }

.cat-arrow:hover{
    background: var(--color-principal);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    .categoria-item {
        flex: 0 0 calc((100% - 20px) / 2);
        height: 320px;
    }

    .categorias-wrapper{
        padding: 0 40px;
    }

    .cat-arrow {
        width: 35px;
        height: 35px;
        font-size: 26px;
    }
}

@media (max-width: 600px){

    .categorias-home{
        padding: 80px 0;
    }

    .categoria-item{
        flex: 0 0 calc((100% - 18px) / 1); 
        height: 260px;
    }

    .categorias-wrapper{
        padding: 0 20px;
    }

    .cat-arrow{
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

/*POR QUE ELEGIRNOS?*/

.porque-elegirnos{
    padding: 80px 40px;
    background-color: var(--color-secundario);
    text-align: center;
}

.porque-elegirnos h2{
    font-size: 32px;
    color: black; 
    margin-bottom: 10px;
}

.porque-subtitulo{
    max-width: 700px;
    margin: 0 auto 50px;
    color: var(--color-texto);
    font-size: 17px;
    line-height: 1.6;
}

.beneficios-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.beneficio-card{
    background-color: white;
    border-radius: 16px;
    padding: 35px 25px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.beneficio-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.beneficio-card ion-icon{
    font-size: 42px;
    color: var(--color-principal);
    margin-bottom: 15px;
}

.beneficio-card h3{
    font-size: 18px;
    color: var(--color-texto);
    margin-bottom: 10px;
}

.beneficio-card p{
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

@media (max-width: 992px){
    .beneficios-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px){
    .beneficios-grid{
        grid-template-columns: 1fr;
    }

    .porque-elegirnos{
        padding: 60px 20px;
    }
}

/*PRODUCTOS DESTACADOS*/

.productos-destacados{
    padding: 80px 40px;
    background-color: white;
    text-align: center;
}

.productos-destacados h2{
    font-size: 32px;
    color: var(--color-titulo);
    margin-bottom: 10px;
}

.productos-subtitulo{
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 17px;
    color: var(--color-texto);
}

.productos-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto-card{
    background-color: #f9f9f9;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.producto-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.producto-card img{
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.producto-card h3{
    font-size: 16px;
    color: var(--color-texto);
    margin-bottom: 8px;
    text-align: center;
}

.precio{
    font-size: 18px;
    font-weight: 600;
    color: var(--color-principal);
    margin-bottom: 15px;
}

.stock{
    font-size: 14px;
    margin-bottom: 15px;
}

.stock span{
    font-weight: 600;
}

.stock.disponible span{
    color: green;
}

.stock.bajo span{
    color: orange;
}

.stock.agotado span{
    color: red;
}

.btn-primario {
    border: none;
    background-color: var(--color-principal);
    padding: 15px;
    font-size: 15px;
    color: #000;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primario:hover{
    background-color: var(--color-secundario);
}

/* Botón carrito */

.btn-carrito{
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    background-color: var(--color-principal);
    color: var(--color-texto);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-carrito ion-icon{
    font-size: 18px;
}

.btn-carrito:hover{
    background-color: var(--color-secundario);
    transform: translateY(-2px);
}

.btn-producto{
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 10px;
    background-color: var(--color-principal);
    color: var(--color-texto);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-producto:hover{
    background-color: var(--color-secundario);
    transform: translateY(-2px);
}

.productos-cta{
    margin-top: 50px;
}

@media (max-width: 1200px){
    .productos-grid{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px){
    .productos-grid{
        grid-template-columns: repeat(2, 1fr);
    }

    .producto-card img{
        height: 160px;
    }
}

@media (max-width: 480px){
    .productos-grid{
        grid-template-columns: 1fr;
    }
}

/*MARCAS*/

.marcas{
    padding: 70px 0;
    background-color: #f9f9f9;
    overflow: hidden;
}

.marcas h2{
    text-align: center;
    font-size: 30px;
    color: var(--color-titulo);
    margin-bottom: 40px;
}

.marcas-wrapper{
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.marcas-carousel{
    display: flex;
    gap: 60px;
    width: max-content;
    animation: scrollMarcas 35s linear infinite;
    padding-left: 50%;
}

.marca{
    min-width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: grayscale(50%);
    opacity: 0.8;
    transition: 0.3s ease;
}

.marca img{
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
}

.marca:hover{
    filter: grayscale(0%);
    opacity: 1;
}

/* Animación infinita SIN BLANCOS */
@keyframes scrollMarcas{
    from{
        transform: translateX(0);
    }
    to{
        transform: translateX(-50%);
    }
}

/* FOOTER */

.footer{
    background-color: #111;
    color: #ddd;
    padding: 60px 40px 20px;
}

.footer-contenedor{
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-col h4{
    color: var(--color-principal);
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-col p{
    font-size: 14px;
    line-height: 1.6;
}

.footer-col ul{
    list-style: none;
}

.footer-col ul li{
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-col ul li a{
    color: #ddd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover{
    color: var(--color-principal);
}

/* Redes Sociales */

.footer-redes {
    display: flex;
    gap: 15px;
}

.footer-redes a{
    text-decoration: none;
    color: inherit;
    display: inline-flex;
}

.footer-redes .red {
    font-size: 35px;
    cursor: pointer;
    transition: filter 0.3s, transform 0.3s;
}

.footer-redes .instagram:hover {
    filter: drop-shadow(0 0 6px #E1306C);
}

.footer-redes .facebook:hover {
    filter: drop-shadow(0 0 6px #1877F2);
}

.footer-redes .youtube:hover {
    filter: drop-shadow(0 0 6px #FF0000);
}

.footer-redes .tiktok:hover {
    filter: drop-shadow(0 0 6px #00f2ea);
}

.red:hover {
    transform: scale(1.2);
}

/* Logo */

.footer-logo{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo img{
    width: 50px;
}

/* Pagos */

.footer-pagos{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-pagos img{
    height: 35px;
    background: white;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
}

/* Bottom */

.footer-bottom{
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 13px;
    color: #aaa;
}

.btn-whatsapp-flotante {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    background-color: #25D366;
    color: white;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 2147483647 !important;
    transition: all 0.3s ease;
    animation: float-wa 3s ease-in-out infinite;
}

.btn-whatsapp-flotante ion-icon {
    font-size: 24px;
}

.btn-whatsapp-flotante:hover {
    background-color: #128C7E;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes float-wa {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

/* Responsive */

@media (max-width: 600px) {
    .btn-whatsapp-flotante {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
        font-size: 13px;
    }
    .btn-whatsapp-flotante ion-icon {
        font-size: 20px;
    }
}

@media (max-width: 768px){
    .footer{
        padding: 40px 20px 15px;
    }

    .footer-col{
        text-align: center;
    }

    .footer-logo{
        justify-content: center;
    }

    .footer-pagos{
        justify-content: center;
    }

    .footer-redes {
        justify-content: center;
    }

}

/* ANIMACIONES SCROLL */

.reveal {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.left {
    transform: translateX(-40px);
}

.reveal.right {
    transform: translateX(40px);
}

.reveal.little {
    transform: translateX(-6px);
}

.reveal.rittle {
    transform: translateX(6px);
}

.reveal.up {
    transform: translateY(40px);
}

.reveal.active {
    opacity: 1;
    transform: translateX(0) translateY(0);
}
