
:root {
    --orange: #8D2828;      /* Rojo Ibáñez */
    --crema: #FFF5E6;       /* Fondo Crema */
    --black: #1d1d1f;
    --light-gray: #F4F4F4;
    --white: #FFFFFF;
    --text-color: #333;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --primary-color: var(--orange);
    --text-muted: #666;
    --success-green: #00a650;
    --warning-yellow: #fff159;
    --info-blue: #3483fa;
    --cart-panel-width: 420px;
    --checkout-max-width: 1000px;
}

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

html {
    overflow-x: clip;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    padding-bottom: 0;
    overflow-x: clip;
    max-width: 100%;
}

body.menu-open {
    overflow: hidden; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

h1, h2, h3, h4, h5 { 
    font-family: var(--font-title); 
    font-weight: 700; 
}

a { 
    text-decoration: none; 
    color: inherit; 
}

img { 
    max-width: 100%; 
    display: block; 
}

/* --- UTILIDADES --- */
.visually-hidden {
    position: absolute !important; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px;
    overflow: hidden; 
    clip: rect(0,0,0,0); 
    white-space: nowrap; 
    border: 0;
}

/* --- SECCIONES GENÉRICAS --- */
.section { 
    padding: 4rem 0; 
}

.section-title { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 2.5rem; 
    position: relative; 
}

.section-title::after { 
    content: ''; 
    position: absolute; 
    bottom: -10px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 80px; 
    height: 4px; 
    background-color: var(--orange); 
    border-radius: 2px; 
}

.section-subtitle {
    text-align: center; 
    max-width: 600px; 
    margin: 0 auto 2.5rem; 
    font-size: 1.1rem; 
    color: #555;
    padding-top: 0.5rem;
}

/* --- ENCABEZADO DE SECCIÓN CON BOTÓN --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.section-header .section-title::after {
    display: none; 
}

.view-all-button {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--orange);
    background-color: var(--white);
    border: 2px solid var(--orange);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.view-all-button:hover {
    background-color: var(--orange);
    color: var(--white);
}

/* --- BOTONES GENÉRICOS --- */
.btn { 
    display: block; 
    width: 100%; 
    text-align: center; 
    padding: 1rem; 
    border: none; 
    border-radius: 50px; 
    font-size: 1.1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: background-color 0.2s, transform 0.2s; 
}

.btn-primary { 
    background-color: var(--orange); 
    color: var(--white); 
}

.btn-primary:hover { 
    background-color: #d94a1a; 
    transform: scale(1.02); 
}

.btn-google { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 0.75rem; 
    background-color: var(--white); 
    color: #333; 
    border: 1px solid #ddd; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.btn-google:hover { 
    background-color: #f9f9f9; 
}

.btn-google img { 
    width: 18px; 
    height: 18px; 
}

/* --- RESPONSIVE GLOBAL --- */
@media (max-width: 768px) {
    .section-title { 
        font-size: 2rem; 
    }
    .section { 
        padding: 3rem 0; 
    }
    .section-header {
        margin-bottom: 1.5rem;
    }
    .section-header .section-title {
        font-size: 1.5rem;
    }
    .view-all-button {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}
/* ============================================= */
/* ===== HEADER STYLES - Editorial Ibañez ===== */
/* ============================================= */

/* --- HEADER PRINCIPAL --- */
.main-header {
    background-color: var(--crema);
    color: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: none;
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* --- ESTILOS DEL LOGO CAMBIANTE --- */
.logo-container {
    position: relative;
    display: block;
    width: 60px;
    height: 60px;
}

.logo-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}

.logo-primary {
    opacity: 1;
    z-index: 2;
}

.logo-hover {
    opacity: 0;
    z-index: 1;
}

.logo-container:hover .logo-primary {
    opacity: 0;
}

.logo-container:hover .logo-hover {
    opacity: 1;
}

.logo-container.auto-switch .logo-primary {
    opacity: 0;
}

.logo-container.auto-switch .logo-hover {
    opacity: 1;
}

/* --- BARRA DE BÚSQUEDA --- */
.search-bar { 
    flex-grow: 1; 
    margin: 0 2rem; 
    position: relative; 
}

.search-bar input { 
    width: 100%; 
    padding: 0.75rem 1rem 0.75rem 2.5rem; 
    border-radius: 50px; 
    border: 1px solid var(--orange);
    font-family: var(--font-body); 
    font-size: 1rem; 
}

.search-bar .search-icon { 
    position: absolute; 
    left: 1rem; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--orange);
}

/* --- BOTONES DE MI CUENTA Y CARRITO --- */
.header-icons { 
    display: flex; 
    gap: 0.5rem; 
    align-items: center; 
}

.header-icons .desktop-icon,
.header-icons .account-menu > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--orange);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--orange);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.header-icons .desktop-icon:hover,
.header-icons .account-menu > a:hover {
    background-color: var(--orange);
    color: var(--white);
    border-color: var(--orange); 
}

.header-icons .icon { 
    width: 24px; 
    height: 24px; 
}

.mobile-menu-toggle { 
    display: none; 
    cursor: pointer; 
    background: none; 
    border: none; 
    color: var(--text-color); 
    padding: 0; 
}

.mobile-menu-toggle .icon { 
    width: 28px; 
    height: 28px; 
}

/* --- AVATAR EN HEADER (usuario logueado) --- */
.header-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.header-avatar-initials {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--orange);
    color: var(--white);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cuando está logueado el botón de cuenta se muestra diferente */
#header-account-btn.logged-in {
    border-color: var(--orange);
    background-color: var(--crema);
    font-weight: 600;
    gap: 0.4rem;
}

#header-account-btn.logged-in:hover {
    background-color: var(--orange);
    color: var(--white);
}

#header-account-btn.logged-in:hover .header-avatar-initials {
    background-color: var(--white);
    color: var(--orange);
}

/* --- MENÚ DE CUENTA Y DROPDOWN --- */
.account-menu {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    width: 220px;
    z-index: 1100;
    padding: 0.5rem 0;
    border: 1px solid #eee;
}

.account-menu:hover .dropdown-menu { 
    display: block; 
}

.dropdown-menu .dropdown-item { 
    color: var(--text-color); 
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.dropdown-item:hover { 
    background-color: var(--light-gray); 
}

.dropdown-divider { 
    height: 1px; 
    background-color: #eee; 
    margin: 0.5rem 0; 
}

.account-menu::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background-color: transparent;
}

/* --- NAVEGACIÓN PRINCIPAL --- */
.main-nav { 
    background-color: var(--orange);
    padding: 0;
    border-bottom: 4px solid #751d1d;
    position: relative; 
}

.main-nav ul { 
    list-style: none; 
    display: flex; 
    justify-content: center; 
    gap: 0;
    padding: 0; 
}

.main-nav > .container > ul > li > a {
    font-family: var(--font-title);
    font-weight: 600;
    padding: 1rem 1.5rem;
    position: relative;
    transition: all 0.3s;
    color: var(--white);
    display: block;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.main-nav > .container > ul > li:hover > a {
    background-color: var(--crema);
    color: var(--orange);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* --- MEGA MENÚ --- */
.mega-menu { 
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0; 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    background-color: var(--white); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
    padding: 2.5rem; 
    border-radius: 0 0 var(--border-radius) var(--border-radius); 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; 
    z-index: 999; 
    transform: translateY(-10px); 
}

.has-megamenu:hover .mega-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}

.mega-menu-content { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 2rem; 
}

.mega-menu-content.layout-with-image {
    grid-template-columns: repeat(3, 1fr) 1.5fr; 
    align-items: start;
}

.mega-menu-column h5 { 
    color: #888; 
    font-size: 0.9rem; 
    margin-bottom: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.mega-menu-column h4 { 
    font-size: 1rem; 
    margin-bottom: 1rem; 
}

.mega-menu-column ul { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 0.8rem; 
    padding: 0; 
}

.mega-menu-column a { 
    font-family: var(--font-body); 
    font-size: 0.95rem; 
    font-weight: 400; 
}

.mega-menu-column a:hover { 
    color: var(--orange); 
}

.mega-menu-column.promo-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-column.promo-image a {
    display: block;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mega-menu-column.promo-image a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.mega-menu-column.promo-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- MENÚ MÓVIL --- */
#menu-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    z-index: 1998; 
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s; 
}

#menu-overlay.open { 
    opacity: 1; 
    visibility: visible; 
}

#mobile-nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 85%; 
    max-width: 320px; 
    height: 100%; 
    background-color: var(--white); 
    z-index: 1999; 
    transform: translateX(-100%); 
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    display: flex; 
    flex-direction: column; 
}

#mobile-nav.open { 
    transform: translateX(0); 
}

.mobile-nav-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 1.2rem; 
    border-bottom: 1px solid var(--light-gray); 
}

.mobile-nav-header h4 { 
    font-size: 1.5rem; 
}

#close-menu-btn { 
    background: none; 
    border: none; 
    cursor: pointer; 
    color: var(--text-color); 
    padding: 0; 
}

.mobile-nav-body {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.mobile-nav-link { 
    display: flex; 
    align-items: center; 
    padding: 0.8rem 0.5rem; 
    font-size: 1.1rem; 
    font-weight: bold; 
    color: var(--text-color); 
    border-radius: 8px; 
    transition: background-color 0.2s; 
}

.mobile-nav-link:hover { 
    background-color: var(--light-gray); 
}

.mobile-nav-link i { 
    margin-right: 1rem; 
    width: 24px; 
    height: 24px; 
    color: #555; 
}

.mobile-nav-link.main-category { 
    justify-content: space-between; 
    font-size: 1.2rem; 
}

.mobile-nav-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    background: #f6f1ea;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.mobile-search-bar i {
    width: 18px;
    height: 18px;
    color: #888;
    flex-shrink: 0;
}

.mobile-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
    color: var(--text-color);
}

.mobile-search-results {
    display: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
}

.mobile-search-results.active {
    display: block;
}

.mobile-nav-badge {
    margin-left: auto;
    background: var(--orange, #8D2828);
    color: #fff;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    padding: 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    background-color: var(--white);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-nav-sub {
    transform: translateX(100%);
    z-index: 2;
    box-shadow: -10px 0 24px rgba(0, 0, 0, 0.06);
}

.mobile-nav-sub.is-active {
    transform: translateX(0);
}

.mobile-nav-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.25rem 0.9rem;
    margin-bottom: 0.5rem;
    background: none;
    border: none;
    border-bottom: 1px solid #eee;
    font-family: var(--font-title, 'Montserrat', sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-nav-back i {
    width: 22px;
    height: 22px;
    color: var(--orange, #8D2828);
}

.mobile-cat-list {
    display: flex;
    flex-direction: column;
}

.mobile-cat-link {
    display: block;
    padding: 0.85rem 0.5rem;
    font-size: 1.02rem;
    color: var(--text-color);
    border-bottom: 1px solid #f2f2f2;
    transition: background-color 0.2s;
}

.mobile-cat-link:last-child {
    border-bottom: none;
}

.mobile-cat-link:hover {
    background-color: var(--light-gray);
    border-radius: 6px;
}

.mobile-cat-link.submenu-muted {
    color: #999;
    font-style: italic;
    border-bottom: none;
}

.mobile-cat-link.mobile-cat-featured {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- BUSCADOR INTERACTIVO --- */
#search-results-container {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #EAEAEA;
    z-index: 1001;
    max-height: 500px;
    overflow-y: auto;
}

#search-results-container.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

.search-result-item:last-of-type {
    border-bottom: none;
}

.search-result-image {
    flex-shrink: 0;
    width: 50px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-result-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.search-result-name {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--black);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-author {
    font-size: 0.85rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-pricing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.search-result-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
}

.search-result-price {
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.95rem;
}

.search-results-footer {
    display: block;
    text-align: center;
    padding: 1rem;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--orange);
    background-color: #fafafa;
    border-top: 1px solid #eee;
}

.search-results-footer:hover {
    background-color: #f5f5f5;
    text-decoration: underline;
}

.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: #888;
}

.search-no-results i {
    width: 32px;
    height: 32px;
    color: #ccc;
}

.search-no-results span {
    font-weight: 500;
    color: #666;
}

.search-no-results small {
    font-size: 0.85rem;
    color: #999;
}

.search-loading {
    padding: 2rem;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

/* --- RESPONSIVE HEADER --- */
@media (max-width: 992px) {
    .header-icons .desktop-icon,
    .header-icons .account-menu {
        display: none;
    }
    .header-icons #wishlist-menu { display: none !important; }
    .header-icons #notification-menu { display: flex; }
    .header-icons #notification-menu .desktop-icon { display: inline-flex; }
    .main-nav {
        display: none;
    }

    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .logo, .logo-container {
        flex-basis: auto;
        flex-shrink: 0;
    }

    .search-bar {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        order: 0;
    }

    .search-bar input {
        padding: 0.5rem 0.5rem 0.5rem 2.2rem;
        font-size: 0.9rem;
        height: 40px;
        width: 100%;
    }

    .search-bar .search-icon {
        left: 0.8rem;
        width: 16px;
        height: 16px;
    }

    .header-icons {
        flex-basis: auto;
        justify-content: flex-end;
        width: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .logo, .logo-container {
        width: 45px;
        height: 45px;
    }

    .search-bar input {
        font-size: 0.85rem;
        height: 38px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
    }
}
/* ============================================= */
/* ===== HOME PAGE STYLES - Editorial Ibañez === */
/* ============================================= */

/* --- HERO SLIDER --- */
.hero-slider { 
    position: relative; 
    width: 100%; 
    overflow: hidden; 
}

.hero-slide { 
    display: none; 
    width: 100%; 
}

.hero-slide.active { 
    display: block; 
    animation: fadeIn 0.8s ease-in-out; 
}

@keyframes fadeIn { 
    from { opacity: 0.7; } 
    to { opacity: 1; } 
}

.hero-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slider-nav { 
    position: absolute; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 10px; 
}

.slider-dot { 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background-color: rgba(255, 255, 255, 0.5); 
    cursor: pointer; 
    transition: background-color 0.3s; 
    border: 1px solid rgba(0,0,0,0.2); 
}

.slider-dot.active { 
    background-color: var(--orange); 
}

/* --- TOP 10 NOVEDADES - NETFLIX STYLE --- */
.section-top10 {
    padding-bottom: 3rem;
    overflow: hidden;
}

.top10-carousel {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Peek effect - show partial item */
    padding-left: 5%;
    padding-right: 15%;
    margin-left: -5%;
    margin-right: -15%;
    /* Ocultar scrollbar completamente */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Ocultar scrollbar en Chrome/Safari */
.top10-carousel::-webkit-scrollbar {
    display: none;
}

.top10-track {
    display: flex;
    gap: 0;
    padding: 1rem 0 2rem;
}

.top10-skeleton {
    pointer-events: none;
}

.top10-skeleton .top10-image {
    box-shadow: none;
}

.sk-shimmer {
    background-image: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: skShimmer 1.4s ease infinite;
}

.top10-skeleton .top10-info {
    padding: 0 4px;
}

.sk-line {
    height: 12px;
    border-radius: 4px;
    margin: 8px 0;
}

.sk-line--sm {
    width: 60%;
}

@keyframes skShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.top10-feed-msg {
    width: 100%;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #666;
}

.top10-retry {
    margin-top: 0.75rem;
    padding: 0.55rem 1.25rem;
    border: none;
    border-radius: 6px;
    background: #8d2828;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.top10-item {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    width: 220px;
    height: 320px;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s ease;
}

.top10-item:hover {
    transform: translateY(-8px);
}

/* Número grande estilo Netflix */
.top10-number {
    font-family: 'Poppins', sans-serif;
    font-size: 180px;
    font-weight: 900;
    line-height: 0.8;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
    -webkit-text-stroke: 3px currentColor;
    text-stroke: 3px currentColor;
    color: transparent;
    opacity: 0.9;
    user-select: none;
}

/* Colores de branding para los números */
.top10-item.brand-ibanez .top10-number {
    -webkit-text-stroke-color: #8D2828;
    text-stroke-color: #8D2828;
}

.top10-item.brand-skepsi .top10-number {
    -webkit-text-stroke-color: #1A146C;
    text-stroke-color: #1A146C;
}

/* Card del libro */
.top10-card {
    position: relative;
    z-index: 2;
    width: 140px;
    margin-left: 70px; /* Más espacio para que no tape el número */
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    padding-bottom: 0.5rem;
}

.top10-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
}

.top10-tag.tag-oferta {
    background: linear-gradient(135deg, #e53935, #c62828);
    color: white;
}

.top10-tag.tag-novedad {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    color: white;
}

.top10-tag.tag-personalizado {
    background: linear-gradient(135deg, #8d2828, #5e1a1a);
    color: white;
}

.top10-item--rec .top10-card {
    box-shadow: 0 0 0 2px rgba(141, 40, 40, 0.18);
}

.top10-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #f5f5f5;
}

.top10-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.top10-item:hover .top10-image img {
    transform: scale(1.05);
}

.top10-info {
    padding: 0.5rem;
    background: white;
}

.top10-title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.3;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top10-author {
    font-size: 0.75rem;
    color: #666;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top10-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
}

.top10-old-price {
    font-size: 0.68rem;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

.top10-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
}

/* Responsive Top 10 */
@media (max-width: 992px) {
    .top10-item {
        width: 180px;
        height: 280px;
    }
    
    .top10-number {
        font-size: 140px;
    }
    
    .top10-card {
        width: 120px;
        margin-left: 50px;
    }
    
    .top10-image {
        height: 170px;
    }
}

@media (max-width: 576px) {
    .top10-carousel {
        padding-left: 4%;
        padding-right: 20%;
        margin-left: -4%;
        margin-right: -20%;
    }
    
    .top10-item {
        width: 160px;
        height: 250px;
    }
    
    .top10-number {
        font-size: 120px;
    }
    
    .top10-card {
        width: 110px;
        margin-left: 40px;
    }
    
    .top10-image {
        height: 150px;
    }
    
    .top10-title {
        font-size: 0.8rem;
    }
    
    .top10-author {
        font-size: 0.7rem;
    }
    
    .top10-price {
        font-size: 0.85rem;
    }
}

/* --- SECCIÓN DE VIDEO CLIPS --- */
.section-clips {
    background-color: #f9f9f9;
}

.section-clips .swiper {
    width: 100%;
    overflow: hidden;
}

#clips-grid {
    display: flex;
    align-items: flex-start;
    min-height: 620px;
}

#clips-grid .swiper-slide {
    position: relative;
}

/* Fallback layout antes de que Swiper inicialice (o si falla la carga).
   Cuando Swiper está activo, él controla ancho y espaciado (spaceBetween),
   por eso no aplicamos gap/flex aquí: evita doble espaciado y recortes. */
#clips-swiper:not(.swiper-initialized) #clips-grid {
    gap: 15px;
}

#clips-swiper:not(.swiper-initialized) #clips-grid .swiper-slide {
    flex: 0 0 80%;
}

#top10-track {
    min-height: 300px;
}

