/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================================================== */
:root {
    --bg-cream: #F3E9E3;      /* Color Único de Fondo */
    --purple-light: #8A61DB;  /* Acentos suaves */
    --purple-main: #672CC4;   /* Botones y Hover */
    --purple-dark: #270351;   /* Títulos y Jerarquía */
    --blue-soft: #8FB7EF;     /* Detalles y Separadores */
    --white: #ffffff;
    --gold: #FFD700;          /* Para las estrellas */
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Curva premium */
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body {
    max-width: 100vw;
    overflow-x: hidden; 
    background-color: var(--bg-cream); 
    font-family: 'Poppins', sans-serif;
    color: var(--purple-dark);
    line-height: 1.6;
}

/* ==========================================================================
   ESTRUCTURA PRINCIPAL
   ========================================================================== */
.magazine-container {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg-cream); 
    padding: 50px;
}

/* --- HEADER --- */
.mag-header { 
    text-align: center; 
    padding-bottom: 30px; 
    margin-bottom: 30px; 
}

.top-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 10px; 
    font-weight: 800; 
    letter-spacing: 2px; 
    color: var(--purple-main);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.banner-wrapper {
    width: 100%;
    overflow: hidden;
    margin: 10px 0;
}

.mag-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(39, 3, 81, 0.05); 
}

.tagline-header {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--purple-dark);
    margin-top: 15px;
}

/* --- NAVEGACIÓN --- */
.mag-nav { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    padding: 15px 0; 
    border-bottom: 2px solid rgba(255,255,255,0.5); 
    margin-bottom: 40px; 
}

.mag-nav a { 
    text-decoration: none; 
    color: var(--purple-dark); 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
}

.mag-nav a:hover, .mag-nav a.active { 
    color: var(--purple-main); 
}

/* ==========================================================================
   SECCIONES DE CONTENIDO E INTERACCIÓN (EFECTO ZOOM AÑADIDO)
   ========================================================================== */

/* --- TARJETAS DE PRODUCTO (CATEGORÍAS) --- */
.product-card-clean { 
    background: var(--white); 
    border-radius: 25px; 
    padding: 30px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
    transition: var(--transition-smooth); /* Animación suave */
}

.product-card-clean:hover {
    transform: translateY(-8px) scale(1.03); /* Efecto elevar y agrandar */
    box-shadow: 0 20px 40px rgba(39, 3, 81, 0.08); /* Sombra más fuerte */
}

/* --- DISCOVERY CARDS (HOME) --- */
.discovery-section { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    margin-bottom: 60px; 
}

.disc-card { 
    padding: 25px; 
    border-radius: 25px; 
    background: var(--white); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.02); 
    transition: var(--transition-smooth);
}

.disc-card:hover {
    transform: translateY(-8px) scale(1.03); /* Efecto elevar y agrandar */
    box-shadow: 0 15px 35px rgba(39, 3, 81, 0.1);
}

/* --- MOSAICO FINAL --- */
.mosaico-articles { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}

.m-item { 
    background: var(--white); 
    padding: 30px; 
    font-size: 13px; 
    border-radius: 20px; 
    transition: var(--transition-smooth);
}

.m-item:hover {
    transform: scale(1.02); /* Agrandado sutil para el mosaico */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    z-index: 2;
}

.highlight-mag { 
    grid-column: span 2; 
    background: var(--purple-dark); 
    color: var(--bg-cream); 
}

/* --- BOTONES --- */
.mag-btn, .add-btn { 
    background: var(--purple-dark); 
    color: white; 
    padding: 15px 35px; 
    border: none; 
    font-weight: 800; 
    letter-spacing: 1px; 
    cursor: pointer; 
    transition: var(--transition-smooth); 
    border-radius: 50px; 
    font-size: 12px;
    text-transform: uppercase;
    display: inline-block;
}

.mag-btn:hover, .add-btn:hover { 
    background: var(--purple-main); 
    transform: scale(1.08); /* Botones resaltan más al tacto */
}

/* ==========================================================================
   RESTO DE ESTILOS (EDITORIAL Y FEEDBACK)
   ========================================================================== */

.disc-card.pink-glow { 
    background: linear-gradient(145deg, #ffe6f2, #fff5f9);
}

.img-frame { 
    height: 120px; 
    background: #fdfdfd;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 15px; 
    color: var(--purple-light); 
    font-size: 11px; 
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 15px; 
    background-size: cover;
    background-position: center;
}

.editorial-layout { 
    display: grid; 
    grid-template-columns: 220px 1fr; 
    gap: 50px; 
    margin-bottom: 60px; 
}

.side-title { 
    font-size: 2.5rem; 
    color: var(--purple-dark); 
    margin-bottom: 15px; 
    font-family: 'Playfair Display', serif;
}

.topic-box li { 
    list-style: none; 
    padding: 10px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.8); 
    font-weight: 600; 
    font-size: 13px; 
    color: var(--purple-main); 
}

