:root{
    --rojo:#b33a2f;
    --terracota:#c96d44;
    --gris:#333;
    --gris-claro:#f5f5f5;
    --blanco:#fff;
}

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

body{
    font-family:'Montserrat',sans-serif;
    background:var(--gris-claro);
    color:var(--gris);
}

/* HEADER */
header{
    background:var(--blanco);
    border-bottom:4px solid var(--rojo);
    padding:20px 40px;
}

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

/* LOGO */
.logo-section{
    flex:1;
}

.logo{
    height:90px;
}

/* BUSCADOR */
.search-section{
    flex:2;
    display:flex;
    justify-content:center;
}

.search-form{
    width:100%;
    max-width:500px;
    display:flex;
    background:#f1f1f1;
    border-radius:50px;
    overflow:hidden;
    border:2px solid transparent;
    transition:0.3s;
}

.search-form:focus-within{
    border-color:var(--rojo);
}

.search-form input{
    flex:1;
    border:none;
    padding:15px 20px;
    background:none;
    outline:none;
    font-size:15px;
}

.search-form button{
    width:60px;
    border:none;
    background:var(--rojo);
    color:white;
    cursor:pointer;
    transition:0.3s;
}

.search-form button:hover{
    background:var(--terracota);
}

/* LADO DERECHO */
.right-section{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:15px;
}

/* REDES */
.social-icons{
    display:flex;
    gap:15px;
}

.social-icons a{
    width:40px;
    height:40px;
    border-radius:50%;
    background:var(--rojo);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    transition:0.3s;
}

.social-icons a:hover{
    background:var(--terracota);
    transform:translateY(-3px);
}

/* MENU */
.main-menu ul{
    display:flex;
    list-style:none;
    gap:20px;
}

.main-menu a{
    text-decoration:none;
    color:var(--gris);
    font-weight:600;
    position:relative;
    transition:0.3s;
}

.main-menu a::after{
    content:'';
    position:absolute;
    width:0%;
    height:2px;
    left:0;
    bottom:-5px;
    background:var(--rojo);
    transition:0.3s;
}

.main-menu a:hover{
    color:var(--rojo);
}

.main-menu a:hover::after{
    width:100%;
}

/* CATALOGO */
/* ============================= */
/* BREADCRUMB */
/* ============================= */

.breadcrumb{
    display:flex;
    align-items:center;
    gap:10px;

    padding:20px 30px;    

    background:white;

    border-bottom:1px solid #eee;

    font-size:14px;
}

.breadcrumb a{
    text-decoration:none;
    color:var(--rojo);

    font-weight:600;
}

.breadcrumb span{
    color:#666;
}

/* ============================= */
/* CONTENEDOR PRINCIPAL */
/* ============================= */

/*
.contenedor-principal{
    display:flex;

    align-items:flex-start;

    gap:30px;

    padding:20px 30px;  
}
*/

.contenedor-principal{
    display:flex;
    align-items:flex-start;
    gap:30px;

    /* MENOS ESPACIO SUPERIOR */
    padding:25px 30px 30px 30px;
}

/* ============================= */
/* SIDEBAR */
/* ============================= */

.sidebar-filtros{
    width:280px;

    min-width:280px;

    background:white;

    padding:25px;

    border-radius:16px;

    box-shadow:0 4px 14px rgba(0,0,0,0.08);

    position:sticky;

    top:20px;
}

/* ============================= */
/* CATALOGO */
/* ============================= */

.catalogo{
    flex:1;
    display:grid;
    /* EXACTAMENTE 4 COLUMNAS */
    grid-template-columns:repeat(4, 1fr);
    gap:25px;
    align-items:start;
}

/* TARJETAS */
.libro{
    background:white;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    transition:all 0.3s ease;
}

.libro:hover{
    transform:translateY(-8px);
    box-shadow:0 12px 25px rgba(0,0,0,0.15);
}

/* IMAGEN */
.libro img{
    width:100%;
    height:300px;
    object-fit:cover;
    display:block;
}

/* CONTENIDO */
.contenido-libro{
    padding:18px;
}

