/* =========================================================
   ESTILOS PRINCIPALES DEL TEMA
   ========================================================= */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: #FAF7F2; 
    color: #4A3F35; 
}

.site-main {
    padding: 30px 0;
    min-height: 50vh;
}

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

.page-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 50px;
    font-size: 32px;
}

/* =========================================================
   CABECERA Y NAVEGACIÓN
   ========================================================= */
.site-header {
    background-color: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
}

.header-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding img {
    max-width: 200px;
    height: auto;
    display: block;
}

.site-branding a {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.nav-menu li a {
    text-decoration: none;
    color: #4A3F35;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-menu li a:hover {
    color: #D46A43;
}

/* =========================================================
   ÍCONOS SOCIALES (CABECERA)
   ========================================================= */
.social-vip-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    background-color: #FAF7F2;
    color: #4A3F35;
    border-radius: 50%;
    border: 1px solid #E8E1D7;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: #D46A43;
    color: #ffffff;
    border-color: #D46A43;
    transform: translateY(-3px);
}

.vip-icon {
    background-color: #D46A43;
    color: #ffffff;
    border-color: #D46A43;
}

.vip-icon:hover {
    background-color: #4A3F35;
    border-color: #4A3F35;
}

.social-icon svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =========================================================
   CARRUSEL DE NOVEDADES Y HERO
   ========================================================= */
.hero-ebooks {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    border: 1px solid #E8E1D7;
    box-shadow: 0 4px 15px rgba(74, 63, 53, 0.03);
}

.hero-text {
    text-align: center;
    margin-bottom: 40px;
}

.hero-text .page-title {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero-text .page-title span {
    color: #D46A43;
}

.hero-subtitle {
    font-size: 18px;
    color: #666666;
    font-weight: 500;
}

.carousel-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #4A3F35;
    border-bottom: 2px solid #E8E1D7;
    padding-bottom: 10px;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-track { background: #FAF7F2; border-radius: 4px; }
.carousel-track::-webkit-scrollbar-thumb { background: #E8E1D7; border-radius: 4px; }

.carousel-slide {
    flex: 0 0 220px;
    scroll-snap-align: start;
}

.carousel-slide.premium-cover {
    flex: 0 0 150px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.carousel-slide.premium-cover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 25px rgba(74, 63, 53, 0.2); 
}

.carousel-slide.premium-cover img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: 8px;
    display: block;
}

.section-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(74, 63, 53, 0.1), rgba(0, 0, 0, 0));
    margin: 40px 0;
}

.catalog-title {
    font-size: 28px;
    color: #4A3F35;
    margin-bottom: 25px;
    text-align: center;
}

/* =========================================================
   BUSCADOR Y FILTROS
   ========================================================= */
.store-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 25px;
    background-color: #FFFFFF;
    border: 1px solid #E8E1D7;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(74, 63, 53, 0.05);
    flex-wrap: wrap;
    gap: 20px;
}

.search-form { display: flex; }

.search-field {
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 5px 0 0 5px;
    width: 250px;
    font-size: 14px;
    outline: none;
}