.main-visual { 
    height: 450px; 
    background: var(--white); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--purple-light); 
    font-weight: bold; 
    margin-bottom: 25px; 
    border-radius: 25px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-spread h2 { 
    color: var(--purple-dark); 
    font-size: 3rem; 
    margin-bottom: 15px; 
    font-family: 'Playfair Display', serif; 
    line-height: 1.1;
}

.lead { 
    border-left: 4px solid var(--purple-main); 
    padding-left: 20px; 
    color: #555; 
    margin-bottom: 30px; 
    font-style: italic; 
}

.mq-feedback-section {
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    margin-top: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.mq-star-rating {
    font-size: 2rem;
    color: #ddd;
    display: flex;
    gap: 10px;
    margin: 20px 0;
    cursor: pointer;
}

.star.active { color: var(--gold); }

.mq-comment-box {
    width: 100%;
    min-height: 120px;
    border: 2px solid var(--bg-cream);
    border-radius: 20px;
    padding: 20px;
    font-family: inherit;
    background: #fafafa;
    margin-bottom: 20px;
    outline: none;
    transition: 0.3s;
}

.mq-comment-box:focus {
    border-color: var(--purple-light);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVIL)
   ========================================================================== */
@media (max-width: 768px) {
    .magazine-container {
        padding: 20px;
    }

    .discovery-section, 
    .editorial-layout, 
    .mosaico-articles {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .highlight-mag {
        grid-column: span 1 !important;
    }

    .mag-nav {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding: 15px 5px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .mag-nav a {
        font-size: 10px;
        flex: 0 0 auto;
    }

    .featured-spread h2 {
        font-size: 2.2rem;
    }

    .side-title {
        font-size: 2rem;
        text-align: center;
    }

    .main-visual {
        height: 300px !important;
    }

    .mag-btn {
        width: 100%;
        text-align: center;
    }

    .top-meta {
        font-size: 8px;
    }
}

/* --- FOOTER --- */
.feedback-banner { 
    background: var(--purple-dark); 
    color: var(--bg-cream); 
    padding: 60px 20px; 
    border-radius: 30px; 
    margin-top: 80px; 
    text-align: center;
}

.footer-end { 
    margin-top: 40px; 
    padding-bottom: 20px;
    text-align: center; 
    font-size: 10px; 
    color: var(--purple-main); 
    letter-spacing: 2px; 
    text-transform: uppercase;
}

/* ==========================================================================
   GLOBALS PARA COMPONENTES REPETIDOS
   ========================================================================== */
/* ==========================================================================
   TOP NAVBAR ESTRUCTURA EDITORIAL (ESTILO ALLURE)
   ========================================================================== */
.top-navbar-container {
    width: 100%;
    background: #F3E9E3;
    color: #270351;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(114, 65, 207, 0.1);
}

.top-navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 90px;
}

.nav-brand {
    flex-shrink: 0;
    margin-right: 40px;
}

.nav-brand a {
    text-decoration: none;
}

.main-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
    flex-grow: 1;
}

.nav-item-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-main-link {
    color: #270351;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-main-link:hover, .active-cat {
    color: #7241cf !important;
}

/* Mega Menu */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #F3E9E3;
    border-top: 1px solid rgba(114, 65, 207, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.nav-item-wrapper.has-mega-menu:hover .mega-menu-dropdown,
.nav-item-wrapper.has-mega-menu.mobile-dropdown-open .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.mega-menu-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 0;
    margin: 0;
}

.mega-menu-list a {
    color: #270351;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s;
    display: block;
    padding: 5px 0;
}

.mega-menu-list a:hover {
    color: #7241cf;
    padding-left: 5px;
}

/* Top nav search */
.nav-search-wrapper {
    display: flex;
    align-items: center;
}

.nav-search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 6px 15px;
    border: 1px solid rgba(114, 65, 207, 0.2);
}

.nav-search-input {
    background: transparent;
    border: none;
    outline: none !important;
    color: #270351;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    width: 150px;
    transition: width 0.3s ease;
}

.nav-search-input:focus {
    width: 220px;
    box-shadow: none !important;
}

.nav-search-btn {
    background: transparent;
    border: none;
    color: #7241cf;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    padding: 0;
}

.nav-search-btn:hover {
    color: #270351;
}

/* Ajustes Responsive unificados para componentes */
@media (max-width: 768px) {
    .top-navbar-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .nav-search-wrapper {
        width: 100%;
        order: 3;
    }
    
    .nav-search-form {
        width: 100%;
    }
    
    .nav-search-input {
        width: 100%;
    }
    
    .nav-search-input:focus {
        width: 100%;
    }

    .main-nav-links {
        width: 100%;
        order: 4;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
        padding-bottom: 10px;
    }
}