.video-clip-container {
    position: relative;
    aspect-ratio: 9 / 16;
    background-color: #e9e9e9;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.clip-thumbnail, 
.clip-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-thumbnail { 
    z-index: 3; 
    transition: opacity 0.4s ease; 
}

.clip-video { 
    z-index: 1; 
}

.clip-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 1.5rem 1rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 4;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.play-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-clip-container:not(.is-playing):hover .play-overlay,
.video-clip-container.is-paused .play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px; 
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    color: var(--orange);
}

.sound-control {
    position: absolute;
    bottom: 12px; 
    right: 12px;
    width: 32px; 
    height: 32px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.video-clip-container.is-playing .sound-control { 
    opacity: 1; 
}

.video-clip-container.is-playing .clip-thumbnail,
.video-clip-container.is-playing .clip-title,
.video-clip-container.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.video-clip-container.is-paused:not(:hover) .play-overlay { 
    opacity: 0; 
}

/* --- Navegación del Carrusel --- */
.clips-navigation { 
    display: none; 
    gap: 0.5rem; 
}

.swiper-button-next, 
.swiper-button-prev {
    position: static;
    margin: 0;
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 50%;
    color: var(--orange);
    transition: background-color 0.2s, color 0.2s;
}

.swiper-button-next:hover, 
.swiper-button-prev:hover {
    background-color: var(--orange);
    color: var(--white);
}

.swiper-button-next::after, 
.swiper-button-prev::after { 
    font-size: 1rem; 
    font-weight: 800; 
}

@media (min-width: 769px) {
    #clips-grid {
        min-height: 700px;
    }
    #clips-swiper:not(.swiper-initialized) #clips-grid {
        gap: 24px;
    }
    #clips-swiper:not(.swiper-initialized) #clips-grid .swiper-slide {
        flex: 0 0 calc((100% - 48px) / 3);
    }
    #top10-track {
        min-height: 380px;
    }
    .clips-navigation {
        display: flex;
    }
}

/* --- BARRA DE NAVEGACIÓN INFERIOR (móvil) --- */
.bottom-nav { display: none; }

