:root {
    --white: #ffffff;
    --text: #333333;
    --muted: #6c757d;
    --lavender: #9a6cff;
    --accent-pink: #ff69b4;
    --accent-purple: #8a2be2;
    --glass-white: rgba(255, 255, 255, 0.75);
    --glass-deep: rgba(255, 255, 255, 0.85);
}

/* --- 1. BASE Y FONDO MAESTRO --- */
html {
    scroll-padding-top: 90px;
}

body {
    background-color: var(--white);
    background-image: url('model_hero_pamela.png');
    background-attachment: fixed;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% auto;
    color: var(--text);
    font-family: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
}

/* --- 2. NAVBAR DINÁMICO (EFECTO GLASS) --- */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
    z-index: 1050;
    background: transparent;
}

.navbar.scrolled {
    background-color: var(--glass-white) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-title {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--lavender) !important;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-nav {
    gap: 15px;
}

/* --- 3. BOTONES GLOW (CONTRASTE E ICONOS) --- */
.btn-glow,
.nav-link.btn-glow {
    background-color: var(--accent-pink);
    color: #fff !important;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 22px !important;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.icon-contrast {
    color: #ffd84d;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
}

.btn-glow:hover,
.nav-link.btn-glow:hover {
    background-color: var(--accent-purple);
    color: #fff !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.45);
}

.btn-glow:hover .icon-contrast,
.nav-link.btn-glow:hover .icon-contrast {
    color: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}

/* --- 4. SECCIÓN INICIO Y MARCOS GENERALES --- */
#inicio.section-bg {
    margin-top: 130px !important;
    background: transparent !important;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
    opacity: 1;
    transform: none;
}

.overlay-content {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 3rem;
    border-radius: 24px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    width: 100%;
}

/* --- 5. SECCIONES (Ajuste de Padding Exterior) --- */
.section-bg {
    position: relative;
    padding: 2.5rem 0;
    margin-bottom: 3rem;
    border-radius: 40px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-bg.active {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    color: var(--lavender);
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
}

/* --- 6. TARJETAS DINÁMICAS (FLIP Y SHIMMER) --- */
.flip-card {
    perspective: 1200px;
    margin-bottom: 30px;
    background-color: transparent;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 240px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.flip-card-front {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    font-weight: 700;
    z-index: 2;
}

.flip-card-front::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-30deg);
    transition: 0.8s;
    pointer-events: none;
}

.flip-card:hover .flip-card-front::after {
    left: 150%;
}

.flip-card-back {
    background: rgba(255, 255, 255, 0.98);
    color: var(--accent-purple);
    transform: rotateY(180deg);
    border: 2px solid var(--accent-purple);
    text-align: center;
    gap: 8px;
    z-index: 1;
    justify-content: flex-start;
}

/* Listado de marcas en el reverso */
.brand-list {
    width: 100%;
    overflow-y: auto;
    text-align: left;
    margin-top: 10px;
}

.brand-list span {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 8px;
}

/* --- 7. BOTONES FLOTANTES --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    background-color: #25d366;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--accent-purple);
    color: white;
    display: none;
    border: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- 8. RESPONSIVO (CORRECCIÓN CARDS Y AIRE) --- */
@media (max-width: 768px) {
    body {
        background-image: none !important;
        background-color: #fdfdfd;
    }

    .overlay-content {
        padding: 1.5rem;
        width: 92%;
        margin: 0 auto;
    }

    .section-bg {
        padding: 2rem 0;
        margin-bottom: 2rem;
        border-radius: 25px;
    }

    #inicio.section-bg {
        margin-top: 100px !important;
        padding: 2rem 0;
    }

    .flip-card-inner {
        height: 150px !important;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        padding: 25px;
        border-radius: 20px;
        margin-top: 15px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(154, 108, 255, 0.1);
    }

    .navbar-nav {
        align-items: flex-start !important;
        gap: 15px;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link.btn-glow {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 14px 25px !important;
    }

    .section-title {
        font-size: 1.8rem;
    }
}



/* 9. Estilo para las marcas que tienen link */
.brand-link-item {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-purple);
    text-decoration: none;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-radius: 8px;
}

.brand-link-item:hover {
    background-color: rgba(154, 108, 255, 0.1);
    color: var(--accent-pink);
    padding-left: 12px;
}

.brand-link-item i {
    color: var(--accent-pink);
    margin-right: 5px;
}

/* Estilo para las marcas sin catálogo aún */
.brand-no-link {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    padding: 6px 8px;
    opacity: 0.7;
}

/* Ajuste del scroll interno del reverso */
.brand-list {
    width: 100%;
    max-height: 160px; /* Evita que se desborde la tarjeta */
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar minimalista */
.brand-list::-webkit-scrollbar { width: 4px; }
.brand-list::-webkit-scrollbar-thumb { background: var(--lavender); border-radius: 10px; }

/* --- 10. PIE DE PÁGINA --- */
footer {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-top: 2rem;
}
/* =========================================================
   11. INTERFAZ DE BÚSQUEDA PROFESIONAL (ESTILO PAMELA VILLEGAS)
   ========================================================= */

.input-group.shadow-sm {
    border-radius: 50px !important;
    overflow: hidden;
    border: 1.5px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: #ffffff;
    padding: 5px;
}

.input-group.shadow-sm:focus-within {
    border-color: var(--accent-pink);
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.15) !important;
    transform: translateY(-3px);
}

#brandSearch {
    border: none !important;
    box-shadow: none !important;
    font-size: 1rem;
    color: #444;
}

/* Estilo del Placeholder */
#brandSearch::-webkit-input-placeholder {
    color: #c0c0c0;
    font-weight: 300;
    letter-spacing: 0.5px;
}

#brandSearch:focus::-webkit-input-placeholder {
    color: var(--accent-pink);
    opacity: 0.5;
}

/* Iconos y Botón Limpiar */
.input-group-text, #clearSearch {
    background: transparent !important;
    border: none !important;
    color: #999;
    padding: 0 15px;
}

#clearSearch {
    cursor: pointer;
    transition: all 0.2s ease;
}

#clearSearch:hover {
    color: var(--accent-pink) !important;
    transform: scale(1.2);
}

/* Feedback No Resultados */
#no-results {
    background: rgba(240, 240, 240, 0.3);
    border-radius: 20px;
    margin-top: 20px;
    border: 1px dashed #ddd;
}

#brandSearch::-webkit-search-cancel-button {
    display: none;
}