.libro h3{
    font-size:16px;

    line-height:1.4;

    margin-bottom:10px;

    min-height:48px;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media(max-width:1200px){

    .catalogo{
        grid-template-columns:repeat(3, 1fr);
    }

}

@media(max-width:992px){

    .contenedor-principal{
        flex-direction:column;
    }

    .sidebar-filtros{
        width:100%;

        min-width:100%;

        position:relative;
    }

    .catalogo{
        grid-template-columns:repeat(2, 1fr);

        width:100%;
    }

}

@media(max-width:600px){

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

    .breadcrumb{
        padding:15px 20px;
    }

}



/* PRECIOS */
.precio{
    margin-bottom:20px;
}

.original{
    text-decoration:line-through;
    color:#999;
    margin-right:10px;
}

.descuento{
    color:var(--rojo);
    font-size:22px;
    font-weight:700;
}

/* BOTON */
.cta{
    display:block;
    text-align:center;
    background:var(--rojo);
    color:white;
    text-decoration:none;
    padding:12px;
    border-radius:8px;
    transition:0.3s;
    font-weight:600;
}

.cta:hover{
    background:var(--terracota);
}

/* PAGINACION */
.paginacion{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    padding:40px;
}

.paginacion a{
    padding:10px 15px;
    background:white;
    color:var(--rojo);
    text-decoration:none;
    border-radius:8px;
    transition:0.3s;
    font-weight:600;
}

.paginacion a:hover{
    background:var(--rojo);
    color:white;
}

.paginacion .activo{
    background:var(--rojo);
    color:white;
}

/* FOOTER */
footer{
    background:var(--gris);
    color:white;
    text-align:center;
    padding:30px 20px;
    margin-top:50px;
}

footer p{
    margin:5px 0;
}

/* RESPONSIVE */
@media(max-width:992px){

    .header-container{
        flex-direction:column;
        text-align:center;
    }

    .right-section{
        align-items:center;
    }

    .main-menu ul{
        flex-wrap:wrap;
        justify-content:center;
    }

}

@media(max-width:600px){

    .catalogo{
        padding:20px;
    }

    .search-form input{
        width:100%;
    }

}

/* Estilos lado izquierdo, buscador */

/* ============================= */
/* LAYOUT PRINCIPAL */
/* ============================= */
/*
.contenedor-principal{
    display:flex;
    align-items:flex-start;
    gap:35px;
    padding:40px;
}
*/
/* ============================= */
/* SIDEBAR FILTROS */
/* ============================= */

.sidebar-filtros{
    width:280px;
    min-width:280px;

    background:white;

    padding:25px;

    border-radius:16px;

    box-shadow:0 4px 14px rgba(0,0,0,0.08);

    position:sticky;

    top:20px;
}

.sidebar-filtros h2{
    font-size:22px;
    margin-bottom:25px;
    color:var(--rojo);
}

/* FORMULARIO */
.filtro-form{
    display:flex;
    flex-direction:column;
    gap:20px;
}

/* GRUPOS */
.filtro-grupo{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.filtro-grupo label{
    font-weight:600;
    font-size:14px;
}

/* INPUTS */
.filtro-grupo input,
.filtro-grupo select{
    padding:12px 14px;

    border:1px solid #ddd;

    border-radius:10px;

    outline:none;

    font-size:14px;

    transition:0.3s;
}

.filtro-grupo input:focus,
.filtro-grupo select:focus{
    border-color:var(--rojo);

    box-shadow:0 0 0 3px rgba(179,58,47,0.1);
}

/* BOTON */
.btn-filtro{
    border:none;

    background:var(--rojo);

    color:white;

    padding:14px;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;

    font-size:15px;

    transition:0.3s;
}

.btn-filtro:hover{
    background:var(--terracota);
}

/* ============================= */
/* CATALOGO FLEXIBLE */
/* ============================= */

.catalogo{
    flex:1;
}


/* ============================= */
/* SEO - TITULO (H1) ULTRA COMPACTO */
/* ============================= */

/* La miga de pan reduce su espacio inferior cuando le sigue el H1,
   así ambos se ven como una sola franja */
.breadcrumb:has(+ main){
    padding-bottom:6px;
    border-bottom:none;
}

.seo-intro{
    display:flex;
    align-items:center;
    gap:18px;

    padding:0 30px 10px 30px;

    background:white;
    border-bottom:1px solid #eee;
}

.seo-intro h1{
    flex-shrink:0;

    font-size:16px;
    font-weight:700;
    line-height:1.2;

    color:var(--rojo);

    padding-left:10px;
    border-left:3px solid var(--terracota);
}

.seo-intro p{
    font-size:12px;
    line-height:1.4;
    color:#777;

    padding-left:18px;
    border-left:1px solid #e5e5e5;
}

.seo-intro p strong{
    color:var(--gris);
    font-weight:600;
}

/* ============================== */
/* SEO - TEXTO INFERIOR (compacto) */
/* ============================== */

.seo-texto{
    /* margen negativo: lo acerca a la paginación */
    margin:-20px 30px 0 30px;
    padding:14px 22px;

    background:white;
    border-radius:10px;
    border-left:4px solid var(--terracota);
    box-shadow:0 2px 8px rgba(0,0,0,0.06);

    color:#666;
    font-size:12.5px;
    line-height:1.6;

    column-count:2;
    column-gap:35px;
}

.seo-texto h2{
    column-span:all;

    font-size:14px;
    font-weight:700;
    color:var(--rojo);

    margin-bottom:6px;
}

.seo-texto p{
    margin-bottom:6px;
    text-align:left;
}

.seo-texto p:last-child{
    margin-bottom:0;
}

.seo-texto strong{
    color:var(--gris);
    font-weight:600;
}

.seo-texto a{
    color:var(--rojo);
    font-weight:600;
    text-decoration:none;
    transition:0.3s;
}

.seo-texto a:hover{
    color:var(--terracota);
}

/* footer más cerca cuando existe este bloque */
main:has(.seo-texto) + footer{
    margin-top:25px;
}

/* RESPONSIVE SEO */
@media(max-width:992px){

    .seo-intro{
        flex-direction:column;
        align-items:flex-start;
        gap:4px;
        padding:0 20px 8px 20px;
    }

    .seo-intro h1{
        font-size:15px;
    }

    .seo-intro p{
        padding-left:13px;
        border-left:none;
        font-size:12px;
    }

    .seo-texto{
        column-count:1;
        margin:-15px 20px 0 20px;
        padding:12px 16px;
    }

}

@media(max-width:600px){

    /* En móvil se oculta la descripción para que el catálogo se vea de inmediato
       (Google igual la lee: no se elimina del HTML) */
    .seo-intro p{
        display:none;
    }

    .seo-intro h1{
        font-size:14px;
    }

    .seo-texto{
        font-size:12px;
    }

}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media(max-width:992px){

    .contenedor-principal{
        flex-direction:column;
    }

    .sidebar-filtros{
        width:100%;
        min-width:100%;
        position:relative;
    }

}

/* =========================
   BOTON WHATSAPP
========================= */

.whatsapp-float{
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 38px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    transition: transform 0.3s ease;
}

.whatsapp-float:hover{
    transform: scale(1.1);
}

/* ICONO */
.whatsapp-float i{
    color: white;
    font-size: 38px;
}

/* Responsive */
@media(max-width:768px){

    .whatsapp-float{
        width: 58px;
        height: 58px;
        font-size: 30px;
        bottom: 20px;
        right: 20px;
    }

}

/* =========================
   TOP BAR DELIVERY
========================= */

.top-bar{

    background: var(--rojo);

    color: white;

    padding: 10px 30px;

    font-size: 14px;

    font-weight: 500;
}

.top-bar-content{

    max-width: 1400px;

    margin: auto;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;
}

.top-bar-content span{

    display: flex;

    align-items: center;

    gap: 8px;
}

/* RESPONSIVE */
@media(max-width:768px){

    .top-bar-content{

        flex-direction: column;

        text-align: center;

        gap: 8px;
    }

}