@media (max-width: 992px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        align-items: flex-end;
        justify-content: space-around;
        background: #fff;
        border-top: 1px solid #ececec;
        box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.06);
        padding: 0.4rem 0.25rem;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    }
    .bottom-nav .bottom-nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        flex: 1;
        background: none;
        border: none;
        cursor: pointer;
        text-decoration: none;
        color: #7a7a7a;
        font-family: var(--font-body, 'Poppins', sans-serif);
        font-size: 0.66rem;
        font-weight: 600;
        padding: 0.25rem 0;
    }
    .bottom-nav .bottom-nav-item i { width: 23px; height: 23px; }
    .bottom-nav .bottom-nav-item.active { color: var(--primary-color, #8d2828); }
    .bottom-nav .bottom-nav-cart-circle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        margin-top: -22px;
        border-radius: 50%;
        background: var(--primary-color, #8d2828);
        box-shadow: 0 6px 16px rgba(141, 40, 40, 0.4);
    }
    .bottom-nav .bottom-nav-cart-circle i { width: 24px; height: 24px; color: #fff; }
    .bnav-cart-count {
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1;
    }
    .bottom-nav-badge {
        position: absolute;
        top: -2px;
        right: calc(50% - 22px);
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--orange, #8d2828);
        color: #fff;
        font-size: 0.62rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    body.has-buy-bar .bottom-nav { display: none; }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .liliana-root { bottom: calc(74px + env(safe-area-inset-bottom)) !important; }
}

/* --- BARRA DE COMPRA FIJA (solo móvil) --- */
#mobile-buy-bar { display: none; }

@media (max-width: 992px) {
    #mobile-buy-bar {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        padding: 0.6rem 0.9rem;
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid #eaeaea;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    }
    .mbb-info { display: flex; align-items: center; min-width: 0; background: #faf6ef; border: 1px solid #e7dcc8; border-radius: 12px; padding: 0.32rem 0.6rem; cursor: pointer; }
    .mbb-info-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; text-align: left; }
    .mbb-label { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; color: #8d2828; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; min-width: 0; }
    .mbb-label #mobile-buy-format { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mbb-chevron { width: 14px; height: 14px; color: #8d2828; flex-shrink: 0; animation: mbbNudge 1.6s ease-in-out infinite; }
    @keyframes mbbNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
    .mbb-price { font-size: 1.15rem; font-weight: 800; color: var(--text-color); white-space: nowrap; }
    .mbb-actions { display: flex; gap: 0.5rem; margin-left: auto; flex-shrink: 0; }
    .mbb-btn { border: none; border-radius: 10px; font-weight: 700; cursor: pointer; font-family: var(--font-body, 'Poppins', sans-serif); }
    .mbb-cart { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; background: #f3ede2; color: #8d2828; }
    .mbb-cart i { width: 20px; height: 20px; }
    .mbb-buy { padding: 0 1.3rem; height: 46px; background: var(--orange, #8d2828); color: #fff; font-size: 0.98rem; }
    body.has-buy-bar { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    body.has-buy-bar .liliana-root { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}

#cart-buy-bar, #checkout-buy-bar { display: none; }
@media (max-width: 992px) {
    body.has-buy-bar #cart-buy-bar,
    body.has-buy-bar #checkout-buy-bar {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1210;
        padding: 0.6rem 0.9rem;
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
        background: #fff;
        border-top: 1px solid #eaeaea;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    }
    .cbb-info { display: flex; align-items: center; gap: 0.4rem; min-width: 0; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
    .cbb-info-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
    .cbb-count { font-size: 0.72rem; color: #888; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
    .cbb-total { font-size: 1.2rem; font-weight: 800; color: var(--text-color); white-space: nowrap; }
    .cbb-chevron { width: 18px; height: 18px; color: #8d2828; flex-shrink: 0; transition: transform 0.25s ease; }
    body.cart-summary-open .cbb-chevron { transform: rotate(180deg); }
    .cbb-btn { margin-left: auto; flex-shrink: 0; border: none; border-radius: 10px; height: 46px; padding: 0 1.5rem; background: var(--orange, #8d2828); color: #fff; font-weight: 700; font-size: 0.98rem; cursor: pointer; font-family: var(--font-body, 'Poppins', sans-serif); }

    body.has-buy-bar .cart-summary-column,
    body.has-buy-bar .checkout-summary-column {
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(58px + env(safe-area-inset-bottom));
        z-index: 1205;
        max-height: 75vh;
        overflow-y: auto;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
        transform: translateY(calc(100% + 70px + env(safe-area-inset-bottom)));
        transition: transform 0.28s ease;
        margin: 0;
        padding: 0.5rem 0.75rem 1rem;
    }
    body.has-buy-bar.cart-summary-open .cart-summary-column,
    body.has-buy-bar.cart-summary-open .checkout-summary-column { transform: translateY(0); }
    body.has-buy-bar .cart-summary-column .cart-summary-card,
    body.has-buy-bar .checkout-summary-column .cart-summary-card { box-shadow: none; border: none; border-radius: 0; background: transparent; margin: 0; padding: 0.5rem 0; }
    body.has-buy-bar .cart-summary-column #btn-continue-checkout { display: none; }
}

.cart-summary-overlay { display: none; }
@media (max-width: 992px) {
    .cart-summary-overlay { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 1201; opacity: 0; visibility: hidden; transition: opacity 0.25s ease; }
    body.cart-summary-open .cart-summary-overlay { opacity: 1; visibility: visible; }
}

/* --- BOTTOM-SHEET DE FORMATO (solo móvil) --- */
.format-sheet { display: none; }

@media (max-width: 992px) {
    .format-sheet.open { display: block; }
    .format-sheet-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 10040;
    }
    .format-sheet-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10041;
        background: #fff;
        border-radius: 16px 16px 0 0;
        padding: 0.5rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.15);
        animation: sheet-up 0.25s ease;
    }
    @keyframes sheet-up {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .format-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.6rem 0.25rem 0.8rem;
        font-weight: 700;
        font-family: var(--font-title, 'Montserrat', sans-serif);
        font-size: 1.05rem;
    }
    .format-sheet-close { background: none; border: none; cursor: pointer; color: #777; padding: 0; }
    .format-sheet-options { display: flex; flex-direction: column; gap: 0.6rem; }
    .fsheet-option {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        padding: 0.85rem 1rem;
        border: 1.5px solid #eaeaea;
        border-radius: 12px;
        background: #fff;
        cursor: pointer;
        text-align: left;
        width: 100%;
    }
    .fsheet-option.active { border-color: var(--primary-color, #8d2828); background: #faf4f4; }
    .fsheet-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: #f3ede2;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #8d2828;
        flex-shrink: 0;
    }
    .fsheet-icon i { width: 20px; height: 20px; }
    .fsheet-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
    .fsheet-name { font-weight: 700; color: var(--text-color); }
    .fsheet-note { font-size: 0.78rem; color: #888; }
    .fsheet-price { font-weight: 800; color: var(--primary-color, #8d2828); white-space: nowrap; }

    .product-right-column .format-selector { display: none; }
    .product-right-column .btn-buy,
    .product-right-column .btn-buy-now { display: none; }
}
/* ================================================= */
/* ===== PRODUCT STYLES - Editorial Ibañez ===== */
/* ================================================= */

/* --- GRID DE PRODUCTOS --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* --- TARJETA DE PRODUCTO --- */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* --- ÁREA DE IMAGEN --- */
.product-image {
    position: relative;
    background-color: var(--white);
    padding: 0.5rem; 
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-image .img-primary,
.product-image .img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
    backface-visibility: hidden;
}

.product-image .img-hover {
    opacity: 0;
}

.product-card:hover .product-image .img-primary {
    opacity: 0;
}

.product-card:hover .product-image .img-hover {
    opacity: 1;
}

/* --- ETIQUETAS DE DESCUENTO Y ESTADO --- */
.discount-tag, 
.status-tag {
    position: absolute;
    color: var(--white);
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-title);
    border-radius: 6px;
    z-index: 2;
}

.discount-tag {
    top: 12px;
    right: 12px;
    background-color: var(--orange);
}

.status-tag {
    top: 12px;
    left: 12px;
    background-color: #007bff;
}

.status-tag.recommended {
    background-color: #6f42c1;
}

/* --- ÁREA DE INFORMACIÓN --- */
.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.product-info > *:last-child {
    margin-top: auto;
}

.product-name {
    font-size: 0.95rem; 
    font-weight: 500;
    line-height: 1.4;
    /* min-height: 40px; -> Reemplazado por altura fija calculada para elipsis */
    height: 3em;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-author {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 8px;
    display: block;
    line-height: 1.3;
    /* Truncar con puntos suspensivos */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- PRECIOS --- */
.price-section {
    margin-bottom: 0.5rem;
    padding-top: 0.5rem;
}

.old-price {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
    display: block;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--black);
}

.installments-info {
    font-size: 0.85rem;
    color: #333;
    margin-top: 2px;
}

/* --- ESPACIADOR --- */
.product-info .spacer {
    display: none;
}

/* --- ENVÍO GRATIS --- */
.shipping-info {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.shipping-info .shipping-icon {
    width: 20px;
    height: 20px;
    stroke: var(--orange);
}

/* --- BOTÓN WISHLIST --- */
.wishlist-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--white);
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wishlist-btn:hover {
    transform: scale(1.1);
}

.wishlist-btn i {
    width: 18px;
    height: 18px;
    color: #ccc;
    transition: all 0.3s ease;
}

.wishlist-btn.active i {
    fill: var(--orange);
    color: var(--orange);
}

/* --- CORAZONES FLOTANTES --- */
.floating-heart {
    position: absolute;
    width: 16px; 
    height: 16px;
    color: var(--orange);
    fill: var(--orange);
    pointer-events: none;
    z-index: 20;
    opacity: 0;
}

@keyframes floatUpFade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) translateX(0);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.2) translateX(var(--tx));
    }
}

/* --- BANNERS DE CATEGORÍA --- */
.category-banner {
    border-radius: var(--border-radius);
    margin: 0 auto 2.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.category-banner:hover {
    transform: scale(1.02);
}

/* --- VER MÁS --- */
.view-more-container {
    text-align: center;
    margin-top: 3rem;
}

.view-more-button {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    background-color: var(--orange);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--font-title);
    transition: background-color 0.3s, transform 0.3s;
}

.view-more-button:hover {
    background-color: #d94a1a;
    transform: scale(1.05);
}

/* --- RESPONSIVE PRODUCTOS --- */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
/* ============================================= */
/* ===== FOOTER STYLES - Editorial Ibañez ===== */
/* ============================================= */

.new-main-footer {
    background-color: #FFF5E6;
    color: #333;
    padding: 4rem 0 1.5rem;
    border-top: 1px solid #EAEAEA;
}

.new-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.new-footer-column h4 {
    font-family: var(--font-title);
    color: #8D2828;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.new-footer-column ul {
    list-style: none;
    padding: 0;
}

.new-footer-column ul li {
    margin-bottom: 0.75rem;
}

.new-footer-column ul a {
    color: #555;
    font-family: var(--font-body);
    font-weight: 500;
    transition: color 0.2s;
}

.new-footer-column ul a:hover {
    color: var(--orange);
}

/* --- Lista de Ubicaciones --- */
.locations-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.locations-list i {
    width: 16px;
    height: 16px;
    color: var(--orange);
}

/* --- Separadores --- */
.footer-divider {
    border: none;
    border-top: 1px solid #EAEAEA;
    margin: 2rem 0;
}

/* --- Fila del Logo y Redes --- */
.new-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo img {
    height: 35px;
    width: auto;
    opacity: 0.8;
}

.footer-social-icons {
    display: flex;
    gap: 0.75rem;
}

.footer-social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    color: #888;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.footer-social-icons a:hover {
    color: var(--orange);
    border-color: var(--orange);
    transform: translateY(-2px);
}

/* --- Copyright y Legales --- */
.new-footer-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.footer-legal-links a {
    color: #888;
    margin: 0 0.5rem;
    text-decoration: underline;
}

.footer-legal-links a:hover {
    color: var(--orange);
}

/* --- UBICACIONES EN PC --- */
@media (min-width: 769px) {
    .locations-list {
        column-count: 2;
        column-gap: 1.5rem;
    }

    .locations-list li {
       break-inside: avoid;
    }
    
    .locations-list a {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
}

/* --- ACORDEÓN MÓVIL --- */
@media (max-width: 768px) {
    .new-footer-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .new-footer-column {
        border-bottom: 1px solid #EAEAEA;
        min-width: 0;
    }

    .new-footer-column:last-of-type {
        border-bottom: none;
    }

    .new-footer-column ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
        padding: 0 1rem;
    }

    .new-footer-column h4 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 1rem 0;
        margin: 0;
    }

    .new-footer-column h4::after {
        content: '';
        display: inline-block;
        width: 18px;
        height: 18px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23F35820' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-down'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-size: contain;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .new-footer-column.active ul {
        max-height: 80vh;
        padding: 0.5rem 1rem 1.5rem;
        overflow-y: auto;
    }

    .new-footer-column.active h4::after {
        transform: rotate(180deg);
    }

    .new-footer-bottom,
    .new-footer-sub {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        flex-wrap: wrap;
    }

    .locations-list a,
    .locations-list li {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .locations-list li {
       break-inside: avoid;
    }
}
/* ============================================= */
/* ===== MODAL STYLES - Editorial Ibañez ===== */
/* ============================================= */

.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 2000; 
    display: none; 
    align-items: center;
    justify-content: center; 
    padding: 1rem;
}

.modal.open { 
    display: flex; 
}

.modal-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
}

.modal-content { 
    position: relative; 
    background-color: var(--white); 
    border-radius: var(--border-radius); 
    width: 100%; 
    max-width: 450px; 
    z-index: 2001; 
    animation: slide-down 0.3s ease-out; 
    display: flex; 
    flex-direction: column;
    max-height: 95vh;
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.25rem 1.5rem; 
    border-bottom: 1px solid #eee; 
}

.modal-header h3 { 
    font-size: 1.25rem; 
    margin: 0; 
}

.modal-close { 
    background: none; 
    border: none; 
    font-size: 2rem; 
    line-height: 1; 
    color: #888; 
    cursor: pointer; 
}

.modal-body { 
    padding: 1.5rem 1.5rem 1.25rem;
    overflow-y: auto; 
}

.modal-footer { 
    padding: 1.25rem 1.5rem; 
    text-align: center; 
    background-color: var(--light-gray); 
    border-top: 1px solid #eee; 
    border-radius: 0 0 var(--border-radius) var(--border-radius); 
}

.modal-footer a { 
    color: var(--orange); 
    font-weight: 700; 
    text-decoration: underline; 
}

@keyframes slide-down { 
    from { 
        transform: translateY(-30px); 
        opacity: 0; 
    } 
    to { 
        transform: translateY(0); 
        opacity: 1; 
    } 
}

/* --- FORMULARIOS --- */
.form-group { 
    margin-bottom: 1rem; 
}

.form-group label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 700; 
    font-size: 0.9rem;
}

.form-control { 
    width: 100%; 
    padding: 0.8rem 1rem; 
    border: 1px solid #ccc; 
    border-radius: 8px; 
    font-size: 1rem; 
    font-family: var(--font-body); 
}

.form-help { 
    text-align: right; 
    font-size: 0.9rem; 
    margin-top: -0.5rem; 
    margin-bottom: 1.5rem; 
}

.form-help a { 
    color: var(--orange); 
    text-decoration: underline; 
}

.form-row { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 1rem; 
}

.form-row .form-group { 
    flex: 1; 
    min-width: 150px; 
}

/* --- SEPARADOR --- */
.separator { 
    display: flex; 
    align-items: center; 
    text-align: center; 
    color: #aaa; 
    margin: 1.5rem 0; 
}

.separator::before,
.separator::after { 
    content: ''; 
    flex: 1; 
    border-bottom: 1px solid #eee; 
}

.separator:not(:empty)::before { 
    margin-right: .5em; 
}

.separator:not(:empty)::after { 
    margin-left: .5em; 
}

/* --- VISTAS LOGIN/REGISTER --- */
.register-view,
.registration-fields {
    display: none;
}

.modal-content.show-register .register-view,
.modal-content.show-register .registration-fields {
    display: block;
}

.modal-content.show-register .login-view {
    display: none;
}

/* --- Vista recuperar contraseña (Firebase Auth) --- */
.modal-header .reset-password-view,
.reset-password-panel,
.modal-footer .reset-password-view {
    display: none;
}

.modal-content.show-reset-password .reset-password-view,
.modal-content.show-reset-password .reset-password-panel {
    display: block;
}

.modal-content.show-reset-password .modal-header .login-view,
.modal-content.show-reset-password .modal-header .register-view {
    display: none !important;
}

.modal-content.show-reset-password #auth-form,
.modal-content.show-reset-password .modal-footer .login-view,
.modal-content.show-reset-password .modal-footer .register-view {
    display: none;
}

.modal-content.show-reset-password .modal-footer .reset-password-view {
    display: block;
}

.reset-password-intro {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.45;
    margin-bottom: 1rem;
}

/* ============================================= */
/* ===== CAROUSEL STYLES - Editorial Ibañez ===== */
/* ============================================= */

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.carousel-track {
    display: flex;
    gap: 32px; /* Mismo gap que el grid normal */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 20px; /* Espacio para scrollbar si aparece */
    scrollbar-width: none; /* Firefox */
    align-items: stretch; /* Estira las tarjetas para tener altura uniforme */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-track .product-card {
    width: 260px; /* Ancho fijo para todas las cards */
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
}

.carousel-nav-buttons {
    display: flex;
    gap: 10px;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: var(--white);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: var(--orange);
    color: var(--white);
    border-color: var(--orange);
    transform: scale(1.05);
}

.carousel-prev i,
.carousel-next i {
    width: 20px;
    height: 20px;
}

.section-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-color);
    text-decoration: none;
}

.section-title-link i {
    width: 22px;
    height: 22px;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

.section-title-link:hover i {
    transform: translateX(3px);
}

.section-title-link:hover .section-title {
    color: var(--primary-color);
}

/* Responsive Carousel */
@media (max-width: 1200px) {
    .carousel-track .product-card {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }
}

@media (max-width: 900px) {
    .carousel-track .product-card {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
    }
}

@media (max-width: 600px) {
    .carousel-track .product-card {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
    .carousel-track {
        gap: 16px;
    }
}

/* ================================================= */
/* ===== PRODUCT PAGE STYLES - Editorial Ibañez ==== */
/* ================================================= */

/* --- BRAND COLORS (Dynamic) --- */
.brand-ibanez {
    --brand-color: #8D2828;
    --brand-color-light: #a83333;
    --brand-color-dark: #751d1d;
    --brand-gradient: linear-gradient(135deg, #8D2828 0%, #a83333 100%);
}

.brand-skepsi {
    --brand-color: #1A146C;
    --brand-color-light: #2a2490;
    --brand-color-dark: #12104d;
    --brand-gradient: linear-gradient(135deg, #1A146C 0%, #2a2490 100%);
}

/* --- PRODUCT PAGE LAYOUT --- */
.product-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
    background-color: var(--white);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--brand-color);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #999;
}

/* 3-Column Layout */
.product-layout {
    display: grid;
    grid-template-columns: 320px 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}

/* --- LEFT COLUMN - Cover & Author --- */
.product-left-column {
    position: sticky;
    top: 100px;
}

.product-cover-wrapper {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.product-cover-image {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Preview Buttons */
.product-actions-preview {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--brand-color);
    background-color: var(--white);
    color: var(--brand-color);
}

.btn-preview:hover {
    background-color: var(--brand-color);
    color: var(--white);
}

.btn-preview i {
    width: 18px;
    height: 18px;
}

.btn-preview-secondary {
    border-color: #ddd;
    color: #555;
}

.btn-preview-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Author Card */
.author-card {
    background-color: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.author-card-title {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.author-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-color);
}

.author-info {
    flex: 1;
}

.author-name {
    display: block;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    color: var(--brand-color);
    margin-bottom: 0.5rem;
}

.author-name:hover {
    text-decoration: underline;
}

.btn-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--brand-color);
    background-color: transparent;
    color: var(--brand-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-follow:hover {
    background-color: var(--brand-color);
    color: var(--white);
}

.btn-follow.is-following {
    background-color: var(--brand-color);
    color: var(--white);
}

.btn-follow.is-following:hover {
    background-color: transparent;
    color: var(--brand-color);
}

.btn-follow:disabled {
    opacity: 0.55;
    cursor: progress;
}

.btn-follow i {
    width: 14px;
    height: 14px;
}

/* --- CENTER COLUMN - Product Info --- */
.product-center-column {
    padding-top: 0.5rem;
}

.product-title {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.product-format-label {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
}

.product-format-label .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.author-link {
    color: var(--brand-color);
}

.author-link:hover {
    text-decoration: underline;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars .star {
    width: 18px;
    height: 18px;
    color: #ffc107;
    fill: #ffc107;
}

.stars .star.half {
    fill: url(#half-gradient);
}

.rating-score {
    font-weight: 700;
    color: var(--black);
}

.rating-count {
    color: var(--brand-color);
    font-size: 0.9rem;
}

.rating-count:hover {
    text-decoration: underline;
}

/* Description */
.product-description {
    margin-bottom: 1.5rem;
}

.short-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.full-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.full-description.collapsed {
    max-height: 0;
}

.full-description.expanded {
    max-height: 500px;
}

.full-description p {
    margin: 0 0 0.85rem;
}
.full-description p:last-child {
    margin-bottom: 0;
}
.full-description strong {
    color: var(--text-color);
    font-weight: 700;
}
.full-description em {
    font-style: italic;
}
.full-description a {
    color: var(--brand-color);
    text-decoration: underline;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--brand-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.btn-read-more:hover {
    text-decoration: underline;
}

.btn-read-more i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.btn-read-more.expanded i {
    transform: rotate(180deg);
}

/* Topics */
.product-topics {
    margin-bottom: 1.5rem;
}

.topic-label {
    font-size: 0.85rem;
    color: #888;
    margin-right: 0.5rem;
}

.topics-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: rgba(141, 40, 40, 0.1);
    color: var(--brand-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.brand-skepsi .topic-tag {
    background-color: rgba(26, 20, 108, 0.1);
}

/* Info Widgets */
.info-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    justify-content: center;
}

.info-widget {
    flex: 1 1 calc(25% - 0.5rem);
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.widget-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--brand-color);
}

.widget-icon i {
    width: 24px;
    height: 24px;
}

.widget-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.widget-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
}

.link-all-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.link-all-details:hover {
    text-decoration: underline;
}

.link-all-details i {
    width: 16px;
    height: 16px;
}

/* --- RECOMMENDED SECTION --- */
.recommended-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.recommended-carousel-container {
    margin-bottom: 3rem;
}

.recommended-carousel-container .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 1rem;
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
    color: var(--black);
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.carousel-btn.prev-btn {
    left: -20px;
}

.carousel-btn.next-btn {
    right: -20px;
}

.recommended-card {
    min-width: 180px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.recommended-card:hover {
    transform: translateY(-5px);
}

.recommended-card-img-wrapper {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommended-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.recommended-card-author {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.recommended-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.recommended-card-rating i {
    width: 12px;
    height: 12px;
    fill: #ffc107;
    color: #ffc107;
}

.recommended-card-rating span {
    font-size: 0.75rem;
    color: #888;
}

.recommended-card-price {
    font-weight: 700;
    color: var(--brand-color);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none; /* Hide buttons on mobile, rely on swipe */
    }
}

/* --- RIGHT COLUMN - Purchase --- */

.product-right-column {
    position: sticky;
    top: 100px;
}

.purchase-card {
    background-color: var(--white);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Format Selector */
.format-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.format-option:hover {
    border-color: var(--brand-color);
    background-color: #fafafa;
}

.format-option.active {
    border-color: var(--brand-color);
    background-color: rgba(141, 40, 40, 0.05);
}

.brand-skepsi .format-option.active {
    background-color: rgba(26, 20, 108, 0.05);
}

.format-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    border-radius: 8px;
    color: var(--brand-color);
}

.format-icon i {
    width: 22px;
    height: 22px;
}

.format-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.format-name {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--black);
}

.format-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-color);
}

.format-note {
    font-size: 0.8rem;
    color: #888;
}

/* Main Price Section */
.main-price-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
}

.price-discount {
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Precio "antes" tachado dentro del selector de formato */
.format-price .was {
    margin-left: 6px;
    font-weight: 500;
    font-size: 0.78em;
    color: #a0a0a0;
    text-decoration: line-through;
}
.discount-percent {
    background-color: var(--brand-color);
    color: var(--white);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
}

.price-current {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.price-current .currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
}

.price-current .amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--black);
}

.price-original {
    font-size: 0.9rem;
    color: #888;
}

.price-original s {
    color: #aaa;
}

/* Buy Buttons */
.btn-buy {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    background: var(--brand-gradient);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
}

.btn-buy:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(141, 40, 40, 0.3);
}

.brand-skepsi .btn-buy:hover {
    box-shadow: 0 4px 15px rgba(26, 20, 108, 0.3);
}

.btn-buy i {
    width: 20px;
    height: 20px;
}

.btn-buy-now {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid var(--brand-color);
    border-radius: 50px;
    background-color: transparent;
    color: var(--brand-color);
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.btn-buy-now:hover {
    background-color: var(--brand-color);
    color: var(--white);
}

/* Stock Info */
.stock-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #28a745;
    margin-bottom: 1.25rem;
}

.stock-info i {
    width: 18px;
    height: 18px;
}

.stock-info.out-of-stock {
    color: #dc3545;
}

/* Purchase Guarantees */
.purchase-guarantees {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.guarantee-item i {
    width: 18px;
    height: 18px;
    color: #28a745;
}

/* --- SAMPLE MODAL --- */
.modal-sample {
    max-width: 800px;
    max-height: 90vh;
}

.modal-sample .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.sample-placeholder {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-style: italic;
}

/* --- RESPONSIVE PRODUCT PAGE --- */
@media (max-width: 1100px) {
    .product-layout {
        grid-template-columns: 280px 1fr 300px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-left-column,
    .product-right-column {
        position: relative;
        top: 0;
    }
    
    .product-left-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .product-cover-wrapper {
        grid-column: 1;
        grid-row: 1 / 3;
    }
    
    .product-actions-preview {
        grid-column: 2;
        flex-direction: column;
        margin-bottom: 0;
    }
    
    .author-card {
        grid-column: 2;
    }
    
    .product-right-column {
        order: 3;
    }
}

@media (max-width: 600px) {
    .product-page {
        padding-top: 1rem;
    }
    
    .product-layout {
        gap: 1.5rem;
    }
    
    .product-left-column {
        grid-template-columns: 1fr;
    }
    
    .product-cover-wrapper {
        grid-column: 1;
        grid-row: auto;
    }
    
    .product-actions-preview {
        grid-column: 1;
        flex-direction: row;
    }
    
    .author-card {
        grid-column: 1;
    }
    
    .product-title {
        font-size: 1.4rem;
    }
    
    .info-widgets {
        flex-wrap: wrap;
    }
    
    .info-widget {
        flex: 1 1 45%;
    }
    
    .format-selector {
        gap: 0.5rem;
    }
    
    .format-option {
        padding: 0.75rem;
    }
    
    .price-current .amount {
        font-size: 1.8rem;
    }
}

/* --- MEGA MENÚ DINÁMICO (categorías desde Firebase) --- */
.mega-menu-content.mega-menu-with-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: 2rem;
    align-items: start;
    max-width: 100%;
}

.mega-menu-columns-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 1.25rem 1.75rem;
    align-content: start;
}

.mega-col-title {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    font-weight: 700;
    font-family: var(--font-title);
}

.mega-menu-loading,
.mega-menu-empty {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.submenu-muted {
    opacity: 0.75;
    font-size: 0.95rem;
}

.mega-promo-side img {
    min-height: 160px;
    width: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .mega-menu-content.mega-menu-with-promo {
        grid-template-columns: 1fr;
    }
    .mega-promo-side {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* --- PÁGINA CATEGORÍA (listado estilo resultados) --- */
.category-page-main {
    padding: 1rem 0 4rem;
    background: #f6f7f8;
    min-height: 50vh;
}

.category-page-inner {
    max-width: 1180px;
}

.category-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #555;
}

.category-breadcrumb a {
    color: var(--orange);
}

.category-page-header {
    margin-bottom: 1.5rem;
}

.category-page-title {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    color: var(--black);
}

.category-page-lead {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.category-page-count {
    font-size: 0.9rem;
    color: #777;
}

.category-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.category-sidebar {
    background: var(--white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 1rem;
}

.category-sidebar-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.category-filter-block {
    margin-bottom: 1.25rem;
}

.category-filter-block h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.category-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: default;
}

.category-sort-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    background: #fff;
}

.category-results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-loading,
.category-empty,
.category-error {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    color: #555;
}

.category-error .btn {
    margin-top: 1rem;
    display: inline-block;
    width: auto;
    padding: 0.65rem 1.5rem;
}

.listing-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.25rem;
    background: var(--white);
    padding: 1.15rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #eaeaea;
}

.listing-card-media {
    position: relative;
    display: block;
    align-self: start;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
}

.listing-card-media img {
    width: 100%;
    height: auto;
    display: block;
}

.listing-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 3px;
    z-index: 1;
}

.listing-badge-bestseller {
    background: #c45500;
    color: #fff;
}

.listing-card-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b5cab;
    line-height: 1.35;
    display: inline-block;
    margin-bottom: 0.35rem;
}

.listing-card-title:hover {
    text-decoration: underline;
    color: #c45500;
}

.listing-card-author {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.listing-card-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.listing-stars {
    color: #de7921;
    font-size: 0.85rem;
    letter-spacing: -1px;
}

.listing-rating-note {
    font-size: 0.8rem;
    color: #0b5cab;
}

.listing-format {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.35rem;
}

.listing-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.listing-price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: #b12704;
}

.listing-price-list {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
}

.listing-ship {
    font-size: 0.85rem;
    color: #067d62;
    margin-bottom: 0.65rem;
}

.listing-cta {
    display: inline-block;
    background: #ffd814;
    color: #111;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    border: 1px solid #fcd200;
    transition: background 0.2s;
}

.listing-cta:hover {
    background: #f7ca00;
}

@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 1fr;
    }
    .category-sidebar {
        position: static;
    }
    .listing-card {
        grid-template-columns: 110px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    .category-page-title {
        font-size: 1.35rem;
    }
}

/* ── Skeleton placeholders (stale-while-revalidate) ─────────────────────────── */
@keyframes skeleton-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.skeleton-pulse {
    background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

.listing-card-skeleton .listing-card-skeleton-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
}

.listing-card-skeleton .listing-card-skeleton-title {
    height: 1.1rem;
    width: 85%;
    margin-bottom: 0.6rem;
}

.listing-card-skeleton .listing-card-skeleton-author {
    height: 0.85rem;
    width: 55%;
    margin-bottom: 1.2rem;
}

.listing-card-skeleton .listing-card-skeleton-price {
    height: 1.1rem;
    width: 40%;
}

/* ── Product page skeleton (mientras carga) ─────────────────────────────────── */
.product-page.is-loading #product-title:empty,
.product-page.is-loading #product-author-link:empty,
.product-page.is-loading #product-format-type:empty,
.product-page.is-loading #author-name:empty,
.product-page.is-loading #breadcrumb-category:empty,
.product-page.is-loading #breadcrumb-product:empty,
.product-page.is-loading .widget-value:empty,
.product-page.is-loading .format-price:empty,
.product-page.is-loading #main-price:empty,
.product-page.is-loading #product-short-description:empty,
.product-page.is-loading #product-full-description:empty,
.product-page.is-loading #stock-info:empty,
.product-page.is-loading #product-topics:empty {
    display: inline-block;
    background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
    color: transparent;
    vertical-align: middle;
}

.product-page.is-loading #product-title:empty {
    display: block;
    height: 2.2rem;
    width: 70%;
    margin: 0 0 0.4rem;
}
.product-page.is-loading #product-author-link:empty,
.product-page.is-loading #product-format-type:empty {
    min-height: 1rem;
    min-width: 90px;
}
.product-page.is-loading #author-name:empty {
    display: inline-block;
    min-height: 1rem;
    min-width: 130px;
}
.product-page.is-loading #breadcrumb-category:empty,
.product-page.is-loading #breadcrumb-product:empty {
    min-height: 0.85rem;
    min-width: 70px;
}
.product-page.is-loading .widget-value:empty {
    min-height: 0.95rem;
    min-width: 60px;
}
.product-page.is-loading .format-price:empty {
    min-height: 1rem;
    min-width: 65px;
}
.product-page.is-loading #main-price:empty {
    display: inline-block;
    min-height: 2rem;
    min-width: 120px;
}
.product-page.is-loading #product-short-description:empty {
    display: block;
    height: 3.5em;
    width: 100%;
    margin-bottom: 0.6rem;
}
.product-page.is-loading #product-full-description:empty {
    display: block;
    height: 6em;
    width: 100%;
}
.product-page.is-loading #stock-info:empty {
    display: block;
    height: 1.3rem;
    width: 60%;
}
.product-page.is-loading #product-topics:empty {
    display: inline-block;
    min-height: 1.6rem;
    min-width: 180px;
}
.product-page.is-loading .product-cover-wrapper {
    background: linear-gradient(90deg, #ebebeb 25%, #f5f5f5 50%, #ebebeb 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}
.product-page.is-loading .product-cover-image {
    opacity: 0;
    transition: opacity 0.2s ease;
}
.product-page:not(.is-loading) .product-cover-image {
    opacity: 1;
}

/* ── Infinite Scroll Loader ─────────────────────────────────────────────────── */
.infinite-scroll-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.infinite-scroll-loader p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================= */
/* ===== PÁGINA DE PERFIL - Mi Cuenta ===== */
/* ============================================= */

.perfil-page {
    background-color: var(--light-gray);
}

.perfil-main {
    padding: 2.5rem 0 4rem;
    min-height: 70vh;
}

.perfil-container {
    max-width: 860px;
}

#perfil-layout-container.perfil-section-wide {
    max-width: 900px;
}

/* --- Estado: no logueado --- */
.perfil-not-logged {
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
}

.perfil-not-logged-inner {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.perfil-not-logged-inner svg {
    width: 56px;
    height: 56px;
    color: var(--orange);
    margin-bottom: 1.25rem;
    stroke-width: 1.5;
}

.perfil-not-logged-inner h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.perfil-not-logged-inner p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* --- Header del perfil --- */
.perfil-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.perfil-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(141, 40, 40, 0.25);
}

.perfil-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#perfil-initials {
    color: var(--white);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
}