.search-field:focus { border-color: #D46A43; }

.search-submit {
    background-color: #4A3F35;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-submit:hover { background-color: #312923; }

.product-categories {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cat-link {
    background-color: #ffffff;
    color: #555555;
    padding: 6px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #cccccc;
    transition: all 0.3s ease;
}

.cat-link:hover {
    background-color: #D46A43;
    color: #ffffff;
    border-color: #D46A43;
}

/* =========================================================
   CUADRÍCULA DE LIBROS (CATÁLOGO)
   ========================================================= */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.book-card {
    background: #ffffff;
    border: 1px solid #E8E1D7;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.book-card img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: 5px;
    display: block;
    margin-bottom: 15px;
}

.book-card h2 {
    font-size: 18px;
    margin: 10px 0;
}

.book-card h2 a {
    color: #4A3F35;
    text-decoration: none;
}

.book-price-catalog {
    font-size: 16px;
    font-weight: bold;
    color: #D46A43;
    margin-bottom: 10px;
}

.button-buy {
    display: inline-block;
    background-color: #D46A43;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.button-buy:hover { background-color: #B85530; }

.catalog-format-badge {
    display: inline-block;
    background-color: #E8E1D7;
    color: #D46A43;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* =========================================================
   PAGINACIÓN BLINDADA (ESTILOS FORZADOS)
   ========================================================= */
.booknautas-paginacion {
    margin: 40px auto !important;
    text-align: center !important;
    width: 100% !important;
    clear: both !important;
}

.booknautas-paginacion ul {
    display: flex !important;
    justify-content: center !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 10px !important;
}

.booknautas-paginacion ul li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.booknautas-paginacion ul li a,
.booknautas-paginacion ul li span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 18px !important;
    background-color: #FAF7F2 !important;
    color: #4A3F35 !important;
    border: 1px solid #E8E1D7 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

.booknautas-paginacion ul li a:hover {
    background-color: #E8E1D7 !important;
    color: #D46A43 !important;
}

.booknautas-paginacion ul li span.current {
    background-color: #D46A43 !important;
    color: #ffffff !important;
    border-color: #D46A43 !important;
}

/* =========================================================
   PÁGINA DEL PRODUCTO INDIVIDUAL
   ========================================================= */
.single-book-container { padding: 60px 20px; }

.book-layout {
    display: flex;
    gap: 50px;
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    align-items: flex-start;
}

.book-cover {
    flex: 1;
    max-width: 400px;
}

.book-cover img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    object-fit: cover !important;
    object-position: top center !important;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-info { flex: 2; }

.book-title {
    font-size: 36px;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.2;
}

.book-price {
    font-size: 28px;
    font-weight: bold;
    color: #D46A43;
    margin-bottom: 25px;
}

.book-price del {
    color: #95a5a6;
    font-size: 20px;
    margin-right: 10px;
}

.book-synopsis {
    font-size: 16px;
    line-height: 1.8;
    color: #555555;
    margin-bottom: 30px;
}

.book-format-badge {
    display: inline-block;
    background-color: #FAF7F2;
    border: 1px solid #E8E1D7;
    color: #4A3F35;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
}

.book-format-badge span {
    color: #D46A43;
    font-weight: bold;
    margin-left: 5px;
}

.book-buy-action .single_add_to_cart_button {
    background-color: #D46A43 !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    padding: 15px 40px !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    width: 100% !important;
    max-width: 300px !important;
    text-align: center !important;
    display: block !important;
    margin-top: 10px !important;
}

.book-buy-action .single_add_to_cart_button:hover {
    background-color: #B85530 !important;
    transform: translateY(-2px) !important;
}

/* =========================================================
   BOTONES DE COMPARTIR BLINDADOS
   ========================================================= */
.booknautas-compartir {
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 1px solid #E8E1D7 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.booknautas-compartir span {
    font-weight: bold !important;
    color: #4A3F35 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 !important;
}

.booknautas-compartir a.share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}

.booknautas-compartir a.share-btn svg {
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important;
    display: block !important;
    margin: 0 !important;
}

.booknautas-compartir a.share-x { background-color: #000000 !important; }
.booknautas-compartir a.share-pin { background-color: #E60023 !important; }
.booknautas-compartir a.share-fb { background-color: #1877F2 !important; }

.booknautas-compartir a.share-btn:hover {
    transform: translateY(-3px) !important;
    opacity: 0.85 !important;
}

/* =========================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================= */
.site-footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 60px 0 20px 0;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 40px;
}

.footer-column { flex: 1; }
.footer-column h3 { color: #ffffff; font-size: 18px; margin-bottom: 20px; }
.footer-column p { line-height: 1.6; font-size: 14px; }

.footer-link {
    display: block;
    color: #cccccc;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-link:hover { color: #ffffff; }

.vip-footer { color: #D46A43; font-weight: bold; }
.vip-footer:hover { color: #B85530; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333333;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 13px;
    color: #888888;
}

/* =========================================================
   ADAPTABILIDAD PARA MÓVILES (RESPONSIVE)
   ========================================================= */
@media (max-width: 768px) {
    .header-layout {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .site-navigation {
        order: 3;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }
    .nav-menu {
        justify-content: center;
        flex-wrap: wrap;
    }
    .social-vip-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    .store-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .product-search, .search-form, .search-field { width: 100%; }
    .product-categories { justify-content: center; }
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding: 0 15px;
    }
    .book-layout {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
    }
    .book-cover {
        max-width: 100%;
        margin: 0 auto;
    }
    .hero-ebooks { padding: 20px; }
    .hero-text .page-title { font-size: 28px; }
    .carousel-slide { flex: 0 0 160px; }
    .carousel-slide.premium-cover { flex: 0 0 120px; }
}

@media (max-width: 480px) {
    .page-title { font-size: 24px; }
    .book-title { font-size: 28px; }
}
.booknautas-compartir a.share-wa { background-color: #25D366 !important; }
.booknautas-compartir a.share-tg { background-color: #0088cc !important; }

/* =========================================================
   BOTÓN DE SOPORTE TÉCNICO (FOOTER)
   ========================================================= */
.support-footer-widget {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333333; /* Una línea sutil para separarlo del texto */
}

.btn-soporte-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #D46A43; /* Terracota cálido de Booknautas */
    color: #ffffff !important;
    padding: 14px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(212, 106, 67, 0.2); /* Sombra brillante */
    width: 100%; /* Ocupa todo el ancho de la columna */
    box-sizing: border-box;
}

/* Efecto al pasar el ratón */
.btn-soporte-footer:hover {
    background-color: #B85530;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 106, 67, 0.4);
}

/* =========================================================
   BOTÓN Y VENTANA EMERGENTE "CÓMO FUNCIONA"
   ========================================================= */

/* El botón de la cabecera */
.btn-como-funciona {
    background-color: #FAF7F2;
    color: #4A3F35;
    border: 1px solid #E8E1D7;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-como-funciona:hover {
    background-color: #D46A43;
    color: #ffffff;
    border-color: #D46A43;
    transform: translateY(-2px);
}

/* El fondo oscuro de la ventana (Modal) */
.modal-booknautas {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999; /* Para que quede por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fondo negro semitransparente */
    align-items: center;
    justify-content: center;
}

/* La caja blanca central */
.modal-contenido {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: aparecerModal 0.3s ease-out; /* Efecto de aparición */
}

@keyframes aparecerModal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* La X para cerrar */
.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cerrar-modal:hover { color: #D46A43; }

/* Los textos del interior */
.titulo-modal {
    color: #4A3F35;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #FAF7F2;
    padding-bottom: 10px;
}

.pasos-instrucciones p {
    color: #555555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    background-color: #FAF7F2;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #D46A43; /* Un detalle de color a la izquierda */
}

.pasos-instrucciones strong {
    color: #4A3F35;
}

/* El botón final de confirmación */
.btn-entendido {
    display: block;
    width: 100%;
    background-color: #D46A43;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.btn-entendido:hover {
    background-color: #B85530;
}