<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: Arial, sans-serif;
    }

    header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0%;
        width: 100%;
        background-color: #fff;
        z-index: 1000;
        padding: 0.8rem 2rem;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        box-shadow: 0 1.5rem 1.25rem rgba(71,71,71,0.05);
        gap: 2rem;
    }

    .logo {
        font-weight: bold;
        font-size: 1.875rem;
        color: #333;
    }

    .busqueda {
        position: relative;
        flex: 1;
        margin: 0 2.5%;
        max-width: 900px;
    }

    .busqueda input {
        width: 100%;
        font-size: 1rem;
        padding: 0.5rem 1.5rem 0.5rem 1rem;
        border-radius: 1rem;
    }

    .lupa-icon {
        position: absolute;
        right: -1.6rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1.25rem;
        height: 1.25rem;
        cursor: pointer;
        opacity: 0.6;
        transition: 0.2s ease;
    }

    .login-icon {
        width: 1.7rem;
        height: 1.7rem;
    }

    nav .btn-login {
        background: none;
        border: none;
        padding: 0;
        margin-left: 2.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
    }

    nav {
        display: flex;
        font-size: 0.15rem;
        margin-right: 4.4rem;
    }
    nav a {
        text-decoration: none;
        color: #333;
        font-weight: 500;
        font-size: 1.1rem;
        margin-left: 1.2rem;
    }

    .logo {
        font-weight: bold;
        font-size: 1.875rem;
        color: #333;
    }

    /* Main Content */
    .main-content {
        display: flex;
        flex-direction: column;
        padding: 2rem 5%;
        padding-top: 3rem; /* espacio para header */
    }

    .main-content h1 {
        font-size: 5vw; /* escala con pantalla */
        margin-bottom: 1rem;
    }

    .main-content h2, .main-content h3, .main-content h4, .main-content h5 {
        font-size: 1.5vw;
        margin-bottom: 0.1rem;
    }

    .main-content h6 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        margin-top: 1.8rem;
    }

    .favoritos-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
        margin-top: 2rem;
    }

    /* Tarjetas */
    .favorito-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        padding: 15px;
        text-align: center;
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .favorito-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    }

    .favorito-card img {
        width: 100%;
        max-width: 220px;   /* ⬅️ límite horizontal */
        height: auto;       /* mantiene proporción */
        max-height: 180px;  /* ⬅️ límite vertical */
        object-fit: contain; /* no recorta la imagen */
        border-radius: 10px;
        margin-bottom: 10px;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }


    .favorito-card h3 {
        font-size: 1rem;
        margin: 8px 0;
    }

    .favorito-card p {
        font-size: 0.95rem;
        color: #444;
    }

    /* Clickable */
    .clickable {
        cursor: pointer;
        color: #000;
        transition: 0.2s;
    }

    .clickable:hover {
        text-decoration: underline;
    }

    /* Filtros */
    .filtros ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 1rem;
    }

    .filtros li {
        background-color: #f3f3f3;
        padding: 0.5rem 1rem;
        margin-bottom: 0.5rem;
        border-radius: 0.5rem;
        display: inline-block;
        margin-right: 0.5rem;
        cursor: pointer;
        transition: 0.2s;
    }

    .filtros li:hover {
        background-color: #e1f0ff;
    }

    /* Botón Buscar */
    .btn-buscar {
        padding: 0.75rem 2rem;
        font-size: 1.5rem;
        font-weight: bold;
        color: white;
        background-color: #006adb;
        border: none;
        border-radius: 1.5rem;
        cursor: pointer;
        transition: background-color 0.3s ease;
        margin-top: 0.5rem;
        margin-bottom: 2rem;
    }

    .btn-buscar:hover {
        background-color: #0056cc;
    }

    /* Popup */
    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.4);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    .popup {
        background: white;
        padding: 2rem;
        border-radius: 1.25rem;
        box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
        max-width: 100%;
        width: 30rem;
        height: 35rem;
        text-align: center;
        font-size: 1.25rem;
        position: relative;
    }

    .popup img {
        max-width: 80%;
        height: auto;
        margin-bottom: 1rem;
        margin-top: 3rem;
    }

    .cerrar-popup {
        position: absolute;
        top: 0.4rem;
        right: 1rem;
        background: transparent;
        border: none;
        font-size: 1.75rem;
        font-weight: bold;
        cursor: pointer;
        color: #282828;
    }

    .cerrar-popup:hover {
        color: red;
    }

    /* Selector de opciones */
    .selector-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .selector-opcion {
        padding: 0.5rem 1rem;
        background-color: #f3f3f3;
        border-radius: 0.5rem;
        cursor: pointer;
        font-size: 1rem;
        transition: 0.2s;
        user-select: none;
    }

    .selector-opcion:hover {
        background-color: #e1f0ff;
    }

    .selector-opcion.selected {
        background-color: #cce3ff;
        font-weight: bold;
    }

    .almacenamiento-tabs {
        display: flex;
        gap: 10px;
        justify-content: center;
        margin-bottom: 15px;
    }

    .almacenamiento-tab {
        padding: 6px 12px;
        background: #eaeaea;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        transition: 0.2s;
    }

    .almacenamiento-tab:hover {
        background: #d0d0d0;
    }

    .almacenamiento-tab.active {
        background: #006adb;
        color: white;
    }


    /* MEDIA QUERIES */
    @media (max-width: 1024px) {
        .main-content h1 { font-size: 8vw; }
        .main-content h2, .main-content h3, .main-content h4, .main-content h5 { font-size: 5vw; }
        .popup { width: 80%; font-size: 1rem; }
    }

    @media (max-width: 768px) {
        header { flex-direction: column; padding: 1rem 2rem; }
        nav a { margin: 0.25rem; font-size: 0.9rem; }
        .busqueda { margin: 1rem 0; }
        .main-content { padding-top: 8rem; }
        .main-content h1 { font-size: 10vw; }
        .main-content h2, .main-content h3, .main-content h4, .main-content h5 { font-size: 6vw; }
        .btn-buscar { font-size: 1.2rem; padding: 0.5rem 1.5rem; }
        .popup { width: 90%; padding: 1rem; font-size: 1rem; }
    }

    @media (max-width: 768px) {
        #popupImagen {
            height: 25vh;
            max-height: 200px;
            margin-bottom: 15px;
        }

        #popupPrecio {
            font-size: 30px;
        }
    }

    @media (max-width: 480px) {
        #popupImagen {
            height: 20vh;
            max-height: 150px;
        }

        #popupPrecio {
            font-size: 24px;
        }
    }

    @keyframes aparecerIzq {
            0% {
                opacity: 0;
                transform: translateX(-30px);
            }
            100% {
                opacity: 1;
                transform: translateX(0);
            }
        }

        main h1,
        main h2,
        main h3,
        main h4,
        main h5
        {
            opacity: 0; /* evita que se vea antes de animar */
            animation: aparecerIzq 0.1s ease-out forwards;

        }

        main h1 { animation-delay: 0.05s; }
        main h2 { animation-delay: 0.1s; }
        main h3 { animation-delay: 0.15s; }
        main h4 { animation-delay: 0.2s; }
        main h5 { animation-delay: 0.25s }

        /* ========== FONDO DE ONDAS MULTICOLOR SUPER LIGERAS ========== */
        body::before {
            content: "";
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 45vh; /* altura de la zona con ondas */
            pointer-events: none;
            z-index: -1;

            background:
                radial-gradient(ellipse at 20% 80%, rgba(0,118,244,0.18), transparent 70%),
                radial-gradient(ellipse at 50% 90%, rgba(255,80,80,0.15), transparent 70%),
                radial-gradient(ellipse at 80% 85%, rgba(255,220,0,0.18), transparent 70%);

            filter: blur(40px);
            animation: ondasMover 14s ease-in-out infinite alternate;
        }

        /* ========== ANIMACIÓN SUAVE DE DESPLAZAMIENTO ========== */
        @keyframes ondasMover {
            0%   { transform: translateY(0px) translateX(0px); opacity: 0.95; }
            50%  { transform: translateY(-12px) translateX(10px); opacity: 1; }
            100% { transform: translateY(0px) translateX(-10px); opacity: 0.95; }
        }

        
    /* ===========================================================
    📱 RESPONSIVE — IGUAL QUE TU MOVILES.CSS ORIGINAL (sin duplicados)
    =========================================================== */

    @media (max-width: 1024px) {
        .main-content h1 { font-size: 8vw; }
        .main-content h2, .main-content h3, .main-content h4, .main-content h5 { font-size: 5vw; }
        .popup { width: 80%; font-size: 1rem; }
    }

    @media (max-width: 768px) {

        /* Header */
        header {
            flex-direction: column;
            flex-wrap: wrap;
            padding: 1rem 2rem;
            gap: 10px;
            text-align: center;
        }

        header nav {
            width: 100%;
            display: flex;
            justify-content: center;
            gap: 15px;
        }

        .busqueda {
            margin: 1rem 0;
            width: 100%;
            order: 3;
        }

        .busqueda input {
            width: 100%;
            font-size: 16px;
        }

        /* Titulos */
        .main-content {
            padding-top: 11rem;
        }

        .main-content h1 { font-size: 10vw; text-align: center; }
        .main-content h2, .main-content h3, .main-content h4, .main-content h5 {
            font-size: 6vw;
            text-align: center;
        }

        /* Botón */
        .btn-buscar {
            font-size: 1.2rem;
            padding: 0.5rem 1.5rem;
        }

        /* Pop-up */
        .popup {
            width: 90%;
            padding: 1rem;
            font-size: 1rem;
            height: auto;
        }

        #popupImagen {
            height: 25vh;
            max-height: 200px;
            margin-bottom: 15px;
            width: auto;
        }

        #popupPrecio {
            font-size: 30px;
        }

        /* Filtros */
        .filtros { width: 100%; }

        .selector-group {
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
        }

        .selector-opcion {
            font-size: 14px;
            padding: 8px 12px;
        }

        /* H1/H2 genérico */
        h1 { font-size: 28px; }
        h2 { font-size: 22px; }
    }

    @media (max-width: 480px) {

        #popupImagen {
            height: 20vh;
            max-height: 150px;
        }

        #popupPrecio {
            font-size: 24px;
        }
    }

    .quitar-fav {
    background: none;
    border: none;
    color: rgb(220, 0, 0);
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    }

    .quitar-fav:hover {
        text-decoration: underline;
    }

/* ===== LOGIN POPUP ===== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-popup {
    position: relative;
    width: 90%;
    max-width: 520px;
    height: 520px;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.login-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.login-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10;
}
  
</style>