.perfil-header-info {
    flex: 1;
    min-width: 0;
}

.perfil-name {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.perfil-email {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Barra de puntos --- */
.perfil-points-bar {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.perfil-points-bar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.perfil-points-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--orange), #b03535);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perfil-points-icon svg {
    width: 20px;
    height: 20px;
    color: var(--white);
    fill: var(--white);
    stroke: var(--white);
}

.perfil-points-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.perfil-points-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.perfil-points-value {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
}

.perfil-points-badge {
    background: var(--crema);
    color: var(--orange);
    border: 1px solid rgba(141, 40, 40, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.perfil-points-progress-wrap {
    margin-bottom: 0.6rem;
}

.perfil-points-progress-track {
    height: 10px;
    background: #eee;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.perfil-points-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), #c74444);
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.perfil-points-levels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.perfil-points-hint {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.5rem;
}

/* --- Grid de tarjetas --- */
.perfil-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.perfil-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.perfil-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--orange);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.perfil-card:hover {
    box-shadow: 0 6px 24px rgba(141, 40, 40, 0.12);
    transform: translateY(-2px);
}

.perfil-card:hover::before {
    opacity: 1;
}

.perfil-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--crema);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.perfil-card:hover .perfil-card-icon {
    background: rgba(141, 40, 40, 0.1);
}

.perfil-card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--orange);
    stroke-width: 1.8;
}

.perfil-card-body {
    flex: 1;
    min-width: 0;
}

.perfil-card-body h3 {
    font-size: 0.95rem;
    font-family: var(--font-title);
    color: var(--black);
    margin-bottom: 0.2rem;
}

.perfil-card-body p {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.4;
}

.perfil-card-arrow {
    width: 16px;
    height: 16px;
    color: #ccc;
    flex-shrink: 0;
    align-self: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.perfil-card:hover .perfil-card-arrow {
    color: var(--orange);
    transform: translateX(3px);
}

/* --- Acciones del footer del perfil --- */
.perfil-footer-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-outline-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    border: 1.5px solid #dc3545;
    background: transparent;
    color: #dc3545;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline-danger svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: var(--white);
}

