/*
 * Epicbook Brand Design System
 * ----------------------------
 * Portado de index.css / vibrant_reference.css del sitio de referencia
 * (epicbook.mx). En epicbook_website.layout se carga ANTES de tailwind.css
 * (build local, ver tailwind.config.js), igual que antes con el CDN, que
 * inyectaba su <style> al final del <head>: en empates de especificidad gana
 * Tailwind, así que estas reglas necesitan un selector más específico
 * (ej. `.legal-page p`) para ganarle al preflight.
 */

:root {
    --brand-navy: #060A30;
    --brand-gold: #B3C3DA;
    --brand-gold-hover: #9cafca;
    --brand-gray: #35455C;
    --brand-dark-text: #04082E;
    --brand-white: #FFFFFF;

    --font-sans: 'TT Norms', 'Inter', -apple-system, sans-serif;
    --font-serif: 'Playfair Display', serif;

    --eb-transition: 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: var(--font-sans);
}

h1, h2, h3, .heading-navy {
    color: var(--brand-navy);
}

.accent-serif, .serif {
    font-family: var(--font-serif);
}

.title-xl {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    border: 1px solid var(--brand-gray);
    padding: 0.4rem 1rem;
    display: inline-block;
    border-radius: 4px;
}

/* Gradient mask usado en el hero para difuminar la imagen de fondo */
.bg-fade-right {
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0) 100%);
}

/* Header "glass" al hacer scroll (activado por epicbook.js) */
#main-header.glass {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(6, 10, 48, 0.06);
}

