/* ✅ Estilos base */
body {
    font-family: 'Poppins', sans-serif;
}

.main-header {
    background: linear-gradient(90deg, #fabbd1, #fa91b6);
    color: white;
    padding: 14px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.contenedor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.logo-img {
    height: 40px;
    width: auto;
}

.bienvenida {
    text-align: center;
    background: linear-gradient(135deg, #ffe5ec, #f9f9f9);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #333;
}

.bienvenida h2 {
    font-size: 1.8rem;
    color: #d63384;
    margin-bottom: 0.5rem;
}

.bienvenida p {
    font-size: 1rem;
    color: #555;
}

h1 {
    font-size: 2rem;
    color: #d63384;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.catalogo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
    background-color: #fffafd;
    border-radius: 12px;
}

.card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background-color: #fdfdfd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 280px;
}

.card img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
}

.card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: #020000;
    font-weight: 600;
}

.card .precio {
    font-size: 1rem;
    font-weight: bold;
    color: #009688;
    margin: 0.5rem 0;
}

.card .categoria {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
    font-style: italic;
}

.etiqueta {
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
}

.btn-whatsapp {
    background-color: #f0fffa;
    color: #25D366;
    border: 2px solid #25D366;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #25D366;
    color: white;
}

.add-to-cart-btn {
    margin-top: 8px;
    padding: 8px 14px;
    background-color: #fff0f5;
    color: #d63384;
    border: 2px solid #f78fb3;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #f78fb3;
    color: white;
}

#carrito {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 280px;
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#carrito h3 {
    margin-top: 0;
}

#lista-carrito {
    max-height: 45vh;
    overflow-y: auto;
    padding-right: 8px;
}

#lista-carrito button {
    background: none;
    border: none;
    color: red;
    font-weight: bold;
}

#lista-carrito::-webkit-scrollbar {
    width: 6px;
}

#lista-carrito::-webkit-scrollbar-thumb {
    background-color: #d63384;
    border-radius: 4px;
}

#enviar-pedido {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #24d366;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#enviar-pedido:hover {
    background-color: #1ebe57;
}

#vaciar-carrito {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #999;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#vaciar-carrito:hover {
    background-color: #777;
}

#carrito-minimizado {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ef32c0, #ff94e3);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, background 0.3s ease;
}

#carrito-minimizado:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #d81b90, #ff74d3);
}

.fade {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fade.oculto {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.busqueda {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.busqueda input {
    padding: 10px;
    width: 300px;
    border: 2px solid #f78fb3;
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    font-size: 1rem;
}

.busqueda button {
    padding: 10px 20px;
    background-color: #f78fb3;
    color: white;
    border: 2px solid #f78fb3;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.busqueda button:hover {
    background-color: #d63384;
    border-color: #d63384;
}

.categorias {
    margin: 20px 0;
    text-align: center;
}

.categorias a {
    display: inline-block;
    background: linear-gradient(135deg, #f8a5c2, #f78fb3);
    color: white;
    padding: 10px 20px;
    margin: 6px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.categorias a:hover {
    background: linear-gradient(135deg, #f78fb3, #f8a5c2);
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.categorias a.activo {
    background: linear-gradient(135deg, #d63384, #e83e8c);
    color: white;
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(214, 51, 132, 0.3);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.modal.oculto {
    display: none;
}

#cerrar-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}


.footer-pro {
    background-color: #222;
    color: #eee;
    padding: 30px 5px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.footer-logo img {
    width: 60px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 10px;
}

.footer-logo p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.footer-logo p:hover {
    color: #ff69b4;
    transition: color 0.3s ease;
}

.footer-copy {
    margin-top: 15px;
    font-size: 13px;
    color: #ccc;
}


/* todo lo de mobiles */
/* ✅ Todo lo de móviles */
@media (min-width: 320px) and (max-width: 480px) {
    .main-header {
        padding: 5px 0;
    }

    .logo {
        font-size: 1.2rem;
        gap: 8px;
    }

    .logo-img {
        height: 30px;
    }

    .busqueda {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0 10px;
    }

    .busqueda input,
    .busqueda button {
        width: 100%;
        font-size: 1rem;
        border-radius: 8px;
    }

    .catalogo {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 20px 10px;
    }

    .etiqueta {
        font-size: 0.75rem;
        font-weight: 500;
        color: #666;
    }

    .card {
        max-width: 100%;
        padding: 8px;
    }

    .card p {
        margin: 4px 0;
    }

    .card img {
        height: 180px;
        object-fit: cover;
    }

    .card h3 {
        font-size: 1rem;
    }

    .card .precio {
        font-size: 0.9rem;
    }

    .card .categoria,
    .card .etiqueta {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    /* ✅ Scroll interno para carrito */
    #carrito {
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    #lista-carrito {
        max-height: 40vh;
        overflow-y: auto;
        margin-bottom: 10px;
        padding-right: 5px;
    }

    #lista-carrito::-webkit-scrollbar {
        width: 6px;
    }

    #lista-carrito::-webkit-scrollbar-thumb {
        background-color: #d63384;
        border-radius: 4px;
    }

    #carrito h3 {
        font-size: 1.1rem;
    }

    #carrito button {
        font-size: 0.9rem;
        padding: 8px;
        margin-top: 6px;
    }

    #carrito-minimizado {
        font-size: 0.85rem;
        padding: 10px 14px;
        bottom: 10px;
        right: 10px;
    }
}