.perfil-cancel-link {
    font-size: 0.82rem;
    color: #aaa;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.perfil-cancel-link:hover {
    color: #dc3545;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .perfil-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .perfil-name {
        font-size: 1.25rem;
    }

    .perfil-points-levels {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .perfil-main {
        padding: 1.5rem 0 3rem;
    }

    .perfil-grid {
        grid-template-columns: 1fr;
    }

    .perfil-header {
        gap: 1rem;
    }

    .perfil-avatar {
        width: 58px;
        height: 58px;
    }

    #perfil-initials {
        font-size: 1.2rem;
    }

    .perfil-name {
        font-size: 1.1rem;
    }

    .perfil-points-bar {
        padding: 1rem;
    }

    .perfil-points-levels {
        display: none;
    }

    .perfil-card {
        padding: 1rem;
    }
}

/* ============================================= */
/* ===== SUBPÁGINAS DE PERFIL — Estilos comunes */
/* ============================================= */

/* --- Breadcrumb --- */
.subperfil-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.subperfil-breadcrumb a {
    color: var(--orange);
    font-weight: 600;
}

.subperfil-breadcrumb svg {
    width: 14px;
    height: 14px;
    color: #bbb;
}

.subperfil-title {
    font-size: 1.6rem;
    color: var(--black);
    margin-bottom: 1.5rem;
    font-family: var(--font-title);
}

/* --- Card de datos (patrón general) --- */
.subperfil-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.subperfil-card-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2ecc71;
    margin-bottom: 0.6rem;
}

.subperfil-card-status svg {
    width: 16px;
    height: 16px;
    fill: #2ecc71;
    stroke: none;
}

.subperfil-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    margin-bottom: 0.75rem;
}

.subperfil-field-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.15rem;
}

.subperfil-field-value {
    font-size: 1rem;
    color: var(--black);
    font-weight: 500;
}

.subperfil-field-empty {
    color: #bbb;
    font-style: italic;
}

.subperfil-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0.75rem 0;
}

/* --- Botones de edición inline --- */
.btn-subperfil-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--orange);
    background: transparent;
    color: var(--orange);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-subperfil-edit:hover {
    background: var(--orange);
    color: var(--white);
}

.btn-subperfil-save {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    border: none;
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-subperfil-save:hover { opacity: 0.85; }
.btn-subperfil-save:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-subperfil-cancel {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid #ddd;
    background: transparent;
    color: #666;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-left: 0.5rem;
}

.btn-subperfil-cancel:hover { border-color: #aaa; }

/* --- Formulario inline de edición --- */
.subperfil-edit-form {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.subperfil-edit-form.active { display: flex; }

.subperfil-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.subperfil-input-group label {
    font-size: 0.82rem;
    color: #666;
    font-weight: 600;
}

.subperfil-input-group input,
.subperfil-input-group select,
.subperfil-input-group textarea {
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--black);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

.subperfil-input-group input:focus,
.subperfil-input-group select:focus,
.subperfil-input-group textarea:focus {
    border-color: var(--orange);
}

.subperfil-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.subperfil-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.subperfil-feedback {
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    display: none;
}

.subperfil-feedback.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.subperfil-feedback.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* --- Avatar con subida de foto --- */
.perfil-avatar-wrap {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.perfil-avatar-upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.perfil-avatar-wrap:hover .perfil-avatar-upload-overlay { opacity: 1; }

.perfil-avatar-upload-overlay svg {
    width: 22px;
    height: 22px;
    color: #fff;
    stroke-width: 2;
}

/* --- Sección: Direcciones --- */
.direccion-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.direccion-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.direccion-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 0.15rem;
}

.direccion-card-sub {
    font-size: 0.88rem;
    color: #666;
    margin-bottom: 0.15rem;
}

.direccion-card-type {
    font-size: 0.82rem;
    color: #888;
}

.direccion-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.direccion-tag {
    background: var(--light-gray);
    color: #666;
    border-radius: 50px;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.direccion-tag.default {
    background: rgba(141,40,40,0.1);
    color: var(--orange);
}

.direccion-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #aaa;
    flex-shrink: 0;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.direccion-menu-btn:hover { background: var(--light-gray); color: var(--black); }

.btn-add-direccion {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    border: 1.5px dashed var(--orange);
    background: transparent;
    color: var(--orange);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 1.5rem;
    width: 100%;
    justify-content: center;
}

.btn-add-direccion:hover {
    background: var(--orange);
    color: var(--white);
}

/* Form de nueva dirección */
.direccion-form-panel {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: none;
}

.direccion-form-panel.active { display: block; }

.direccion-form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 1.25rem;
    font-family: var(--font-title);
}

/* --- Sección: Comunicaciones --- */
.comms-toggle-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comms-toggle-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comms-toggle-card-icon svg {
    width: 20px;
    height: 20px;
    color: var(--orange);
    stroke-width: 1.8;
}

.comms-toggle-body {
    flex: 1;
}

.comms-toggle-body h4 {
    font-size: 0.95rem;
    font-family: var(--font-title);
    color: var(--black);
    margin-bottom: 0.15rem;
}

.comms-toggle-body p {
    font-size: 0.8rem;
    color: #888;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ddd;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--orange);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* --- Sección: Mis Compras --- */
.compras-toolbar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.compras-search {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1.5px solid #ddd;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.compras-search svg {
    width: 16px;
    height: 16px;
    color: #aaa;
    flex-shrink: 0;
}

.compras-search input {
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--black);
    flex: 1;
    background: transparent;
}

.compras-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid #ddd;
    border-radius: 50px;
    background: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--black);
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s;
}

.compras-filter-btn:hover, .compras-filter-btn.active {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(141,40,40,0.04);
}

.compras-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
}

/* Grupo de fecha */
.compras-date-group {
    margin-bottom: 1.5rem;
}

.compras-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0 0.75rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 0.75rem;
}

.compras-date-label {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--black);
}

/* Tarjeta de pedido */
.compra-item {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
}

.compra-item-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.compra-item-cover {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.compra-item-info {
    flex: 1;
    min-width: 0;
}

.compra-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1.4;
}