/* Oculta la barra de scroll (usado en la estantería horizontal de libros) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Botones reutilizables (por si alguna sección usa las clases en vez de utilidades Tailwind directas) */
.btn-gold {
    background-color: var(--brand-gold);
    color: var(--brand-dark-text);
    padding: 1rem 2rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-gold:hover {
    background-color: var(--brand-gold-hover);
    box-shadow: 0 10px 20px rgba(179, 195, 218, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--brand-gray);
    color: var(--brand-gray);
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.floating-card {
    background: white;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-left: 6px solid var(--brand-navy);
    transition: transform 0.5s var(--eb-transition);
}

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

.fade-in-up {
    animation: fadeInUp 0.8s var(--eb-transition) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Inputs del formulario de contacto */
.input-focus:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--brand-gold);
}

/* ------------------------------------------------------------------
 * Páginas legales (privacidad, términos)
 * El preflight de Tailwind (CDN) resetea márgenes de h2/p/ul a 0; estas
 * reglas restauran la legibilidad de texto corrido sin depender de
 * utilidades Tailwind en cada párrafo (el sitio de referencia tampoco
 * las usaba en estas dos páginas).
 * ------------------------------------------------------------------ */
.legal-page {
    /* El <body> del layout es bg-brand-navy y estas páginas no ponen fondo
       propio: texto claro para que tenga contraste (antes gris/navy, ilegible). */
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.legal-page strong {
    color: var(--brand-white);
}

.legal-page h2 {
    color: var(--brand-white);
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.legal-page p {
    margin-bottom: 1rem;
}

.legal-page ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page li {
    margin-bottom: 0.4rem;
}

.legal-page a {
    color: var(--brand-gold-hover);
}

/* ------------------------------------------------------------------
 * Header/footer "nativos" — usados SOLO en páginas que Odoo controla
 * (/shop, checkout, /my/*, /web/login...) vía website_layout.xml.
 * Réplica fiel del header/footer real (mismo menú, mismo logo, mismo
 * estilo, mismo menú móvil) pero en CSS plano: Tailwind no se carga en
 * website.layout a propósito (rompería el layout nativo de Odoo, que
 * usa Bootstrap). Los valores de tipografía/color/espaciado de abajo
 * son equivalentes a mano de las clases Tailwind del header/footer real
 * (ver views/layout.xml).
 * ------------------------------------------------------------------ */
.eb-native-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(6, 10, 48, 0.06);
}

.eb-native-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.eb-native-logo img {
    height: 52px;
    width: auto;
    display: block;
}

@media (min-width: 1024px) {
    .eb-native-header-inner { padding: 16px 64px; }
    .eb-native-logo img { height: 62px; }
}

.eb-native-nav {
    display: none;
}

@media (min-width: 1024px) {
    .eb-native-nav {
        display: flex;
        align-items: center;
        gap: 24px;
        font-size: 14px;
        font-weight: 500;
    }
}

.eb-native-nav a,
.eb-native-mobile-menu a {
    color: var(--brand-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.eb-native-nav a:hover,
.eb-native-mobile-menu a:hover {
    color: var(--brand-gold-hover);
}

.eb-native-sep {
    display: inline-block;
    width: 1px;
    height: 16px;
    background: #e5e7eb;
}

.eb-native-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    color: var(--brand-navy);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .eb-native-menu-btn { display: none; }
}

.eb-native-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 999;
    padding: 96px 32px 40px;
    overflow-y: auto;
    font-size: 18px;
    font-weight: 500;
}

.eb-native-mobile-menu.is-open {
    display: flex;
}

.eb-native-mobile-menu a {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 16px;
}

@media (min-width: 1024px) {
    .eb-native-mobile-menu { display: none !important; }
}

/* Footer */
.eb-native-footer {
    background: var(--brand-navy);
    padding: 64px 24px 40px;
}

.eb-native-footer-inner {
    max-width: 1600px;
    margin: 0 auto;
}

.eb-native-footer-brands {
    text-align: center;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 64px;
}

.eb-native-footer-brands > p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.eb-native-footer-brand-card {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 40px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.eb-native-footer-brand-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.eb-native-footer-brand-card img {
    height: 32px;
    width: auto;
}

.eb-native-footer-brand-card span {
    text-align: left;
}

.eb-native-footer-brand-card strong {
    display: block;
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.eb-native-footer-brand-card em {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 14px;
    margin-top: 4px;
}

.eb-native-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
    opacity: 0.6;
    transition: opacity 0.7s ease;
}

.eb-native-footer-grid:hover {
    opacity: 1;
}

@media (min-width: 1024px) {
    .eb-native-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.eb-native-footer-legal {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eb-native-footer-legal a {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    width: fit-content;
}

.eb-native-footer-legal a:hover {
    color: var(--brand-gold);
}

.eb-native-footer-logo {
    display: flex;
    justify-content: center;
}

.eb-native-footer-logo img {
    height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.eb-native-footer-social {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 1024px) {
    .eb-native-footer-social { align-items: flex-end; }
}

.eb-native-footer-social > p {
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.eb-native-footer-social > div {
    display: flex;
    align-items: center;
    gap: 20px;
}

.eb-native-footer-social a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.eb-native-footer-social a:hover {
    color: var(--brand-gold);
}

.eb-native-footer-copy {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #fff;
    opacity: 0.2;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ------------------------------------------------------------------
 * Encabezado de marca arriba de /shop (ver website_sale_shop.xml).
 * Equivalente a mano del H1 que tenía la página propia /libros
 * (eliminada) — mismo motivo que .eb-native-*: sin Tailwind aquí.
 * ------------------------------------------------------------------ */
.eb-shop-header {
    max-width: 1600px;
    margin: 0 auto;
    padding: 48px 24px 8px;
    text-align: center;
}

.eb-shop-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

@media (min-width: 1024px) {
    .eb-shop-header h1 {
        font-size: 4.5rem;
    }
}

.eb-shop-header h1 span {
    color: rgba(6, 10, 48, 0.4);
    font-style: italic;
    font-family: var(--font-serif);
}

/* ------------------------------------------------------------------
 * Sección "Nuestros libros publicados por otras editoriales" arriba de /shop
 * (2026-10-14, ver website_sale_shop.xml + controllers/website_sale.py).
 * El título reutiliza .eb-shop-header; aquí solo va el respiro entre la
 * rejilla de esta sección y el "La Colección Epicbook" que sigue abajo,
 * para que se lean como dos bloques distintos.
 * ------------------------------------------------------------------ */
.eb-shop-section .eb-shop-header {
    padding-bottom: 24px;
}

/* El título de esta sección es más largo que "La Colección Epicbook", a
 * tamaño completo (4.5rem) ocupaba todo el ancho pegado a los bordes; a
 * pedido del cliente (2026-10-14) va un escalón más chico y partido en
 * dos líneas con un <br/> (ver website_sale_shop.xml), con aire entre ellas. */
.eb-shop-section .eb-shop-header h1 {
    font-size: 2rem;
    line-height: 1.1;
}

@media (min-width: 1024px) {
    .eb-shop-section .eb-shop-header h1 {
        font-size: 3rem;
    }
}

.eb-shop-section .o_wsale_products_grid_table_wrapper {
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(6, 10, 48, 0.1);
}