.compra-status.status-pending-payment  { background: #fef3c7; color: #92400e; }
.compra-status.status-paid             { background: #d1fae5; color: #065f46; }
.compra-status.status-rejected         { background: #fee2e2; color: #991b1b; }
.compra-status.status-failed           { background: #fee2e2; color: #991b1b; }
.compra-status.status-payment-pending  { background: #e0f2fe; color: #075985; }
.compra-status.status-processing       { background: #dbeafe; color: #1e40af; }
.compra-status.status-shipped          { background: #fff7ed; color: #9a3412; }
.compra-status.status-delivered        { background: #d1fae5; color: #065f46; }
.compra-status.status-cancelled        { background: #f3f4f6; color: #6b7280; }

.compra-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compra-item-detail {
    font-size: 0.82rem;
    color: #888;
}

.compra-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    align-self: center;
}

.btn-ver-compra {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: var(--orange);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.btn-ver-compra:hover { opacity: 0.85; }

/* ── Order Detail / Invoice ── */

.order-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--brand-color, #8d2828);
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-weight: 600;
    transition: opacity 0.15s;
}
.order-detail-back:hover { opacity: 0.7; }

.order-invoice {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    overflow: hidden;
}

.invoice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.invoice-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invoice-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.invoice-meta {
    text-align: right;
}

.invoice-order-id {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.invoice-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.4rem;
}

.invoice-section {
    padding: 1.5rem 2rem;
}

.invoice-section-title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.invoice-items {
    display: flex;
    flex-direction: column;
}

.invoice-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f5f5f5;
}
.invoice-item-row:last-child { border-bottom: none; }

.invoice-item-cover {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.invoice-item-info {
    flex: 1;
    min-width: 0;
}

.invoice-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.invoice-item-author {
    font-size: 0.8rem;
    color: #888;
}

.invoice-item-qty {
    font-size: 0.82rem;
    color: #888;
    white-space: nowrap;
}

.invoice-item-total {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.invoice-totals {
    padding: 1.25rem 2rem;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.88rem;
    color: #555;
}

.invoice-total-row.discount { color: #2e7d32; }

.invoice-total-row.total {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a1a1a;
    border-top: 2px solid #e0e0e0;
    margin-top: 0.5rem;
    padding-top: 0.7rem;
}

.invoice-footer-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
}

.invoice-info-block h4 {
    font-family: var(--font-title);
    font-size: 0.78rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.invoice-info-block p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
}

.invoice-payment-ref {
    padding: 1rem 2rem;
    font-size: 0.82rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 600px) {
    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .invoice-meta { text-align: left; }
    .invoice-section,
    .invoice-totals,
    .invoice-footer-info,
    .invoice-payment-ref {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .invoice-footer-info { grid-template-columns: 1fr; }
    .invoice-item-qty { display: none; }
    .invoice-item-total { min-width: 60px; }
}

/* Sistema de rating (estrellitas) */
.compra-rating-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.compra-rating-label {
    font-size: 0.8rem;
    color: #888;
    margin-right: 0.4rem;
}

.star-rating {
    display: flex;
    gap: 0.15rem;
}

.star-rating button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    color: #ddd;
    line-height: 1;
    transition: color 0.15s, transform 0.1s;
}

.star-rating button.active,
.star-rating button.hover {
    color: #f39c12;
}

.star-rating button:hover { transform: scale(1.15); }

.btn-opinar {
    margin-left: 0.5rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1.5px solid var(--orange);
    background: transparent;
    color: var(--orange);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s, color 0.2s;
}

.btn-opinar:hover { background: var(--orange); color: var(--white); }

/* Estado vacío de compras */
.compras-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #aaa;
}

.compras-empty svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #ddd;
    stroke-width: 1.2;
}

.compras-empty h3 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.compras-empty p { font-size: 0.9rem; }

.compras-empty a {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.65rem 1.5rem;
    background: var(--orange);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.compras-empty a:hover { opacity: 0.85; }

/* --- Responsive subpages --- */
@media (max-width: 600px) {
    .subperfil-card-row { grid-template-columns: 1fr; }
    .subperfil-input-row { grid-template-columns: 1fr; }
    .compras-toolbar { gap: 0.5rem; }
    .compra-item-actions { flex-direction: row; }
    .compra-item-cover { width: 44px; height: 60px; }
}


/* ═══════════════════════════════════════════════════════════ */
/*  NOTIFICATION SYSTEM                                       */
/* ═══════════════════════════════════════════════════════════ */

/* --- Header Bell & Badge --- */
.notification-menu {
    position: relative;
}

#header-notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50px;
    background-color: #e53e3e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(229, 62, 62, 0.4);
}

/* --- Notification Dropdown --- */
.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    z-index: 1200;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    flex-direction: column;
}

.notification-dropdown.open {
    display: flex;
}

.notification-menu::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background-color: transparent;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
}

.notif-header h4,
.notif-header .notif-header-title {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

.notif-header a {
    font-size: 0.78rem;
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.notif-header a:hover {
    opacity: 0.7;
}

.notif-list {
    overflow-y: auto;
    max-height: 340px;
    flex: 1;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s;
    position: relative;
    /* Reset para cuando el item es <button> (notifs interactivas del funnel) */
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.notif-item.notif-unread {
    background-color: #fef8f0;
}

.notif-item.notif-read {
    opacity: 0.62;
}

.notif-item.notif-read .notif-item-title,
.notif-item.notif-read .notif-item-text {
    color: #7a7a7a;
}

.notif-item.is-processing {
    pointer-events: none;
    cursor: wait;
}

.notif-item:hover {
    background-color: #faf8f5;
    opacity: 1;
}

.notif-profile-item.notif-read {
    opacity: 0.62;
}

.notif-profile-item.notif-read .notif-profile-title,
.notif-profile-item.notif-read .notif-profile-text {
    color: #7a7a7a;
}

.notif-profile-item.notif-read:hover {
    opacity: 1;
}

.notif-load-more {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.6rem;
    background: transparent;
    border: 1px solid var(--orange, #8D2828);
    color: var(--orange, #8D2828);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.notif-load-more:hover {
    background: var(--orange, #8D2828);
    color: #fff;
}

.reviews-section {
    margin: 3rem auto;
    max-width: 980px;
    padding: 0 1rem;
}

.reviews-container {
    background: #fff;
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.reviews-summary {
    margin: 1rem 0 1.5rem;
}

.reviews-summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: #faf7f2;
    border-radius: 10px;
}

.reviews-avg {
    font-size: 2rem;
    font-weight: 800;
    color: var(--orange, #8D2828);
    line-height: 1;
}

.reviews-count {
    color: #666;
    font-size: 0.9rem;
}

.stars-row {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.stars-row i {
    width: var(--star-size, 14px);
    height: var(--star-size, 14px);
}

.star-filled {
    color: #f4b400;
    fill: #f4b400;
}

.star-empty {
    color: #d8d3cb;
}

.reviews-empty,
.reviews-info,
.reviews-loading {
    color: #666;
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.review-item {
    padding: 1rem 1.1rem;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 600;
    color: #444;
    font-size: 0.88rem;
}

.review-comment {
    margin: 0.55rem 0;
    color: #333;
    line-height: 1.5;
}

.review-date {
    color: #999;
    font-size: 0.8rem;
}

.review-form {
    margin-top: 1.4rem;
    padding: 1.2rem;
    border: 1px dashed var(--orange, #8D2828);
    border-radius: 10px;
    background: #fffaf5;
}

.review-form h3 {
    margin: 0 0 0.9rem;
    font-size: 1.05rem;
}

.review-form-stars {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 0.85rem;
}

.review-star-btn {
    background: transparent;
    border: none;
    color: #d8d3cb;
    cursor: pointer;
    padding: 2px;
}

.review-star-btn.selected {
    color: #f4b400;
}

.review-star-btn i {
    width: 22px;
    height: 22px;
}

.review-form textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.btn-submit-review {
    margin-top: 0.85rem;
    padding: 0.65rem 1.4rem;
    background: var(--orange, #8D2828);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-submit-review:disabled {
    opacity: 0.55;
    cursor: progress;
}

.review-form-msg {
    margin: 0.6rem 0 0;
    font-size: 0.88rem;
}

.review-form-msg.error {
    color: #c0392b;
}

.notif-item-thumb {
    width: 44px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.notif-item-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-item-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.notif-item-icon-wrap.purchase { background-color: #e8f5e9; color: #2e7d32; }
.notif-item-icon-wrap.order_created { background-color: #e0f2fe; color: #0369a1; }
.notif-item-icon-wrap.payment_success { background-color: #d1fae5; color: #065f46; }
.notif-item-icon-wrap.payment_failed { background-color: #fee2e2; color: #991b1b; }
.notif-item-icon-wrap.payment_pending { background-color: #fef3c7; color: #92400e; }
.notif-item-icon-wrap.order_cancelled { background-color: #f3f4f6; color: #6b7280; }
.notif-item-icon-wrap.digital_access { background-color: #ede9fe; color: #5b21b6; }
.notif-item-icon-wrap.shipment { background-color: #e3f2fd; color: #1565c0; }
.notif-item-icon-wrap.new_book { background-color: #fff3e0; color: #e65100; }
.notif-item-icon-wrap.recommendation { background-color: #fce4ec; color: #c62828; }
.notif-item-icon-wrap.promo { background-color: #f3e5f5; color: #6a1b9a; }

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--text-color);
    line-height: 1.3;
}

.notif-item-text {
    font-size: 0.78rem;
    color: #777;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.7rem;
    color: #aaa;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--orange);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    color: #bbb;
    gap: 0.5rem;
}

.notif-empty svg {
    width: 32px;
    height: 32px;
}

.notif-empty p {
    font-size: 0.85rem;
    margin: 0;
}

.notif-footer-link {
    display: block;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: background-color 0.15s;
}

.notif-footer-link:hover {
    background-color: #faf8f5;
}

/* --- Profile Notifications Section --- */
.notif-profile-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.notif-profile-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.notif-tab {
    padding: 0.45rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-tab:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.notif-tab.active {
    background-color: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}

.notif-mark-all-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--white);
    color: #666;
    font-size: 0.78rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}

.notif-mark-all-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.notif-mark-all-btn svg {
    width: 14px;
    height: 14px;
}

.notif-profile-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.notif-profile-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
    position: relative;
}

.notif-profile-item:last-child {
    border-bottom: none;
}

.notif-profile-item:hover {
    background-color: #faf8f5;
}

.notif-profile-item.notif-unread {
    background-color: #fef8f0;
}

.notif-profile-thumb {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.notif-profile-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-profile-icon svg {
    width: 20px;
    height: 20px;
}

.notif-profile-icon.purchase { background-color: #e8f5e9; color: #2e7d32; }
.notif-profile-icon.order_created { background-color: #e0f2fe; color: #0369a1; }
.notif-profile-icon.payment_success { background-color: #d1fae5; color: #065f46; }
.notif-profile-icon.payment_failed { background-color: #fee2e2; color: #991b1b; }
.notif-profile-icon.payment_pending { background-color: #fef3c7; color: #92400e; }
.notif-profile-icon.order_cancelled { background-color: #f3f4f6; color: #6b7280; }
.notif-profile-icon.digital_access { background-color: #ede9fe; color: #5b21b6; }
.notif-profile-icon.shipment { background-color: #e3f2fd; color: #1565c0; }
.notif-profile-icon.new_book { background-color: #fff3e0; color: #e65100; }
.notif-profile-icon.recommendation { background-color: #fce4ec; color: #c62828; }
.notif-profile-icon.promo { background-color: #f3e5f5; color: #6a1b9a; }

.notif-profile-body {
    flex: 1;
    min-width: 0;
}

.notif-profile-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 50px;
    margin-bottom: 4px;
}

.notif-profile-label.purchase { background-color: #e8f5e9; color: #2e7d32; }
.notif-profile-label.order_created { background-color: #e0f2fe; color: #0369a1; }
.notif-profile-label.payment_success { background-color: #d1fae5; color: #065f46; }
.notif-profile-label.payment_failed { background-color: #fee2e2; color: #991b1b; }
.notif-profile-label.payment_pending { background-color: #fef3c7; color: #92400e; }
.notif-profile-label.order_cancelled { background-color: #f3f4f6; color: #6b7280; }
.notif-profile-label.digital_access { background-color: #ede9fe; color: #5b21b6; }
.notif-profile-label.shipment { background-color: #e3f2fd; color: #1565c0; }
.notif-profile-label.new_book { background-color: #fff3e0; color: #e65100; }
.notif-profile-label.recommendation { background-color: #fce4ec; color: #c62828; }
.notif-profile-label.promo { background-color: #f3e5f5; color: #6a1b9a; }

.notif-profile-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 3px;
    color: var(--text-color);
    line-height: 1.3;
}

.notif-profile-text {
    font-size: 0.82rem;
    color: #777;
    margin: 0 0 6px;
    line-height: 1.45;
}

.notif-profile-time {
    font-size: 0.72rem;
    color: #aaa;
}

.notif-dot-lg {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--orange);
    flex-shrink: 0;
    margin-top: 8px;
}

/* Profile card notification badge */
.perfil-card-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 50px;
    background-color: #e53e3e;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/*  COUPON ACTIVE BANNER (carrito y notificaciones)            */
/*  Muestra el cupón aplicado con código copiable, descuento, */
/*  envío gratis (si aplica) y countdown hasta su expiración. */
/* ═══════════════════════════════════════════════════════════ */

.coupon-active-banner {
    margin-top: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(135deg, #fef8f0 0%, #fff5e6 100%);
    border: 1px solid #f0d9a8;
    border-left: 3px solid var(--orange, #8d2828);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: #3a1414;
}

.coupon-banner-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.55rem;
}

.coupon-banner-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--orange, #8d2828);
    background: rgba(141, 40, 40, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}

.coupon-banner-remove {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s;
}

.coupon-banner-remove:hover {
    color: #c41e3a;
    background: rgba(196, 30, 58, 0.08);
}

.coupon-banner-remove svg {
    width: 16px;
    height: 16px;
}

.coupon-banner-code {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.coupon-banner-code code {
    flex: 1;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 10px;
    border-radius: 5px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-weight: 700;
    color: var(--orange, #8d2828);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    border: 1px dashed rgba(141, 40, 40, 0.2);
}

.coupon-banner-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--orange, #8d2828);
    color: #fff;
    border: none;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: var(--font-body);
}

.coupon-banner-copy:hover {
    opacity: 0.88;
}

.coupon-banner-copy svg {
    width: 13px;
    height: 13px;
}

.coupon-banner-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    margin-top: 4px;
    color: #4a3030;
}

.coupon-banner-line svg {
    width: 14px;
    height: 14px;
    color: var(--success-green, #2e7d32);
}

/* Aviso "no se acumula con rebajas" — color informativo, distinto del verde */
.coupon-banner-line.coupon-banner-note {
    color: #6b5b00;
    background: rgba(255, 196, 0, 0.08);
    border-left: 3px solid rgba(255, 196, 0, 0.55);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 6px;
    font-size: 0.74rem;
}

.coupon-banner-line.coupon-banner-note svg {
    color: #b48a00;
}

.coupon-banner-countdown {
    margin-top: 0.5rem;
    font-size: 0.74rem;
    color: #856404;
    background: rgba(255, 193, 7, 0.12);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
}

.coupon-banner-countdown.expired {
    color: #721c24;
    background: rgba(220, 53, 69, 0.12);
}

/* Chip de cupón en notificaciones (dropdown y perfil) */
.notif-coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 8px;
    background: rgba(141, 40, 40, 0.08);
    border: 1px dashed rgba(141, 40, 40, 0.3);
    color: var(--orange, #8d2828);
    border-radius: 4px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.notif-coupon-chip:hover {
    background: rgba(141, 40, 40, 0.14);
}

.notif-coupon-chip svg {
    width: 11px;
    height: 11px;
}

.notif-coupon-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.notif-coupon-countdown {
    font-size: 0.68rem;
    color: #856404;
    font-weight: 600;
}

.notif-coupon-countdown.expired {
    color: #721c24;
    font-style: italic;
}

.notif-item.notif-expired {
    opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════ */
/*  COOKIE BANNER (toast compacto bottom-left)                */
/*  - Fondo crema con borde sutil, no compite con el chatbot  */
/*  - Aparece sólo cuando JS añade .cookie-banner--visible    */
/*  - Una línea de texto + CTA primario + link "Solo nec."    */
/* ═══════════════════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 9999;
    max-width: 380px;
    padding: 0.95rem 1.1rem 0.9rem;
    background: var(--crema, #fdf6e7);
    border: 1px solid rgba(141, 40, 40, 0.14);
    border-left: 3px solid var(--orange, #8d2828);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(40, 14, 14, 0.18), 0 2px 6px rgba(40, 14, 14, 0.08);
    color: #3a1414;

    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner-body {
    margin: 0 0 0.7rem;
    font-family: var(--font-body, system-ui, sans-serif);
    font-size: 0.84rem;
    line-height: 1.45;
    color: #3a1414;
}

.cookie-banner-body strong {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--font-title, var(--font-body));
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--orange, #8d2828);
    letter-spacing: 0.01em;
}

.cookie-learn-more {
    color: var(--orange, #8d2828);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    margin-left: 0.15rem;
}

.cookie-learn-more:hover {
    color: #5a1414;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cookie-btn-primary {
    flex: 0 0 auto;
    padding: 0.55rem 1.25rem;
    background: var(--orange, #8d2828);
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.18s ease, transform 0.15s ease;
}

.cookie-btn-primary:hover {
    background: #6b1f1f;
}

.cookie-btn-primary:active {
    transform: scale(0.97);
}

.cookie-btn-necessary {
    background: transparent;
    border: none;
    padding: 0.25rem 0.1rem;
    color: rgba(58, 20, 20, 0.6);
    font-family: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease;
}

.cookie-btn-necessary:hover {
    color: var(--orange, #8d2828);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-btn-necessary:focus-visible,
.cookie-btn-primary:focus-visible {
    outline: 2px solid var(--orange, #8d2828);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .notification-dropdown {
        width: min(360px, calc(100vw - 2rem));
        right: 0;
        left: auto;
    }

    .notif-profile-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .notif-profile-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .notif-profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .notif-tab {
        flex-shrink: 0;
    }
}

@media (max-width: 540px) {
    .cookie-banner {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
    }

    .cookie-banner-actions {
        gap: 0.75rem;
    }

    .cookie-btn-primary {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 70px);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
}

/* ═══ CART PANEL ═══ */
.cart-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: calc(-1 * var(--cart-panel-width));
    width: var(--cart-panel-width);
    height: 100vh;
    background: var(--white);
    z-index: 3001;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-panel.active {
    right: 0;
}

@media (max-width: 480px) {
    .cart-panel {
        width: 100%;
        right: -100%;
    }
}

.cart-panel-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-color, #8d2828);
}

.cart-panel-success {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.cart-panel-success i {
    color: rgba(255,255,255,0.85);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cart-panel-success strong {
    font-size: 1rem;
    font-family: var(--font-title);
    color: #fff;
    font-weight: 700;
}

.cart-panel-close {
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    flex-shrink: 0;
}

.cart-panel-close:hover {
    background: rgba(255,255,255,0.3);
}

.cart-panel-close svg { width: 16px; height: 16px; }

.cart-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-panel-added-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cart-panel-item-img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-panel-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-panel-item-info h4 {
    font-size: 1rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-panel-item-format {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: var(--light-gray);
    color: var(--text-muted);
    display: inline-block;
    align-self: flex-start;
}

.cart-panel-item-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-top: auto;
}

.cart-panel-shipping {
    background: #f8fdfa;
    border: 1px solid #e0f2e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.shipping-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.shipping-title {
    color: var(--success-green);
    font-weight: 700;
    font-size: 0.95rem;
}

.shipping-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.shipping-progress-bar {
    height: 6px;
    background: #e0f2e9;
    border-radius: 3px;
    overflow: hidden;
}

.shipping-progress-fill {
    height: 100%;
    background: var(--success-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.cart-panel-recommendations {
    border-top: 1px solid var(--light-gray);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

.cart-panel-recommendations h4 {
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 1rem;
}

.cart-panel-reco-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.reco-loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Tarjeta de recomendación — layout horizontal minimalista */
.reco-mini-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    transition: border-color 0.18s, background 0.18s;
}

.reco-mini-card:hover {
    border-color: #e0e0e0;
    background: #fff;
}

.reco-mini-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

.reco-mini-img {
    width: 38px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.reco-mini-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.reco-mini-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    line-height: 1.3;
}

.reco-mini-price {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--brand-color, #8d2828);
}

.btn-reco-add {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 1.5px solid var(--brand-color, #8d2828);
    color: var(--brand-color, #8d2828);
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-reco-add:hover:not(:disabled) {
    background: var(--brand-color, #8d2828);
    color: #fff;
}

.btn-reco-add.btn-reco-added {
    border-color: #2e7d32;
    color: #2e7d32;
    cursor: default;
}

.btn-reco-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-panel-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-cart-panel-primary {
    background: var(--brand-color, #8d2828);
    color: #fff;
    text-align: center;
    padding: 0.85rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-title);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: background 0.18s;
}

.btn-cart-panel-primary:hover {
    background: #6e1f1f;
    color: #fff;
}

.btn-cart-panel-secondary {
    background: transparent;
    color: #888;
    border: none;
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.18s;
    text-align: center;
}

.btn-cart-panel-secondary:hover {
    color: var(--brand-color, #8d2828);
}

/* ═══ CART PANEL - ITEMS INLINE ═══ */
.cart-panel-items-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1rem;
}

.panel-cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
}

.panel-cart-item:last-child {
    border-bottom: none;
}

.panel-cart-item-img {
    width: 58px;
    height: 82px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.panel-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.panel-cart-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    padding-right: 1.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-color);
}

.panel-cart-item-author {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.panel-cart-item-format {
    font-size: 0.73rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--light-gray);
    color: var(--text-muted);
    display: inline-block;
    align-self: flex-start;
    font-weight: 500;
}

.panel-cart-item-format.format-digital  { background: #e8f0fe; color: #1a56db; }
.panel-cart-item-format.format-fisico   { background: #fef3c7; color: #92400e; }
.panel-cart-item-format.format-combo    { background: #d1fae5; color: #065f46; }

.panel-cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.4rem;
}

.panel-cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
}

.panel-qty-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.panel-qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #d1d5db;
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.18s;
    line-height: 1;
    flex-shrink: 0;
}

.panel-qty-btn:hover:not(:disabled) {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.panel-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.panel-qty-value {
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.panel-cart-item-remove {
    position: absolute;
    top: 0.75rem;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.panel-cart-item-remove:hover {
    color: #dc2626;
}

.panel-cart-item-remove svg {
    width: 15px;
    height: 15px;
}

/* ═══ CART PANEL - EMPTY STATE ═══ */
.cart-panel-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cart-panel-empty-state i,
.cart-panel-empty-state svg {
    width: 52px;
    height: 52px;
    color: var(--text-muted);
    opacity: 0.4;
}

.cart-panel-empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.btn-panel-discover {
    background: var(--orange);
    color: var(--white);
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: inline-block;
}

.btn-panel-discover:hover {
    background: var(--orange-dark, #c2410c);
    color: var(--white);
}

/* ═══ CART PAGE ═══ */
.cart-page {
    background-color: var(--light-gray);
    min-height: calc(100vh - 200px);
    padding: 2rem 0 4rem;
}

.cart-page-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-items-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-group {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cart-group-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.cart-group-header i {
    color: var(--info-blue);
}

.cart-item {
    display: flex;
    padding: 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 90px;
    height: 130px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    padding-right: 2rem;
}

.cart-item-author {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cart-item-format {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
}

.cart-item-format.format-fisico {
    background: #f5f0e8;
    color: #7a5c2e;
    border: 1px solid #d4b896;
}

.cart-item-format.format-digital {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.cart-item-format.format-combo {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    background: #f9f9f9;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: background 0.2s;
}

.qty-btn:hover:not(:disabled) {
    background: #eee;
}

.qty-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.qty-input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-prices {
    text-align: right;
}

.cart-item-original-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 0.2rem;
}

.cart-item-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.btn-remove-item {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.btn-remove-item:hover {
    color: var(--orange);
}

.cart-group-shipping {
    padding: 1rem 1.5rem;
    background: #f8fdfa;
    border-top: 1px solid #e0f2e9;
}

.cart-summary-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.cart-summary-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.summary-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.summary-original-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.discount-row {
    color: var(--success-green);
}

.summary-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 1.5rem 0;
}

.total-row {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.btn-checkout {
    width: 100%;
    background: var(--info-blue);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #2968c8;
}

.coupon-section {
    margin-top: 1rem;
}

.toggle-coupon-btn {
    font-size: 0.9rem;
    color: var(--info-blue);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-apply-coupon {
    background: var(--light-gray);
    border: 1px solid #ddd;
    padding: 0 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-apply-coupon:hover {
    background: #eee;
}

.coupon-message {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.coupon-message.success {
    color: var(--success-green);
}

.coupon-message.error {
    color: var(--orange);
}

.cart-empty-state {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
}

.empty-cart-icon i {
    width: 40px;
    height: 40px;
}

.cart-empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cart-empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-img {
        width: 100px;
        height: 140px;
        margin: 0 auto;
    }
    
    .cart-item-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cart-item-prices {
        text-align: center;
    }
    
    .btn-remove-item {
        top: 1rem;
        right: 1rem;
    }
}
/* ═══ CHECKOUT PAGE ═══ */
.checkout-body {
    background-color: #f5f5f5;
}

/* ── Header ── */
.checkout-header {
    background: var(--white);
    border-bottom: 1px solid #e8e8e8;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.checkout-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-user-name {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.checkout-user-avatar .chk-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.checkout-user-avatar .chk-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ── Stepper ── */
.checkout-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.5rem 0;
    max-width: 480px;
    margin: 0 auto;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ccc;
    color: #999;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background: var(--white);
}

.stepper-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    transition: color 0.3s;
}

.stepper-step.active .stepper-circle {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}

.stepper-step.active .stepper-label {
    color: var(--orange);
    font-weight: 600;
}

.stepper-step.completed .stepper-circle {
    background: var(--success-green);
    border-color: var(--success-green);
    color: var(--white);
}

.stepper-step.completed .stepper-label {
    color: var(--success-green);
}

.stepper-line {
    flex: 1;
    height: 2px;
    background: #ddd;
    margin: 0 0.75rem;
    margin-bottom: 1.2rem;
    min-width: 40px;
}

/* ── Container ── */
.checkout-container {
    max-width: var(--checkout-max-width, 1000px);
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 992px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
    #step-1 .step-nav {
        display: none;
    }
    #step-2 .step-nav .btn-checkout {
        display: none;
    }
    #step-2 .step-nav .chk-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ── Step cards ── */
.checkout-step {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.step-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 1.15rem;
    margin: 0;
    font-weight: 600;
}

.step-content {
    padding: 1.5rem;
}

/* ── Subtitles ── */
.chk-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* ── Alert boxes ── */
.alert-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
}

.alert-box.info {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    color: #0c5460;
}

.alert-box.warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-box i {
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
}

.alert-box p {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ── Address cards ── */
.address-option {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s;
}

.address-option:hover {
    border-color: #bbb;
}

.address-option.selected {
    border-color: var(--orange);
    background: #fef7f7;
}

.address-radio {
    margin-top: 3px;
    accent-color: var(--orange);
}

.address-details {
    flex: 1;
}

.address-street {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-color);
}

.address-city {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.address-contact {
    color: #999;
    font-size: 0.8rem;
}

.chk-no-addresses {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.btn-add-address {
    background: transparent;
    border: 2px dashed #ddd;
    color: var(--orange);
    padding: 0.9rem;
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-add-address:hover {
    border-color: var(--orange);
    background: #fef7f7;
}

/* ── Address form (checkout) ── */
.chk-address-form-card {
    margin-top: 1rem;
    padding: 1.5rem;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
}

.chk-address-form-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

.chk-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.chk-form-grid .full-width {
    grid-column: 1 / -1;
}

.chk-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chk-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

.chk-label .required {
    color: var(--orange);
}

.chk-input, .chk-select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    transition: border-color 0.2s;
    color: var(--text-color);
}

.chk-input:focus, .chk-select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(141, 40, 40, 0.08);
}

.chk-error-msg {
    color: var(--orange);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.chk-form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@media (max-width: 576px) {
    .chk-form-grid {
        grid-template-columns: 1fr;
    }
    .chk-form-grid .full-width {
        grid-column: 1;
    }
}

/* ── Delivery cards ── */
.delivery-card {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.delivery-card.selected {
    border-color: var(--success-green);
    background: #f0faf4;
}

.delivery-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0faf4;
    color: var(--success-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.delivery-card-icon i {
    width: 20px;
    height: 20px;
}

.delivery-card-info {
    flex: 1;
}

.delivery-card-info strong {
    font-size: 0.95rem;
}

.delivery-card-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.delivery-card-badge {
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.delivery-card-badge.free {
    color: var(--success-green);
}

/* ── Delivery estimates (step 2) ── */
.delivery-estimate-card {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.delivery-estimate-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.delivery-estimate-icon i {
    width: 22px;
    height: 22px;
}

.delivery-estimate-icon.physical {
    background: #e8f4fd;
    color: var(--info-blue);
}

.delivery-estimate-icon.digital {
    background: #f0faf4;
    color: var(--success-green);
}

.delivery-estimate-info {
    flex: 1;
}

.delivery-estimate-info strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.2rem;
}

.delivery-estimate-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.delivery-estimate-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success-green);
    margin-bottom: 0.15rem;
}

.delivery-estimate-desc {
    font-size: 0.8rem;
    color: #999;
}

.delivery-estimate-cost {
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    text-align: right;
}

.delivery-estimate-cost .free {
    color: var(--success-green);
}

/* ── Step 3 summaries ── */
.step3-summary-card {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background: #fafafa;
}

.chk-terms-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.chk-terms-note a {
    color: var(--orange);
    text-decoration: underline;
}

/* ── Coupon section ── */
.coupon-section {
    margin-bottom: 1.25rem;
}

.toggle-coupon-btn {
    font-size: 0.85rem;
    color: var(--info-blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
}

.toggle-coupon-btn i {
    width: 14px;
    height: 14px;
}

.coupon-form {
    margin-top: 0.75rem;
}

.coupon-input-group {
    display: flex;
    gap: 0.5rem;
}

.coupon-input-group input {
    flex: 1;
}

.btn-apply-coupon {
    background: var(--light-gray);
    border: 1px solid #ddd;
    padding: 0 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-apply-coupon:hover {
    background: #eee;
}

.coupon-message {
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

.coupon-message.success { color: var(--success-green); }
.coupon-message.error { color: var(--orange); }

/* ── Terms ── */
.chk-terms {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.chk-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1.4;
}

.chk-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--orange);
}

.chk-checkbox-label a {
    color: var(--orange);
    text-decoration: underline;
}

/* ── Navigation between steps ── */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eee;
}

/* ── Buttons ── */
.chk-btn-primary {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chk-btn-primary:hover {
    opacity: 0.9;
}

.chk-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chk-btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #ddd;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chk-btn-secondary:hover {
    border-color: #bbb;
    color: var(--text-color);
}

.chk-btn-secondary i {
    width: 16px;
    height: 16px;
}

.btn-checkout {
    width: 100%;
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.9rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-checkout:hover {
    opacity: 0.9;
}

.btn-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-checkout i {
    width: 18px;
    height: 18px;
}

/* ── Summary sidebar ── */
.checkout-summary-column .cart-summary-card {
    top: 80px;
}

.secure-payment-info {
    margin-top: 1.25rem;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.secure-payment-info i {
    width: 14px;
    height: 14px;
}

/* ── Mini items ── */
.checkout-items-preview {
    margin-bottom: 1rem;
}

.checkout-item-mini {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.checkout-item-mini img {
    width: 46px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.checkout-item-mini-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.checkout-item-mini-title {
    font-size: 0.82rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.checkout-item-mini-meta {
    font-size: 0.75rem;
    color: #999;
}

/* ── Loading state ── */
.checkout-loading-state {
    text-align: center;
    padding: 4rem;
}

.checkout-loading-state p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.chk-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #eee;
    border-top: 3px solid var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.chk-spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Login prompt ── */
.chk-login-prompt {
    text-align: center;
    padding: 2rem 0;
}

.chk-login-prompt p {
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.chk-login-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.chk-login-hint a {
    color: var(--orange);
    font-weight: 600;
}

/* ── Responsive mobile ── */
@media (max-width: 576px) {
    .checkout-stepper {
        padding: 1rem 0;
    }
    .stepper-label {
        font-size: 0.65rem;
    }
    .step-content {
        padding: 1rem;
    }
    .step-header {
        padding: 1rem;
    }
    .step-nav {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    .step-nav .chk-btn-primary,
    .step-nav .btn-checkout {
        width: 100%;
    }
    .step-nav .chk-btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .checkout-user-name {
        display: none;
    }
}
/* ═══ FIN CHECKOUT PAGE ═══ */


/* ═══════════════════════════════════════════════════════════
   WISHLIST (Capa 4) — Header dropdown + ficha producto + sección perfil
   ═══════════════════════════════════════════════════════════ */

/* Permitir que la wishlist-btn de la ficha quede absolutamente posicionada */
.product-cover-wrapper {
    position: relative;
}

.product-wishlist-btn {
    top: 12px;
    right: 12px;
    bottom: auto;
    width: 42px;
    height: 42px;
}

.product-wishlist-btn i {
    width: 22px;
    height: 22px;
}

/* --- Header dropdown de favoritos --- */
.wishlist-list {
    max-height: 360px;
}

.wishlist-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--light-gray, #eee);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.wishlist-item:last-child {
    border-bottom: none;
}

.wishlist-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.wishlist-item-cover {
    flex: 0 0 56px;
    width: 56px;
    height: 78px;
    background: var(--light-gray, #f3ede2);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wishlist-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wishlist-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color, #333);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wishlist-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--orange, #8D2828);
    margin: 0;
}

.wishlist-item-remove {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.78rem;
    color: var(--orange, #8D2828);
    cursor: pointer;
    margin-top: 0.15rem;
}

.wishlist-item-remove:hover {
    text-decoration: underline;
}

/* --- Sección "Mis favoritos" en /perfil --- */
.favoritos-section {
    width: 100%;
}

.favoritos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    gap: 0.75rem;
    color: #666;
}

.favoritos-empty i {
    width: 64px;
    height: 64px;
    color: #d4b6b6;
}

.favoritos-empty h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-color, #333);
}

.favoritos-empty p {
    margin: 0;
    max-width: 320px;
}

.favoritos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.favoritos-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.favoritos-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.favoritos-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.favoritos-card-cover {
    background: var(--light-gray, #f3ede2);
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.favoritos-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favoritos-card-info {
    padding: 0.75rem 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.favoritos-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #333);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.favoritos-card-author {
    margin: 0;
    font-size: 0.8rem;
    color: #777;
}

.favoritos-card-price {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange, #8D2828);
}

.favoritos-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.favoritos-card-remove:hover {
    background: var(--orange, #8D2828);
    color: #fff;
}

.favoritos-card-remove i {
    width: 16px;
    height: 16px;
}
/* ═══ FIN WISHLIST (Capa 4) ═══ */

/* ═══════════════════════════════════════════════════════════
 *  AUTH LOADING OVERLAY — Iniciando / Cerrando sesión
 *  Lo muestra authService.showAuthLoading(text) tras submit del
 *  modal de login y al hacer logout. Se oculta cuando el primer
 *  auth:changed confirma el nuevo estado + un breve grace de
 *  ~250 ms para que cart/notifs terminen de rehidratarse.
 * ═══════════════════════════════════════════════════════════ */

.auth-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 14, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    animation: authOverlayFadeIn 0.2s ease-out;
}

@keyframes authOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.auth-skeleton {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.4rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    animation: authCardPopIn 0.22s ease-out;
}

@keyframes authCardPopIn {
    from { transform: translateY(6px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.auth-skeleton-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.auth-skeleton-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(90deg, #eee 0%, #f6f6f6 50%, #eee 100%);
    background-size: 200% 100%;
    animation: authShimmer 1.4s ease-in-out infinite;
}

.auth-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-skeleton-line {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #eee 0%, #f6f6f6 50%, #eee 100%);
    background-size: 200% 100%;
    animation: authShimmer 1.4s ease-in-out infinite;
}

.auth-skeleton-line-lg { width: 72%; }
.auth-skeleton-line-sm { width: 48%; }

.auth-skeleton-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eee 0%, #f6f6f6 50%, #eee 100%);
    background-size: 200% 100%;
    animation: authShimmer 1.4s ease-in-out infinite;
}

.auth-skeleton-bar-short { width: 65%; }

@keyframes authShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.auth-loading-text {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: #f5e9d9;
    letter-spacing: 0.02em;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
 *  NOTIF SPINNER — estado de carga del dropdown de notificaciones
 *  Aparece la primera vez que initNotifications monta el listener
 *  y el snapshot inicial todavía no llegó. Reutiliza el spinner
 *  del overlay con un tamaño compacto.
 * ═══════════════════════════════════════════════════════════ */

.notif-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1rem;
    gap: 0.55rem;
    color: #aaa;
}

.notif-loading-spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 3px solid rgba(141, 40, 40, 0.15);
    border-top-color: var(--orange, #8D2828);
    animation: authSpin 0.85s linear infinite;
}

.notif-loading p {
    font-size: 0.82rem;
    margin: 0;
}

body.pub-page {
    background-color: var(--white);
}

.pub-hero {
    position: relative;
    background: linear-gradient(135deg, #751d1d 0%, #8D2828 55%, #a83333 100%);
    color: #fff;
    overflow: hidden;
    padding: 64px 0 72px;
}

.pub-hero.pub-hero-skepsi {
    background: linear-gradient(135deg, #12104d 0%, #1A146C 55%, #2a2490 100%);
}

.pub-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 245, 230, 0.14), transparent 70%);
    pointer-events: none;
}

.pub-hero .container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
}

.pub-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 28px;
}

.pub-breadcrumb a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
}

.pub-breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.pub-kicker {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--crema);
    margin-bottom: 16px;
}

.pub-hero h1 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(2.1rem, 4.4vw, 3.2rem);
    line-height: 1.1;
    margin: 0 0 18px;
    max-width: 18ch;
}

.pub-hero h1 em {
    font-style: italic;
    color: var(--crema);
}

.pub-hero-lead {
    font-family: var(--font-body);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 60ch;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 28px;
}

.pub-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 26px;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.pub-btn svg {
    width: 18px;
    height: 18px;
}

.pub-btn-solid {
    background: var(--crema);
    color: var(--orange);
}

.pub-btn-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.pub-btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.pub-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.pub-btn-primary {
    background: var(--orange);
    color: #fff;
}

.pub-btn-primary:hover {
    background: var(--brand-color-dark, #751d1d);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(141, 40, 40, 0.28);
}

.pub-btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pub-main {
    padding: 0 0 24px;
}

.pub-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

.pub-nav-chips {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eee;
}

.pub-nav-chips-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pub-nav-chips-inner::-webkit-scrollbar {
    display: none;
}

.pub-nav-chips a {
    flex: 0 0 auto;
    font-family: var(--font-title);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid #e6e6e6;
    white-space: nowrap;
    transition: all 0.16s ease;
}

.pub-nav-chips a:hover {
    color: var(--orange);
    border-color: var(--orange);
    background: var(--crema);
}

.pub-section {
    padding: 56px 0;
    border-bottom: 1px solid #f0eee9;
}

.pub-section:last-of-type {
    border-bottom: none;
}

.pub-section-head {
    max-width: 64ch;
    margin-bottom: 36px;
}

.pub-section-head .pub-kicker {
    color: var(--orange);
}

.pub-section h2 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--black);
    line-height: 1.2;
    margin: 0 0 14px;
}

.pub-section h2 em {
    font-style: italic;
    color: var(--orange);
}

.pub-section-head p,
.pub-prose p {
    font-family: var(--font-body);
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--text-color);
    margin: 0 0 16px;
}

.pub-prose {
    max-width: 70ch;
}

.pub-prose strong {
    color: var(--black);
}

.pub-grid {
    display: grid;
    gap: 22px;
}

.pub-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pub-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pub-card {
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: var(--border-radius);
    padding: 28px 26px;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pub-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.pub-card .pub-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--crema);
    color: var(--orange);
    margin-bottom: 16px;
}

.pub-card .pub-card-icon svg {
    width: 22px;
    height: 22px;
}

.pub-card h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--black);
    margin: 0 0 10px;
}

.pub-card p {
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.pub-steps {
    display: grid;
    gap: 20px;
    counter-reset: pubstep;
}

.pub-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 22px;
    align-items: start;
    background: var(--white);
    border: 1px solid #ececec;
    border-left: 4px solid var(--orange);
    border-radius: var(--border-radius);
    padding: 26px 28px;
    box-shadow: var(--shadow);
}

.pub-step-num {
    counter-increment: pubstep;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-gradient, linear-gradient(135deg, #8D2828, #a83333));
    color: #fff;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.4rem;
    display: grid;
    place-items: center;
}

.pub-step-num::before {
    content: counter(pubstep);
}

.pub-step h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--black);
    margin: 4px 0 10px;
}

.pub-step p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.68;
    color: var(--text-color);
    margin: 0 0 10px;
}

.pub-step p:last-child {
    margin-bottom: 0;
}

.pub-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.pub-list li {
    position: relative;
    padding-left: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.pub-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--crema);
    border: 2px solid var(--orange);
}

.pub-list li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}

.pub-note {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    align-items: start;
    background: var(--crema);
    border-left: 5px solid var(--orange);
    border-radius: var(--border-radius);
    padding: 24px 26px;
    margin: 8px 0;
}

.pub-note .pub-note-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    display: grid;
    place-items: center;
}

.pub-note .pub-note-icon svg {
    width: 22px;
    height: 22px;
}

.pub-note h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--black);
    margin: 2px 0 8px;
}

.pub-note p {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--text-color);
    margin: 0 0 12px;
}

.pub-note p:last-child {
    margin-bottom: 0;
}

.pub-note a.pub-inline-link {
    color: var(--orange);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(141, 40, 40, 0.4);
}

.pub-note a.pub-inline-link:hover {
    border-bottom-color: var(--orange);
}

.pub-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: 1px solid #ececec;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pub-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 24px;
    border-bottom: 1px solid #f0eee9;
    border-right: 1px solid #f0eee9;
}

.pub-spec-label {
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
}

.pub-spec-value {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color);
}

.pub-table-wrap {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid #ececec;
    box-shadow: var(--shadow);
}

.pub-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.pub-table th,
.pub-table td {
    text-align: left;
    padding: 16px 18px;
    border-bottom: 1px solid #f0eee9;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    vertical-align: top;
}

.pub-table thead th {
    background: var(--orange);
    color: #fff;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
}

.pub-table tbody tr:nth-child(even) {
    background: #faf8f4;
}

.pub-table td:first-child {
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--black);
    white-space: nowrap;
}

.pub-timeline {
    display: grid;
    gap: 0;
    counter-reset: pubtl;
}

.pub-tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    padding: 0 0 32px 0;
}

.pub-tl-item:last-child {
    padding-bottom: 0;
}

.pub-tl-marker {
    position: relative;
    display: flex;
    justify-content: center;
}

.pub-tl-dot {
    counter-increment: pubtl;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-gradient, linear-gradient(135deg, #8D2828, #a83333));
    color: #fff;
    font-family: var(--font-title);
    font-weight: 700;
    display: grid;
    place-items: center;
    z-index: 1;
    flex: 0 0 auto;
}

.pub-tl-dot::before {
    content: counter(pubtl);
}

.pub-tl-item:not(:last-child) .pub-tl-marker::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: -32px;
    width: 2px;
    background: linear-gradient(to bottom, var(--orange), #e3d8c8);
}

.pub-tl-body {
    padding-top: 6px;
}

.pub-tl-body h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--black);
    margin: 0 0 8px;
}

.pub-tl-body p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.68;
    color: var(--text-color);
    margin: 0;
}

.pub-tl-tag {
    display: inline-block;
    margin-top: 10px;
    font-family: var(--font-title);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange);
    background: var(--crema);
    padding: 5px 12px;
    border-radius: 999px;
}

.pub-cta-band {
    background: var(--crema);
    border-radius: 18px;
    padding: 44px 40px;
    text-align: center;
    margin: 16px 0;
}

.pub-cta-band h2 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    color: var(--black);
    margin: 0 0 12px;
}

.pub-cta-band p {
    font-family: var(--font-body);
    font-size: 1.04rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 56ch;
    margin: 0 auto 24px;
}

.pub-cta-band .pub-hero-actions {
    justify-content: center;
}

.pub-form-section {
    background: #faf8f4;
}

.pub-mail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 760px;
    margin: 0 auto;
}

.pub-mail-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 24px 26px;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pub-mail-card:hover {
    transform: translateY(-3px);
    border-color: var(--orange);
    box-shadow: 0 12px 30px rgba(141, 40, 40, 0.14);
}

.pub-mail-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--crema);
    color: var(--orange);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.pub-mail-icon svg {
    width: 24px;
    height: 24px;
}

.pub-mail-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pub-mail-label {
    font-family: var(--font-title);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
}

.pub-mail-address {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
    word-break: break-all;
}

.pub-mail-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-title);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

.pub-mail-cta svg {
    width: 15px;
    height: 15px;
}

.pub-mail-card:hover .pub-mail-cta {
    color: var(--orange);
}

.pub-quote {
    text-align: center;
    max-width: 60ch;
    margin: 0 auto;
}

.pub-quote blockquote {
    font-family: var(--font-title);
    font-style: italic;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    line-height: 1.5;
    color: var(--black);
    margin: 0 0 14px;
}

.pub-quote cite {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
    font-style: normal;
}

@media (max-width: 880px) {
    .pub-grid-2,
    .pub-grid-3,
    .pub-mail-grid {
        grid-template-columns: 1fr;
    }
    .pub-specs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .pub-hero {
        padding: 48px 0 54px;
    }
    .pub-section {
        padding: 42px 0;
    }
    .pub-step {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .pub-cta-band {
        padding: 34px 22px;
    }
}

.mega-novedades-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}

.mega-nov-card {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    transition: background 0.16s ease;
}

.mega-nov-card:hover {
    background: var(--crema);
}

.mega-nov-cover {
    flex: 0 0 auto;
    width: 56px;
    height: 84px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #eee;
}

.mega-nov-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mega-nov-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mega-nov-title {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--black);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mega-nov-author {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mega-nov-cta {
    font-family: var(--font-title);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--orange);
    margin-top: 2px;
}

.grecaptcha-badge { visibility: hidden; }
.footer-recaptcha-notice { font-size: 0.72rem; line-height: 1.4; color: var(--text-muted, #8a8a8a); margin: 0.5rem 0 0; opacity: 0.85; }
.footer-recaptcha-notice a { color: inherit; text-decoration: underline; }

/* --- OFERTAS (tarjetas 2 columnas) --- */
.ofertas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.offer-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.offer-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); transform: translateY(-3px); }
.offer-card-media { position: relative; display: block; aspect-ratio: 3 / 4; background: #f5f0e8; overflow: hidden; }
.offer-card-media img { width: 100%; height: 100%; object-fit: cover; }
.offer-card-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--primary-color, #8d2828); color: #fff;
    font-size: 0.78rem; font-weight: 800; padding: 3px 8px; border-radius: 6px;
}
.offer-card-body { display: flex; flex-direction: column; gap: 2px; padding: 0.7rem 0.8rem 0.9rem; }
.offer-card-name {
    font-weight: 700; font-size: 0.95rem; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.offer-card-author { font-size: 0.8rem; color: #888; }
.offer-card-prices { margin-top: 0.35rem; display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap; }
.offer-card-price { font-weight: 800; color: var(--primary-color, #8d2828); font-size: 1.05rem; }
.offer-card-old { font-size: 0.85rem; color: #999; text-decoration: line-through; }
@media (min-width: 768px) { .ofertas-grid { grid-template-columns: repeat(4, 1fr); } }

/* --- ACCESOS RÁPIDOS DEL HOME --- */
.home-shortcuts {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1rem 0 0.25rem;
    margin: 0 auto;
    max-width: 1200px;
    padding-left: 16px;
    padding-right: 16px;
}
.home-shortcuts::-webkit-scrollbar { display: none; }
.home-shortcut {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 68px;
    text-decoration: none;
    color: var(--text-color);
}
.home-shortcut-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: #f6f1ea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d2828;
    transition: transform 0.2s ease;
}
.home-shortcut:hover .home-shortcut-icon { transform: translateY(-3px); }
.home-shortcut-icon img { width: 34px; height: 34px; object-fit: contain; display: block; }
.home-shortcut-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: #555;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Accesos rápidos: solo móvil */
@media (min-width: 993px) {
    .home-shortcuts { display: none; }
}

/* Branding por sello en las tarjetas de listado (categoría / búsqueda) */
.listing-card--ibanez { border-top: 3px solid #8D2828; }
.listing-card--skepsi { border-top: 3px solid #1A146C; }
.listing-card--ibanez .listing-card-title { color: #8D2828; }
.listing-card--skepsi .listing-card-title { color: #1A146C; }
.listing-card--ibanez .listing-cta { background: #8D2828; color: #fff; border-color: #8D2828; }
.listing-card--skepsi .listing-cta { background: #1A146C; color: #fff; border-color: #1A146C; }
.listing-card--ibanez .listing-cta:hover { background: #6f1f1f; }
.listing-card--skepsi .listing-cta:hover { background: #120d4f; }
.listing-badge-offer { background: #c62828; color: #fff; }

/* Marca del libro con cupón funnel en el carrito + cupón no-borrable */
.cart-item--coupon { box-shadow: inset 0 0 0 1.5px rgba(27, 138, 78, 0.45); border-radius: 8px; }
.cart-item-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1b8a4e;
    background: #e8f5ec;
    padding: 3px 8px;
    border-radius: 6px;
    width: fit-content;
}
.cart-item-coupon-tag i, .cart-item-coupon-tag svg { width: 13px; height: 13px; }
.coupon-banner-locked { display: inline-flex; align-items: center; color: #b08a3c; }
.coupon-banner-locked i, .coupon-banner-locked svg { width: 16px; height: 16px; }

.legal-page { background: #faf7f2; }
.legal-main { padding: 2rem 0 4rem; }
.legal-inner { max-width: 860px; margin: 0 auto; }
.legal-breadcrumb { font-size: 0.9rem; margin-bottom: 1.5rem; color: #6b6258; display: flex; gap: 0.5rem; align-items: center; }
.legal-breadcrumb a { color: #8D2828; text-decoration: none; }
.legal-breadcrumb a:hover { text-decoration: underline; }
.legal-card { background: #fff; border: 1px solid #ece4d6; border-radius: 14px; padding: 2.5rem; box-shadow: 0 6px 24px rgba(112, 74, 37, 0.06); }
.legal-card h1 { font-family: 'Ubuntu', sans-serif; color: #2c2620; font-size: 2rem; margin: 0 0 0.4rem; }
.legal-updated { color: #8a8175; font-size: 0.88rem; margin-bottom: 2rem; }
.legal-card h2 { font-family: 'Ubuntu', sans-serif; color: #8D2828; font-size: 1.25rem; margin: 2.2rem 0 0.8rem; }
.legal-card h3 { color: #2c2620; font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.legal-card p, .legal-card li { color: #4a443c; line-height: 1.7; font-size: 0.98rem; }
.legal-card ul { padding-left: 1.3rem; margin: 0.6rem 0 1rem; }
.legal-card li { margin-bottom: 0.4rem; }
.legal-card a { color: #8D2828; }
.legal-card strong { color: #2c2620; }
.legal-toc { background: #f6efe3; border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 2rem; }
.legal-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.legal-toc a { text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal-contact-box { background: #f6efe3; border-radius: 10px; padding: 1.2rem 1.4rem; margin-top: 1rem; }
@media (max-width: 600px) { .legal-card { padding: 1.5rem; } .legal-card h1 { font-size: 1.6rem; } }
