/*
 * Desarrollado por Iñaki Serrano para Webcomunica.solutions
 * MASTER.CSS — Hoja de estilos principal de Isla de Nabumbu
 *
 * Índice:
 *   1. Variables y reset
 *   2. Tipografía
 *   3. Estructura y layout
 *   4. Barra de anuncio superior
 *   5. Cabecera y navegación
 *   6. Pie de página
 *   7. Componentes (botones, formularios, tablas)
 *   8. Tarjeta de producto
 *   9. Página de inicio — Hero
 *  10. Página de inicio — Píldoras de categoría
 *  11. Página de inicio — Novedades destacadas
 *  12. Página de inicio — Qué es Isla de Nabumbu
 *  13. Página de inicio — Nuestros Autores
 *  14. Página de inicio — Boletín
 *  15. Catálogo
 *  16. Ficha de producto
 *  17. Carrito y pedido
 *  18. Páginas estáticas (sobre, autores, contacto)
 *  19. Admin — estructura y layout
 *  20. Admin — componentes
 *  21. Utilidades y responsive
 */

/* =========================================================
   1. Variables y reset
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Open+Sans:wght@400;600&display=swap');

:root {
    --fondo:            #ffffff;
    --fondo-claro:      #f5f0e8;
    --fondo-gris:       #f9f9f9;
    --fondo-oscuro:     #0c1c33;
    --texto:            #1a1a1a;
    --texto-suave:      #555555;
    --texto-muy-suave:  #888888;
    --acento:           #1e5fc4;
    --acento-oscuro:    #154fa0;
    --borde:            #e5e5e5;
    --tarjeta:          #ffffff;
    --sombra:           0 2px 10px rgba(0, 0, 0, 0.08);
    --sombra-hover:     0 6px 24px rgba(0, 0, 0, 0.14);
    --radio:            3px;

    --fuente:           Montserrat, 'Helvetica Neue', Arial, sans-serif;
    --fuente-ui:        'Open Sans', 'Helvetica Neue', Arial, sans-serif;

    --ancho-max:        1200px;
    --padding-pagina:   0 1.5rem;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-ui);
    color: var(--texto);
    background: var(--fondo);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--acento);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    padding-left: 1.5rem;
}

/* =========================================================
   2. Tipografía
   ========================================================= */

h1, h2, h3, h4, h5 {
    font-family: var(--fuente);
    font-weight: 700;
    line-height: 1.2;
    color: var(--texto);
}

h1 { font-size: 2.2rem;  margin-bottom: 1rem; }
h2 { font-size: 1.7rem;  margin-bottom: .8rem; }
h3 { font-size: 1.3rem;  margin-bottom: .6rem; }
h4 { font-size: 1rem;    margin-bottom: .4rem; font-family: var(--fuente); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

p  { margin-bottom: 1rem; }

.texto-acento   { color: var(--acento); }
.texto-suave    { color: var(--texto-suave); font-size: .9rem; }
.texto-centrado { text-align: center; }

/* =========================================================
   3. Estructura y layout
   ========================================================= */

.contenedor {
    max-width: var(--ancho-max);
    margin-left: auto;
    margin-right: auto;
    padding: var(--padding-pagina);
}

.contenido-principal {
    min-height: 60vh;
}

.seccion {
    padding: 4rem 0;
}

.seccion-gris {
    background: var(--fondo-gris);
    padding: 4rem 0;
}

.rejilla-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.rejilla-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.rejilla-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.rejilla-5  { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }

/* Cabecera de sección: título izquierda + enlace derecha */
.seccion-cabecera {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--borde);
}

.seccion-cabecera h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 0;
    color: var(--texto);
}

.seccion-cabecera a {
    font-size: .8rem;
    font-weight: 600;
    color: var(--acento);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    text-decoration: none;
}

.seccion-cabecera a:hover {
    text-decoration: underline;
}

/* Banda título interior de páginas */
.banda-titulo {
    background: var(--fondo-oscuro);
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
}

.banda-titulo h1 {
    color: #ffffff;
    font-size: 2rem;
    margin: 0;
    font-family: var(--fuente);
}

.banda-titulo p {
    color: rgba(255,255,255,.65);
    margin: .4rem 0 0;
}

/* =========================================================
   4. Barra de anuncio superior
   ========================================================= */

.barra-anuncio {
    background: #000;
    height: 36px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.barra-anuncio-interior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
}

.barra-anuncio-texto {
    font-family: var(--fuente);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
}

/* Ticker teleprompter */
.barra-ticker-zona {
    display: flex;
    align-items: center;
    gap: .6rem;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.barra-rayo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: var(--acento);
}

.barra-rayo svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.barra-ticker-pista {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    position: relative;
}

.barra-ticker-pista::before,
.barra-ticker-pista::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    z-index: 1;
    pointer-events: none;
}
.barra-ticker-pista::before { left: 0;  background: linear-gradient(to right, #000, transparent); }
.barra-ticker-pista::after  { right: 0; background: linear-gradient(to left,  #000, transparent); }

.barra-ticker-cinta {
    display: flex;
    align-items: center;
    width: max-content;
    animation: ticker-correr 80s linear infinite;
}

.barra-ticker-cinta:hover { animation-play-state: paused; }

.barra-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255,255,255,.78);
    font-size: .67rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0 1.8rem;
    white-space: nowrap;
    transition: color .2s;
}

.barra-ticker-item::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--acento);
    flex-shrink: 0;
}

.barra-ticker-item:hover {
    color: var(--acento);
    text-decoration: none;
}

@keyframes ticker-correr {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.barra-ticker-etiqueta {
    flex-shrink: 0;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fff;
    background: var(--acento);
    padding: .18rem .55rem;
    border-radius: 2px;
    white-space: nowrap;
}

.barra-anuncio-redes {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-shrink: 0;
}

.barra-anuncio-redes a {
    color: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color .2s;
}

.barra-anuncio-redes a:hover {
    color: #ffffff;
    text-decoration: none;
}

.barra-anuncio-redes svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

/* =========================================================
   Cookie consent banner
   ========================================================= */

.toast-carrito {
    position: fixed;
    bottom: 1.8rem;
    right: 1.8rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #1a1a1a;
    color: #fff;
    padding: .75rem 1.2rem;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 500;
    box-shadow: 0 6px 24px rgba(0,0,0,.22);
    z-index: 9999;
    transform: translateY(.6rem);
    opacity: 0;
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
    max-width: 320px;
}
.toast-carrito.visible {
    opacity: 1;
    transform: none;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0c1c33;
    color: #fff;
    padding: .9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 9999;
    font-size: .85rem;
}
.cookie-banner a { color: #7ab3ff; }
.texto-confianza { font-size: .82rem; color: var(--texto-suave); margin-bottom: .8rem; }
@media (max-width: 600px) {
    .cookie-banner { flex-direction: column; text-align: center; }
}

/* =========================================================
   5. Cabecera y navegación
   ========================================================= */

.cabecera-principal {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    border-bottom: 1px solid var(--borde);
}

/* ── Barra de administración (admin bar, solo admin logueado) ── */
.admin-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 38px;
    background: #0c1c33;
    color: #fff;
    z-index: 100000;
    font-size: .85rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.admin-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.admin-bar-marca {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: 600;
    color: #cdd8ea;
    white-space: nowrap;
}
.admin-bar-acciones { display: flex; align-items: center; gap: .5rem; }
.admin-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: .82rem;
    line-height: 1;
    border: 1px solid rgba(255,255,255,.18);
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.admin-bar-btn:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.admin-bar-btn-editar {
    background: var(--acento, #1e5fc4);
    border-color: var(--acento, #1e5fc4);
    font-weight: 600;
}
.admin-bar-btn-editar:hover { background: #1a52ab; border-color: #1a52ab; }
.admin-bar-btn-salir { border-color: rgba(255,120,120,.4); }
.admin-bar-btn-salir:hover { background: rgba(200,60,60,.25); }

/* Empuja el contenido y el header sticky por debajo de la admin bar */
body.con-admin-bar { padding-top: 38px; }
body.con-admin-bar .cabecera-principal { top: 38px; }

@media (max-width: 600px) {
    .admin-bar-marca { font-size: 0; gap: 0; }   /* en móvil solo el icono */
    .admin-bar-marca svg { width: 18px; height: 18px; }
    .admin-bar-btn { padding: .28rem .55rem; font-size: .76rem; }
}

.cabecera-interior {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .85rem;
    padding-bottom: .85rem;
    gap: 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    width: 300px;
    height: auto;
}

/* Navegación principal */
.navegacion-principal {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    align-items: center;
}

.navegacion-principal a {
    color: var(--texto);
    text-decoration: none;
    font-size: .82rem;
    font-family: var(--fuente);
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
    padding-bottom: 3px;
    transition: color .2s;
}

.navegacion-principal a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--acento);
    transition: width .25s ease;
}

.navegacion-principal a:hover {
    color: var(--acento);
    text-decoration: none;
}

.navegacion-principal a:hover::after {
    width: 100%;
}

.navegacion-principal a.activo {
    color: var(--acento);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Botón hamburguesa — oculto en escritorio */
.menu-hamburguesa {
    display: none;
}

/* Iconos cabecera derecha */
.cabecera-iconos {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.cabecera-iconos a {
    color: var(--texto);
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    transition: color .2s;
}

.cabecera-iconos a:hover {
    color: var(--acento);
    text-decoration: none;
}

.cabecera-iconos svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carrito-contador {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--acento);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    font-family: var(--fuente);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =========================================================
   5b. Carrito drawer
   ========================================================= */

.carrito-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.carrito-overlay.abierto {
    opacity: 1;
    pointer-events: all;
}

.carrito-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 95vw;
    background: #fff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: -4px 0 24px rgba(0,0,0,.18);
}

.carrito-drawer.abierto {
    transform: translateX(0);
}

.carrito-drawer-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--borde);
    flex-shrink: 0;
}

.carrito-drawer-cabecera h3 {
    font-size: 1rem;
    font-family: var(--fuente);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0;
}

.carrito-drawer-cabecera h3 span {
    font-weight: 400;
    font-size: .8rem;
    color: var(--texto-suave);
    text-transform: none;
    letter-spacing: 0;
}

.carrito-drawer-cerrar {
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    color: var(--texto-suave);
    display: flex;
    align-items: center;
    transition: color .2s;
}

.carrito-drawer-cerrar:hover { color: var(--texto); }
.carrito-drawer-cerrar svg { width: 22px; height: 22px; }

.carrito-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: .8rem 0;
}

.carrito-drawer-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: var(--texto-suave);
    padding: 2rem;
    text-align: center;
}

.carrito-drawer-vacio svg {
    width: 52px;
    height: 52px;
    stroke: var(--borde);
}

.carrito-drawer-vacio p { font-size: .95rem; margin: 0; }

.cdi {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: .9rem 1.4rem;
    border-bottom: 1px solid var(--borde);
    transition: background .15s;
}

.cdi:last-child { border-bottom: none; }
.cdi:hover { background: var(--fondo-gris); }

.cdi-imagen {
    width: 64px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--fondo-claro);
}

.cdi-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cdi-nombre {
    font-size: .84rem;
    font-weight: 600;
    color: var(--texto);
    line-height: 1.3;
    margin-bottom: .4rem;
}

.cdi-meta {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.cdi-cantidad {
    font-size: .78rem;
    color: var(--texto-suave);
}

.cdi-precio {
    font-size: .88rem;
    font-weight: 700;
    font-family: var(--fuente);
    color: var(--acento);
}

.cdi-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
    color: var(--texto-suave);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color .2s;
    border-radius: 4px;
}

.cdi-eliminar:hover {
    color: #e53e3e;
    background: #fff5f5;
}

.cdi-eliminar svg { width: 16px; height: 16px; }

.carrito-drawer-pie {
    padding: 1.2rem 1.4rem;
    border-top: 1px solid var(--borde);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.carrito-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
    font-weight: 700;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--borde);
}

.carrito-drawer-total span:last-child {
    font-family: var(--fuente);
    font-size: 1.1rem;
    color: var(--acento);
}

/* =========================================================
   6. Pie de página
   ========================================================= */

.pie-pagina {
    background: var(--fondo-oscuro);
    color: rgba(255,255,255,.6);
    margin-top: 0;
}

.pie-superior {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 3rem;
    padding-top: 2.8rem;
    padding-bottom: 2.4rem;
}

.pie-logo img {
    height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .9;
    margin-bottom: 1rem;
    display: block;
}

.pie-logo p {
    font-size: .83rem;
    color: rgba(255,255,255,.5);
    line-height: 1.65;
    margin-bottom: .5rem;
}

.pie-origen {
    font-size: .78rem !important;
    color: rgba(255,255,255,.3) !important;
    font-style: italic;
}

.pie-redes {
    display: flex;
    gap: .9rem;
    align-items: center;
    margin-top: 1rem;
}

.pie-redes a {
    color: rgba(255,255,255,.4);
    transition: color .2s;
}

.pie-redes a:hover {
    color: #fff;
}

.pie-bloque h4 {
    color: #ffffff;
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-family: var(--fuente);
}

.pie-bloque p {
    font-size: .85rem;
    line-height: 1.7;
    margin-bottom: .4rem;
    color: rgba(255,255,255,.55);
}

.pie-bloque a {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: color .2s;
}

.pie-bloque a:hover {
    color: #ffffff;
    text-decoration: none;
}

.pie-nav {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .85rem;
}

.pie-nav-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem 0;
    position: relative;
}

.pie-nav-2col::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,.1);
}

.pie-nav-2col a:nth-child(odd)  { padding-right: 1rem; }
.pie-nav-2col a:nth-child(even) { padding-left: 1rem; }

.pie-inferior {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 1.2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .78rem;
    color: rgba(255,255,255,.35);
}

.pie-inferior a {
    color: rgba(255,255,255,.35);
    text-decoration: none;
}

.pie-inferior a:hover {
    color: rgba(255,255,255,.7);
}

/* =========================================================
   7. Componentes — botones, formularios, tablas
   ========================================================= */

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    font-size: .82rem;
    font-family: var(--fuente);
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radio);
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
}

.btn-principal {
    background: var(--acento);
    color: #ffffff;
    border-color: var(--acento);
}

.btn-principal:hover {
    background: var(--acento-oscuro);
    border-color: var(--acento-oscuro);
    color: #fff;
    text-decoration: none;
}

.btn-acento {
    background: var(--acento);
    color: #fff;
    border-color: var(--acento);
}

.btn-acento:hover {
    background: var(--acento-oscuro);
    border-color: var(--acento-oscuro);
    text-decoration: none;
    color: #fff;
}

/* Contorno blanco — para usar sobre fondos oscuros */
.btn-contorno-blanco {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,.6);
}

.btn-contorno-blanco:hover {
    background: rgba(255,255,255,.1);
    border-color: #ffffff;
    color: #ffffff;
    text-decoration: none;
}

/* Contorno oscuro — para usar sobre fondos claros */
.btn-contorno {
    background: transparent;
    color: var(--texto);
    border-color: var(--borde);
}

.btn-contorno:hover {
    background: var(--fondo-oscuro);
    color: #ffffff;
    border-color: var(--fondo-oscuro);
    text-decoration: none;
}

.btn-pequeno {
    padding: .4rem 1rem;
    font-size: .75rem;
}

.btn-bloque {
    display: flex;
    width: 100%;
}

/* Formularios */
.grupo-campo {
    margin-bottom: 1.2rem;
}

.grupo-campo label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--texto);
}

.campo {
    width: 100%;
    padding: .65rem .9rem;
    font-size: .95rem;
    font-family: var(--fuente-ui);
    color: var(--texto);
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    outline: none;
    transition: border-color .2s;
}

.campo:focus {
    border-color: var(--acento);
}

textarea.campo {
    resize: vertical;
    min-height: 120px;
}

select.campo {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.5rem;
}

.aviso {
    padding: .85rem 1.2rem;
    border-radius: var(--radio);
    margin-bottom: 1.2rem;
    font-size: .9rem;
}

.aviso-ok    { background: #edf7ed; color: #2d6a2d; border: 1px solid #c3e6c3; }
.aviso-error { background: #fdf2f2; color: #8b1a1a; border: 1px solid #f5c6c6; }
.aviso-info  { background: #f0f4fa; color: #2a4a7f; border: 1px solid #c5d8f0; }

/* Tablas */
.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    background: var(--tarjeta);
}

.tabla th {
    text-align: left;
    padding: .75rem 1rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--texto-suave);
    border-bottom: 2px solid var(--borde);
}

.tabla td {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--borde);
    vertical-align: middle;
}

.tabla tr:last-child td { border-bottom: none; }
.tabla tr:hover td { background: var(--fondo-gris); }

/* Badge / etiqueta estado */
.badge {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 2px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.badge-pendiente  { background: #fff3cd; color: #7a5a00; }
.badge-procesando { background: #d0e8ff; color: #1a4a7a; }
.badge-completado { background: #d4edda; color: #1a5c2a; }
.badge-enviado    { background: #e0d6f5; color: #4b2a86; }
.badge-cancelado  { background: #f5d5d5; color: #7a1a1a; }

/* Pestañas del panel (Pedidos / Estadísticas) — segmented control */
.admin-tabs {
    display: inline-flex;
    gap: .25rem;
    background: #e9ecf1;
    padding: .3rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}
.admin-tabs .admin-tab {
    padding: .5rem 1.4rem;
    text-decoration: none;
    color: var(--texto-suave);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 7px;
    transition: background .15s, color .15s, box-shadow .15s;
}
.admin-tabs .admin-tab:hover { color: var(--texto); text-decoration: none; }
.admin-tabs .admin-tab.activo {
    background: #fff;
    color: var(--acento);
    box-shadow: 0 1px 3px rgba(0,0,0,.14);
}

/* =========================================================
   8. Tarjeta de producto
   ========================================================= */

.tarjeta-producto {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
    position: relative;
}

.tarjeta-producto:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-2px);
}

.tarjeta-producto .imagen-contenedor {
    position: relative;
    aspect-ratio: 2 / 3;       /* proporción de portada de libro: se ven completas */
    overflow: hidden;
    background: #fff;
}

.tarjeta-producto .imagen-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: contain;       /* portada entera, sin recortar (vendemos libros) */
    transition: transform .35s ease;
}

.tarjeta-producto:hover .imagen-contenedor img {
    transform: scale(1.04);
}

.tarjeta-producto .imagen-contenedor a {
    display: block;
    width: 100%;
    height: 100%;
}

.tarjeta-producto .cuerpo {
    padding: .85rem 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tarjeta-producto .nombre {
    font-family: var(--fuente);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: .5rem;
    color: var(--texto);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tarjeta-producto .nombre a {
    color: inherit;
    text-decoration: none;
}

.tarjeta-producto .nombre a:hover {
    color: var(--acento);
}

.tarjeta-producto .pie-tarjeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .5rem;
}

.tarjeta-producto .precio-zona {
    display: flex;
    align-items: baseline;
    gap: .4rem;
}

.tarjeta-producto .precio {
    font-size: 1rem;
    font-weight: 700;
    color: var(--texto);
    font-family: var(--fuente);
}

.tarjeta-producto .precio-original {
    font-size: .82rem;
    color: var(--texto-muy-suave);
    text-decoration: line-through;
}

.tarjeta-producto .precio-oferta { color: var(--acento); }

.tarjeta-producto .categorias-pequenas {
    font-size: .72rem;
    color: var(--texto-muy-suave);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .3rem;
}

/* Botón + redondo para añadir al carrito */
.btn-aniadir-carrito {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--acento);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
}

.btn-aniadir-carrito:hover {
    background: var(--acento-oscuro);
    transform: scale(1.1);
}

/* =========================================================
   9. Página de inicio — Hero
   ========================================================= */

.hero {
    background: var(--fondo-oscuro);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero-interior {
    display: grid;
    grid-template-columns: 55% 45%;
    align-items: center;
    min-height: 600px;
}

.hero-texto {
    padding: 5rem 4rem 5rem 0;
}

.hero-texto .hero-titulo {
    font-family: var(--fuente);
    font-size: clamp(3rem, 5.5vw, 5.2rem);
    font-weight: 900;
    line-height: 1.0;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -.02em;
    margin-bottom: 1.6rem;
}

.hero-texto .hero-titulo span {
    color: #ffffff;
}

.hero-texto p {
    color: rgba(255,255,255,.75);
    font-size: .95rem;
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-botones {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.hero-imagen {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    overflow: hidden;
    min-height: 600px;
    background: var(--fondo-oscuro);
}

.hero-imagen::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 180px;
    background: linear-gradient(to right, var(--fondo-oscuro) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-imagen::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--fondo-oscuro) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    padding: 2rem 1.5rem 2rem 0;
    mix-blend-mode: multiply;
    filter: brightness(1.05);
}

/* =========================================================
   9b. Hero Slideshow dinámico
   ========================================================= */

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 480px;
    max-height: 820px;
    overflow: hidden;
    background: var(--fondo-oscuro);
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity .9s ease;
    z-index: 0;
}
.hero-slide.activo { opacity: 1; z-index: 1; }

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(10,25,50,.82) 0%,
        rgba(10,25,50,.55) 55%,
        rgba(10,25,50,.15) 100%
    );
    z-index: 1;
}

.hero-slide > .contenedor {
    width: 100%;
}

.hero-slide-contenido {
    position: relative;
    z-index: 2;
    max-width: 640px;
    padding: 3rem 0;
}

.hero-slide-titulo {
    font-family: var(--fuente);
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    font-weight: 900;
    line-height: 1.0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -.02em;
    margin: 0 0 1.2rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.35);
}

.hero-slide-texto {
    font-size: clamp(.9rem, 1.6vw, 1.05rem);
    color: rgba(255,255,255,.82);
    line-height: 1.7;
    margin: 0 0 2rem;
    max-width: 520px;
}

.hero-slide-btn {
    display: inline-block;
    padding: .85rem 2.2rem;
    background: var(--acento);
    color: #fff;
    font-family: var(--fuente);
    font-weight: 700;
    font-size: .88rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radio);
    transition: background .2s, transform .15s;
    border: none;
    cursor: pointer;
}
.hero-slide-btn:hover { background: #1550a8; transform: translateY(-1px); }

/* Controles nav */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    backdrop-filter: blur(4px);
}
.hero-prev { left: 1.2rem; }
.hero-next { right: 1.2rem; }
.hero-prev:hover,
.hero-next:hover { background: rgba(255,255,255,.3); }

/* Puntos indicadores */
.hero-puntos {
    position: absolute;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: .5rem;
}
.hero-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.hero-punto.activo {
    background: #fff;
    transform: scale(1.35);
}

/* Solo 1 slide: sin controles */
.hero-slideshow.sin-controles .hero-prev,
.hero-slideshow.sin-controles .hero-next,
.hero-slideshow.sin-controles .hero-puntos { display: none; }

@media (max-width: 768px) {
    .hero-slideshow { height: 55vh; min-height: 360px; }
    .hero-slide-overlay {
        background: linear-gradient(to bottom,
            rgba(10,25,50,.55) 0%,
            rgba(10,25,50,.75) 100%);
    }
    .hero-prev { left: .5rem; }
    .hero-next { right: .5rem; }
    .hero-prev, .hero-next { width: 38px; height: 38px; font-size: 1.3rem; }
}

/* =========================================================
   10. Página de inicio — Explora categorías (tarjetas con imagen)
   ========================================================= */

.seccion-explorar {
    background: var(--fondo-oscuro);
    padding: 2rem 0 2.5rem;
}

.seccion-explorar .seccion-cabecera {
    border-bottom-color: rgba(255,255,255,.12);
    margin-bottom: 1.5rem;
}

.seccion-explorar .seccion-cabecera h2 {
    color: #ffffff;
}

.seccion-explorar .seccion-cabecera a {
    color: rgba(255,255,255,.55);
}

.explorar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .9rem;
}

.explorar-card {
    position: relative;
    height: 280px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    background-size: cover;
    background-position: center top;
    background-color: #152030;
    transition: transform .25s, box-shadow .25s;
    border: 1px solid rgba(255,255,255,.06);
}

.explorar-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,.1) 100%);
    transition: background .2s;
}

.explorar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(0,0,0,.45);
    text-decoration: none;
}

.explorar-card:hover::after {
    background: linear-gradient(to top, rgba(0,0,0,.95) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.15) 100%);
}

.explorar-etiqueta {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-family: var(--fuente);
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 1.1rem;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* Píldoras antiguas — conservadas por si se usan en otra parte */
.categorias-pildoras-banda {
    background: var(--fondo-oscuro);
    padding: 1.2rem 0 2rem;
}

.categorias-pildoras {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    align-items: center;
}

.pildora-categoria {
    display: inline-flex;
    align-items: center;
    padding: .5rem 1.1rem;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.85);
    font-family: var(--fuente);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.12);
    transition: background .2s, color .2s, transform .15s;
}

.pildora-categoria:hover {
    background: rgba(255,255,255,.14);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* =========================================================
   11. Página de inicio — Novedades destacadas
   ========================================================= */

.seccion-novedades {
    background: #000;
    padding: 3.5rem 0;
}

.seccion-novedades .seccion-cabecera {
    border-bottom-color: rgba(255,255,255,.15);
}

.seccion-novedades .seccion-cabecera h2 {
    color: #fff;
}

.seccion-novedades .seccion-cabecera a {
    color: rgba(255,255,255,.75);
    letter-spacing: .04em;
    transition: color .2s, letter-spacing .2s;
}

.seccion-novedades .seccion-cabecera a:hover {
    color: #fff;
    letter-spacing: .08em;
    text-decoration: none;
}

.seccion-novedades .texto-suave {
    color: rgba(255,255,255,.6);
}

/* =========================================================
   12. Página de inicio — Qué es Isla de Nabumbu
   ========================================================= */

.seccion-que-es {
    background-color: #000;
    background-image: url('img/fondohistoria.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: 160px 0;
}

.que-es-interior {
    display: flex;
    align-items: stretch;
    min-height: 200px;
}

/* Columna de texto izquierda */
.que-es-texto {
    flex: 0 0 260px;
    padding: 0 2rem 0 0;
    border-right: 1px solid rgba(12,28,51,.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.que-es-texto h2 {
    font-size: 1.45rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: var(--fondo-oscuro);
}

.que-es-texto h2 span {
    color: var(--fondo-oscuro);
}

.que-es-texto p {
    color: var(--fondo-oscuro);
    font-size: .84rem;
    line-height: 1.7;
    opacity: .85;
}

.que-es-texto .frase-cursiva {
    font-style: normal;
    font-weight: 700;
    color: var(--acento);
    font-size: .84rem;
    margin-top: .8rem;
    margin-bottom: 0;
    opacity: 1;
}

/* Grid de features (columnas con separador) */
.que-es-tarjetas {
    display: flex;
    flex: 1;
}

.tarjeta-feature {
    flex: 1;
    padding: 0 1.4rem;
    border-right: 1px solid rgba(12,28,51,.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: none;
    border-radius: 0;
}

.tarjeta-feature:last-child { border-right: none; }

.tarjeta-feature .feature-icono {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
    filter: grayscale(1) brightness(0.2);
}

.tarjeta-feature .feature-icono-svg {
    width: 75px;
    height: 75px;
    margin-bottom: .8rem;
    color: var(--fondo-oscuro);
}

.tarjeta-feature .feature-icono-svg svg,
.tarjeta-feature .feature-icono-svg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tarjeta-feature h4 {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fondo-oscuro);
    margin-bottom: .5rem;
    line-height: 1.2;
}

.tarjeta-feature p {
    font-size: .82rem;
    color: var(--fondo-oscuro);
    line-height: 1.65;
    margin-bottom: 0;
    opacity: .75;
}

/* =========================================================
   13. Página de inicio — Nuestros Autores
   ========================================================= */

.seccion-autores {
    background: var(--fondo);
    padding: 4rem 0;
}

.rejilla-autores-inicio {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.autor-inicio {
    text-align: center;
    text-decoration: none;
    display: block;
    transition: transform .2s;
}

.autor-inicio:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.autor-foto-circulo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto .7rem;
    background: #d8d0c8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autor-foto-circulo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autor-foto-circulo .sin-foto {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c8bfb5, #aca094);
    display: flex;
    align-items: center;
    justify-content: center;
}

.autor-foto-circulo .sin-foto svg {
    width: 38px;
    height: 38px;
    fill: rgba(255,255,255,.6);
}

.autor-inicio .autor-nombre {
    font-family: var(--fuente);
    font-size: .82rem;
    font-weight: 600;
    color: var(--texto);
    line-height: 1.3;
}

/* =========================================================
   14. Página de inicio — Boletín
   ========================================================= */

.seccion-boletin {
    background: #fff;
    border-top: 1px solid #e8e0d4;
    padding: 4rem 0;
}

.boletin-interior {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 3.5rem;
    align-items: center;
}

.boletin-pretitulo {
    font-family: var(--fuente);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--acento);
    margin-bottom: .9rem;
}

.boletin-titulo {
    font-family: var(--fuente);
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 900;
    color: var(--texto);
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.15;
    margin-bottom: .9rem;
}

.boletin-titulo em {
    font-style: normal;
    color: var(--acento);
}

.boletin-subtitulo {
    color: var(--texto-suave);
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 1.4rem;
}

.boletin-beneficios {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.boletin-beneficio {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--texto-suave);
    font-size: .83rem;
    font-family: var(--fuente-ui);
}

.boletin-beneficio svg {
    color: var(--acento);
    flex-shrink: 0;
}

.boletin-formulario {
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 2rem 1.8rem;
}

.boletin-form {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.boletin-form-label {
    font-family: var(--fuente);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--texto-muy-suave);
}

.boletin-form .campo-email {
    width: 100%;
    padding: .7rem 1rem;
    font-size: .9rem;
    font-family: var(--fuente-ui);
    color: var(--texto);
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.boletin-form .campo-email::placeholder {
    color: var(--texto-muy-suave);
}

.boletin-form .campo-email:focus {
    border-color: var(--acento);
    box-shadow: 0 0 0 3px rgba(30,95,196,.1);
}

.boletin-form .btn-suscribirse {
    background: var(--acento);
    color: #fff;
    border: none;
    border-radius: var(--radio);
    padding: .75rem 1.2rem;
    font-family: var(--fuente);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    transition: background .2s;
}

.boletin-form .btn-suscribirse:hover {
    background: var(--acento-oscuro);
}

.boletin-privacidad {
    color: var(--texto-muy-suave);
    font-size: .73rem;
    margin: 0;
    text-align: center;
}

/* Modal boletín */
.modal-boletin {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.55);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.modal-boletin.visible {
    opacity: 1;
    visibility: visible;
}

.modal-boletin-caja {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 10px));
    transition: transform .25s;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 2.2rem 2rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    z-index: 1201;
}

.modal-boletin.visible .modal-boletin-caja {
    transform: translate(-50%, -50%);
}

.modal-boletin-caja h3 {
    font-family: var(--fuente);
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--texto);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}

.modal-boletin-caja p {
    color: var(--texto-suave);
    font-size: .88rem;
    line-height: 1.65;
    margin-bottom: 1.6rem;
}

.modal-boletin-cerrar {
    background: var(--acento);
    color: #fff;
    border: none;
    border-radius: var(--radio);
    padding: .7rem 2.2rem;
    font-family: var(--fuente);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
}

.modal-boletin-cerrar:hover {
    background: var(--acento-oscuro);
}

/* =========================================================
   15. Catálogo
   ========================================================= */

.catalogo-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.barra-lateral {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 1.4rem 1.2rem;
    position: sticky;
    top: 80px;
}

.filtro-seccion {
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--borde);
}
.filtro-seccion:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.barra-lateral h3 {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--texto-suave);
    margin-bottom: .75rem;
    font-family: var(--fuente);
}

.filtro-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filtro-lista li { margin: 1px 0; }

.filtro-lista a {
    display: block;
    padding: .45rem .7rem;
    font-size: .86rem;
    color: var(--texto-suave);
    text-decoration: none;
    border-radius: 6px;
    transition: color .15s, background .15s;
    white-space: nowrap;
}

.filtro-lista a:hover {
    color: var(--acento);
    background: rgba(30,95,196,.07);
}

.filtro-lista a.activo {
    color: var(--acento);
    font-weight: 700;
    background: rgba(30,95,196,.09);
}

.catalogo-filtros-barra {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    padding: .6rem .8rem;
    background: var(--fondo-suave);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    margin-bottom: 1.5rem;
}

.filtro-grupo {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
}

.filtro-etiqueta {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: 0 .7rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--texto-suave);
    background: var(--fondo-suave);
    border-right: 1px solid var(--borde);
    height: 100%;
    white-space: nowrap;
}

.filtro-busqueda-grupo { flex: 1; min-width: 180px; max-width: 280px; }

.filtro-busqueda-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 .75rem;
    font-size: .85rem;
    font-family: var(--fuente-ui);
    color: var(--texto);
    background: transparent;
    width: 100%;
    height: 100%;
}

.filtro-busqueda-input::placeholder { color: var(--texto-muy-suave); }

.filtro-grupo select {
    border: none;
    outline: none;
    padding: 0 .6rem;
    font-size: .85rem;
    color: var(--texto);
    background: transparent;
    cursor: pointer;
    height: 100%;
    min-width: 150px;
}

.filtro-precio-grupo {
    display: flex;
    align-items: center;
    height: 100%;
}

.filtro-precio-grupo input[type="number"] {
    border: none;
    outline: none;
    width: 62px;
    padding: 0 .5rem;
    font-size: .85rem;
    color: var(--texto);
    background: transparent;
    text-align: center;
    height: 100%;
    -moz-appearance: textfield;
}
.filtro-precio-grupo input[type="number"]::-webkit-outer-spin-button,
.filtro-precio-grupo input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.filtro-precio-guion {
    color: var(--texto-suave);
    font-size: .85rem;
    padding: 0 .1rem;
}
.filtro-precio-euro {
    color: var(--texto-suave);
    font-size: .82rem;
    padding-right: .6rem;
}

.filtro-btn-aplicar {
    height: 36px;
    padding: 0 1.1rem;
    background: var(--acento);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.filtro-btn-aplicar:hover { background: #174ea6; }

.filtro-btn-limpiar {
    height: 36px;
    padding: 0 .9rem;
    display: flex;
    align-items: center;
    font-size: .82rem;
    color: var(--texto-suave);
    text-decoration: none;
    border: 1px solid var(--borde);
    border-radius: 8px;
    background: #fff;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.filtro-btn-limpiar:hover { color: #c0392b; border-color: #c0392b; }


.catalogo-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--borde);
}

.catalogo-cabecera p {
    color: var(--texto-suave);
    font-size: .9rem;
    margin: 0;
}

/* Pestañas de filtro por categoría */
.filtros-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.filtro-tab {
    padding: .4rem 1rem;
    border: 1px solid var(--borde);
    border-radius: 20px;
    font-size: .85rem;
    color: var(--texto-suave);
    text-decoration: none;
    transition: background .15s, color .15s;
    text-transform: lowercase;
}
.filtro-tab:hover,
.filtro-tab.activo {
    background: var(--acento);
    color: #fff;
    border-color: var(--acento);
    text-decoration: none;
}

/* =========================================================
   16. Ficha de producto
   ========================================================= */

.ficha-producto {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 4rem;
    align-items: start;
    margin: 2.5rem 0;
}

.ficha-galeria {
    position: sticky;
    top: 2rem;
}

.ficha-galeria .imagen-principal {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    margin-bottom: .8rem;
}

.ficha-galeria .miniaturas {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.ficha-galeria .miniatura {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    cursor: pointer;
    transition: border-color .2s;
}

.ficha-galeria .miniatura:hover,
.ficha-galeria .miniatura.activa {
    border-color: var(--texto);
}

.ficha-info .categorias-breadcrumb {
    font-size: .78rem;
    color: var(--texto-muy-suave);
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: .8rem;
}

.ficha-info h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
}

.ficha-autores {
    font-size: .85rem;
    color: var(--texto-suave);
    margin-bottom: 1rem;
}
.ficha-autores a {
    color: var(--acento);
    text-decoration: none;
}
.ficha-autores a:hover { text-decoration: underline; }

.ficha-precio {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--fuente);
}

.ficha-precio .precio-oferta { color: var(--acento); }

.ficha-info .descripcion-corta {
    color: var(--texto-suave);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.75;
}

.ficha-accion {
    display: flex;
    gap: .8rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--borde);
}

.ficha-cantidad {
    display: flex;
    align-items: center;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
}

.ficha-cantidad button {
    background: none;
    border: none;
    padding: .6rem .9rem;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--texto);
}

.ficha-cantidad input {
    border: none;
    border-left: 1px solid var(--borde);
    border-right: 1px solid var(--borde);
    width: 50px;
    text-align: center;
    font-size: .95rem;
    padding: .6rem 0;
    outline: none;
}

/* Ficha técnica */
.ficha-tecnica {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
    background: #f7f8fa;
    font-size: .8rem;
}
.ft-dato {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .85rem;
    border-bottom: 1px solid var(--borde);
    border-right: 1px solid var(--borde);
}
.ft-dato:nth-child(even) { border-right: none; }
.ft-dato:nth-last-child(1),
.ft-dato:nth-last-child(2) { border-bottom: none; }
.ft-dato svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--acento); }
.ft-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--texto-suave);
    white-space: nowrap;
}
.ft-valor {
    color: var(--texto);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .ficha-tecnica { grid-template-columns: 1fr; }
    .ft-dato { border-right: none; }
    .ft-dato:nth-last-child(1) { border-bottom: none; }
    .ft-dato:nth-last-child(2) { border-bottom: 1px solid var(--borde); }
}

/* Compartir en redes */
.compartir-bloque {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--borde);
    flex-wrap: wrap;
}
.compartir-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--texto-suave);
    white-space: nowrap;
}
.compartir-botones {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}
.btn-social {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    transition: transform .15s, opacity .15s;
    flex-shrink: 0;
    text-decoration: none;
    font-size: 0;
}
.btn-social:hover { transform: scale(1.12); opacity: .88; }
.btn-social-fb     { background: #1877f2; color: #fff; }
.btn-social-tw     { background: #000;    color: #fff; }
.btn-social-wa     { background: #25d366; color: #fff; }
.btn-social-native { background: var(--fondo-oscuro); color: #fff; }
.btn-social-copy   { background: #ebebeb; color: #555; }

.btn-descarga {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    background: #1b7a3e;
    color: #fff;
    border-radius: var(--radio);
    padding: .9rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s;
    width: 100%;
    letter-spacing: .02em;
    margin-top: .25rem;
}
.btn-descarga:hover { background: #145f30; color: #fff; }
.btn-descarga svg { width: 20px; height: 20px; flex-shrink: 0; }

.ficha-descripcion {
    color: var(--texto);
    line-height: 1.9;
    font-size: .97rem;
}

.ficha-descripcion p {
    text-align: justify;
    margin-bottom: 1.2rem;
}

.ficha-descripcion p:last-child {
    margin-bottom: 0;
}

.ficha-meta-mini {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--borde);
    font-size: .8rem;
    color: var(--texto-muy-suave);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.descripcion-completa {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--borde);
    max-width: 720px;
    line-height: 1.85;
    color: var(--texto-suave);
}

/* =========================================================
   Productos relacionados — slideshow
   ========================================================= */

.relacionados {
    background: var(--fondo-gris);
    border-top: 1px solid var(--borde);
    border-bottom: 1px solid var(--borde);
    padding: 2.5rem 0;
}

.relacionados-titulo {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1.5rem;
    color: var(--texto);
}

.relacionados-wrapper {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.relacionados-pista {
    display: flex;
    gap: 1.2rem;
    overflow-x: hidden;
    scroll-behavior: smooth;
    flex: 1;
}

.relacionados-pista .tarjeta-producto {
    flex: 0 0 200px;
    min-width: 0;
}

.relacionados-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--borde);
    background: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto);
    transition: background .2s, color .2s, border-color .2s;
}

.relacionados-btn:hover:not(:disabled) {
    background: var(--fondo-oscuro);
    color: #fff;
    border-color: var(--fondo-oscuro);
}

.relacionados-btn:disabled {
    cursor: default;
}

/* Barra sticky móvil — añadir al carrito */
.cta-movil-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--borde);
    padding: .8rem 1rem;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    z-index: 500;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.cta-sticky-nombre { font-size: .85rem; color: var(--texto-suave); flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cta-sticky-precio { font-weight: 700; color: var(--texto); white-space: nowrap; }
@media (min-width: 769px) {
    .cta-movil-sticky { display: none !important; }
}

/* =========================================================
   17. Carrito y pedido
   ========================================================= */

.carrito-tabla th:last-child,
.carrito-tabla td:last-child {
    text-align: right;
}

.carrito-imagen {
    width: 55px;
    height: 70px;
    object-fit: cover;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
}

.carrito-cantidad {
    width: 70px;
    text-align: center;
    padding: .35rem .5rem;
    font-size: .9rem;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
}

.carrito-resumen {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 1.5rem;
    max-width: 360px;
    margin-left: auto;
}

.carrito-resumen .linea-total {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    font-size: .95rem;
}

.carrito-resumen .linea-total.grande {
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 1px solid var(--borde);
    margin-top: .5rem;
    padding-top: 1rem;
}

.layout-checkout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

.caja-resumen-pedido {
    background: var(--tarjeta);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
}

/* =========================================================
   18. Páginas estáticas
   ========================================================= */

.pagina-interior {
    max-width: 820px;
    margin: 2.5rem auto;
    padding: var(--padding-pagina);
}

.pagina-interior h1 { margin-bottom: 1.5rem; }
.pagina-interior p  { color: var(--texto-suave); font-size: 1rem; line-height: 1.85; }

/* Autores */
.rejilla-autores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
}

.tarjeta-autor {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 1.4rem;
    transition: box-shadow .25s, transform .25s;
}

.tarjeta-autor:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.09);
    transform: translateY(-3px);
}

.tarjeta-autor-foto {
    width: 100px;
    flex-shrink: 0;
    aspect-ratio: 3 / 4;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(145deg, #0c1c33 0%, #1a3560 100%);
}

.tarjeta-autor-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.tarjeta-autor-inicial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fuente);
    font-size: 2.8rem;
    font-weight: 900;
    color: rgba(255,255,255,.2);
    text-transform: uppercase;
    user-select: none;
}

.tarjeta-autor-info {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1;
    min-width: 0;
}

.tarjeta-autor-nombre {
    font-family: var(--fuente);
    font-size: .9rem;
    font-weight: 800;
    color: var(--texto);
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.25;
    margin: 0;
}

.tarjeta-autor-rol {
    display: inline-block;
    font-family: var(--fuente);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--acento);
    background: rgba(30,95,196,.08);
    border: 1px solid rgba(30,95,196,.2);
    border-radius: 3px;
    padding: .2rem .55rem;
}

.tarjeta-autor-bio {
    font-size: .82rem;
    color: var(--texto-suave);
    line-height: 1.7;
    margin: 0;
    flex: 1;
    text-align: justify;
}

.tarjeta-autor-sin-bio {
    font-style: italic;
    color: var(--texto-muy-suave);
}

.tarjeta-autor-btn {
    display: inline-block;
    font-family: var(--fuente);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--acento);
    text-decoration: none;
    padding: .45rem .9rem;
    border: 1.5px solid var(--acento);
    border-radius: var(--radio);
    transition: background .2s, color .2s;
    align-self: flex-start;
    white-space: nowrap;
}

.tarjeta-autor-btn:hover {
    background: var(--acento);
    color: #fff;
    text-decoration: none;
}

/* Librerías */
.lista-librerias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
    margin: 1rem 0;
}

.lista-librerias span {
    font-size: .9rem;
    color: var(--texto-suave);
    padding: .3rem 0;
}

/* Contacto */
.layout-contacto {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: start;
    margin: 2.5rem 0;
}

.info-contacto p {
    color: var(--texto-suave);
    font-size: .95rem;
    margin-bottom: .5rem;
}

.info-contacto h3 {
    margin-bottom: 1rem;
}

.info-contacto a {
    color: var(--texto-suave);
    text-decoration: none;
    transition: color .2s;
}

.info-contacto a:hover {
    color: var(--acento);
    text-decoration: none;
}

.contacto-dato {
    font-size: .95rem;
    color: var(--texto-suave);
    margin-bottom: .35rem;
}

/* =========================================================
   18b. Página Sobre nosotros
   ========================================================= */

/* Historia + manifiesto */
.sobre-historia {
    background: #fff;
    padding: 2rem 0 3rem;
}

.sobre-interior {
    display: grid;
    grid-template-columns: 1fr 0.75fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
}

.sobre-fundadores {
    aspect-ratio: 3 / 4;
    background: var(--fondo-claro);
    border: 2px dashed var(--borde);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-muy-suave);
    font-size: .8rem;
    letter-spacing: .05em;
}

.sobre-fundadores img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.sobre-pretitulo {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--acento);
    margin-bottom: .8rem;
}

.sobre-titulo {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--fondo-oscuro);
}

.sobre-texto p {
    color: var(--texto-suave);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: .97rem;
    text-align: justify;
}

.sobre-manifiesto {
    font-style: italic;
    font-weight: 700 !important;
    color: var(--acento) !important;
    font-size: 1.05rem !important;
    margin-top: 1.2rem;
    text-align: left !important;
}

/* 4 Pilares */
.sobre-pilares {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--borde);
    border-radius: 8px;
    overflow: hidden;
}

.sobre-pilar {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--borde);
    text-align: center;
}

.sobre-pilar:last-child { border-right: none; }

.sobre-pilar-icono {
    width: 52px;
    height: 52px;
    margin: 0 auto .9rem;
    color: var(--acento);
}

.sobre-pilar-icono svg,
.sobre-pilar-icono img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sobre-pilar h4 {
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fondo-oscuro);
    margin-bottom: .55rem;
    line-height: 1.25;
}

.sobre-pilar p {
    font-size: .8rem;
    color: var(--texto-suave);
    line-height: 1.65;
    margin: 0;
}

/* Librerías por región */
.sobre-librerias {
    background: #fff;
    padding: 4rem 0;
    border-top: 1px solid var(--borde);
}

.sobre-librerias-cabecera {
    text-align: center;
    margin-bottom: 2.5rem;
}

.sobre-librerias-cabecera h2 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--fondo-oscuro);
    margin-bottom: .5rem;
}

.sobre-librerias-cabecera p {
    color: var(--texto-suave);
    font-size: .95rem;
}

.librerias-regiones {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem 2.5rem;
}

.libreria-region-titulo {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--acento);
    margin-bottom: .7rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--acento);
}

.libreria-region ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.libreria-region li {
    font-size: .875rem;
    color: var(--texto-suave);
    padding: .22rem 0;
    line-height: 1.4;
}

.libreria-region li em {
    font-style: normal;
    color: var(--texto-muy-suave);
    font-size: .8rem;
}

.libreria-region li a {
    color: var(--texto-suave);
    text-decoration: none;
    transition: color .2s;
}

.libreria-region li a:hover {
    color: var(--acento);
    text-decoration: none;
}

/* Distribución */
.sobre-distribucion {
    background: #fff;
    padding: 3.5rem 0;
    border-top: 1px solid var(--borde);
}

.distribucion-caja {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    background: var(--fondo-oscuro);
    border-radius: 8px;
    padding: 2.5rem 3rem;
}

.distribucion-texto h2 {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: .6rem;
}

.distribucion-texto p {
    font-size: .9rem;
    color: rgba(255,255,255,.72);
    margin-bottom: .4rem;
    line-height: 1.65;
    text-align: justify;
}

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

.distribucion-texto a { color: rgba(255,255,255,.9); }

.distribucion-accion { flex-shrink: 0; }

/* Iconos redes en contacto */
.contacto-redes {
    display: flex;
    gap: 1rem;
    margin-top: .5rem;
}

.contacto-redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fondo-claro);
    color: var(--fondo-oscuro);
    transition: background .2s, color .2s;
    text-decoration: none;
}

.contacto-redes a:hover {
    background: var(--fondo-oscuro);
    color: #fff;
}

/* CTA final */
.sobre-cta {
    background: #fff;
    padding: 4rem 0;
    border-top: 1px solid var(--borde);
    text-align: center;
}

.sobre-cta h2 {
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--fondo-oscuro);
    margin-bottom: .5rem;
}

.sobre-cta p {
    color: var(--texto-suave);
    margin-bottom: 0;
}

.sobre-cta-botones {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* =========================================================
   19. Admin — estructura y layout
   ========================================================= */

body.admin {
    font-family: var(--fuente-ui);
    background: #f2f2f2;
    color: var(--texto);
}

body.admin-login {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: var(--fondo-oscuro);
}

.admin-login-caja {
    background: #fff;
    padding: 2.75rem 2.5rem;
    border-radius: var(--radio);
    width: 380px;
    max-width: calc(100vw - 2rem);
    box-shadow: 0 12px 45px rgba(0,0,0,.32);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-logo img {
    height: 90px;
    width: auto;
    margin: 0 auto;
}

.admin-login-caja h1 {
    font-size: 1.4rem;
    margin-bottom: .3rem;
    text-align: center;
}

.admin-login-caja .subtitulo-login {
    text-align: center;
    color: var(--texto-suave);
    font-size: .85rem;
    margin-bottom: 2rem;
}

/* Layout admin */
.admin-wrapper {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #1c1c1c;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid #2a2a2a;
    text-decoration: none;
    display: block;
}

.admin-logo span {
    display: block;
    color: #e8e4dc;
    font-family: var(--fuente);
    font-size: 1rem;
    letter-spacing: .08em;
}

.admin-logo small {
    color: var(--acento);
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
}

.admin-nav a {
    display: block;
    padding: .7rem 1.2rem;
    color: #999;
    text-decoration: none;
    font-size: .88rem;
    transition: color .15s, background .15s;
    border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.activo {
    color: #e8e4dc;
    background: rgba(255,255,255,.04);
    border-left-color: var(--acento);
    text-decoration: none;
}

.admin-nav .grupo-nav {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #444;
    padding: 1.2rem 1.2rem .4rem;
}

.admin-contenido {
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.admin-topbar h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* =========================================================
   20. Admin — componentes
   ========================================================= */

/* Tarjetas de stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-tarjeta {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radio);
    padding: 1.4rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .2s, box-shadow .2s;
}

a.stat-tarjeta {
    text-decoration: none;
    cursor: pointer;
}
a.stat-tarjeta:hover {
    border-color: var(--acento);
    box-shadow: 0 2px 12px rgba(30,95,196,.12);
    text-decoration: none;
}

.stat-tarjeta .stat-valor {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: .3rem;
}

.stat-tarjeta .stat-etiqueta {
    font-size: .78rem;
    color: var(--texto-suave);
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* Contenedor blanco */
.caja-admin {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radio);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.caja-admin h2 {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--fuente-ui);
    margin-bottom: 1.2rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid #eee;
}

/* Barra de acciones */
.acciones-bar {
    display: flex;
    gap: .8rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Imagen thumbnail en tabla */
.thumb-tabla {
    width: 45px;
    height: 55px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

/* Formulario de edición admin */
.form-admin {
    max-width: 820px;
}

.form-admin .rejilla-2 {
    gap: 1.2rem;
}

/* =========================================================
   21. Utilidades y responsive
   ========================================================= */

.oculto { display: none !important; }
.visible { display: block !important; }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 1rem; }
.mb-2  { margin-bottom: 2rem; }
.mt-1  { margin-top: 1rem; }
.mt-2  { margin-top: 2rem; }

.separador {
    border: none;
    border-top: 1px solid var(--borde);
    margin: 2rem 0;
}

.carrito-vacio,
.sin-resultados {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--texto-suave);
}

.carrito-vacio h2,
.sin-resultados h2 {
    font-size: 1.4rem;
    margin-bottom: .8rem;
}

/* Confirmación de pedido */
.pedido-confirmado {
    max-width: 600px;
    margin: 4rem auto;
    text-align: center;
    padding: var(--padding-pagina);
}

.pedido-confirmado .numero-pedido {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--acento);
    margin: 1rem 0;
}

/* Breadcrumb */
.ficha-cabecera-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.miga-pan {
    font-size: .82rem;
    color: var(--texto-muy-suave);
    margin-bottom: 0;
}

.miga-pan a { color: var(--texto-muy-suave); text-decoration: none; }
.miga-pan a:hover { color: var(--texto-suave); }

/* ---- Responsive ---- */

@media (max-width: 1100px) {
    .rejilla-autores-inicio { grid-template-columns: repeat(4, 1fr); }
    .pie-superior           { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
    .catalogo-layout      { grid-template-columns: 220px 1fr; }
    .rejilla-5            { grid-template-columns: repeat(4, 1fr); }
    .explorar-grid        { grid-template-columns: repeat(3, 1fr); }
    .admin-stats          { grid-template-columns: repeat(2, 1fr); }
    .que-es-interior      { flex-direction: column; }
    .que-es-texto         { border-right: none; border-bottom: 1px solid rgba(12,28,51,.2); padding: 2rem 0; flex: none; }
    .que-es-tarjetas      { flex-wrap: wrap; }
    .rejilla-autores      { grid-template-columns: 1fr; }
    .hero-interior        { grid-template-columns: 60% 40%; }
    .sobre-pilares        { grid-template-columns: repeat(2, 1fr); }
    .sobre-pilar:nth-child(1),
    .sobre-pilar:nth-child(2) { border-bottom: 1px solid var(--borde); }
    .sobre-pilar:nth-child(2) { border-right: none; }
    .sobre-pilar:nth-child(3) { border-right: none; }
    .librerias-regiones   { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.35rem; }

    .barra-anuncio        { display: none; }
    .navegacion-principal { display: none; }

    /* Cabecera móvil: hamburger | logo centrado | iconos */
    .cabecera-interior {
        flex-wrap: nowrap;
        position: relative;
        gap: 0;
        padding-top: .6rem;
        padding-bottom: .6rem;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 2;
    }

    .logo img {
        width: auto;
        height: 44px;
    }

    .menu-hamburguesa {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: .5rem;
        order: 1;
        flex-shrink: 0;
    }
    .menu-hamburguesa span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--texto);
    }
    .navegacion-principal.abierto {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--borde);
        border-bottom: 1px solid var(--borde);
        padding: 1rem;
        z-index: 200;
        gap: .5rem;
    }

    .cabecera-iconos {
        display: flex !important;
        gap: .8rem;
        align-items: center;
        order: 3;
        flex-shrink: 0;
        margin-left: auto;
    }

    .icono-lupa { display: none !important; }

    /* FIX-3: Product image height on mobile */
    .imagen-principal { max-height: 280px; object-fit: contain; }

    /* FIX-10: Category sidebar below products on mobile */
    .barra-lateral { order: 2; }
    .catalogo-productos { order: 1; }

    .hero-interior       { grid-template-columns: 1fr; }
    .hero-imagen         { display: none; }
    .hero-texto          { padding: 3rem 0; }

    /* Cabecera de sección: título + enlace no desbordan */
    .seccion-cabecera    { flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
    .seccion-cabecera h2 { font-size: 1.1rem; }

    /* Explora catálogo: 2 cols más bajas en móvil */
    .explorar-grid       { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    .explorar-card       { height: 200px; }

    .que-es-tarjetas     { flex-wrap: wrap; }
    .que-es-tarjetas .tarjeta-feature { flex: 1 1 45%; border-right: none; border-bottom: 1px solid rgba(12,28,51,.15); }
    .rejilla-autores-inicio { grid-template-columns: repeat(3, 1fr); }

    .boletin-interior    { grid-template-columns: 1fr; gap: 2rem; }

    .catalogo-layout     { grid-template-columns: 1fr; }
    .barra-lateral       { position: static; }
    .ficha-producto      { grid-template-columns: 1fr; gap: 2rem; }
    .ficha-galeria       { position: static; }
    .rejilla-2           { grid-template-columns: 1fr; }
    .rejilla-3           { grid-template-columns: 1fr; }
    .rejilla-4           { grid-template-columns: repeat(2, 1fr); }
    .rejilla-5           { grid-template-columns: repeat(2, 1fr); }
    .pie-superior        { grid-template-columns: 1fr 1fr; }
    .layout-checkout     { grid-template-columns: 1fr; }
    .layout-contacto     { grid-template-columns: 1fr; }
    .lista-librerias     { grid-template-columns: repeat(2, 1fr); }
    .rejilla-autores     { grid-template-columns: 1fr; gap: 1rem; }
    .admin-stats         { grid-template-columns: 1fr 1fr; }
    .admin-wrapper       { grid-template-columns: 1fr; }
    .admin-sidebar       { position: static; height: auto; }
    /* sobre-nosotros */
    .sobre-interior      { grid-template-columns: 1fr; gap: 2rem; }
    .sobre-fundadores    { aspect-ratio: 4 / 3; }
    .sobre-pilares       { grid-template-columns: repeat(2, 1fr); }
    .sobre-pilar:nth-child(2) { border-right: none; }
    .sobre-pilar:nth-child(1),
    .sobre-pilar:nth-child(2) { border-bottom: 1px solid var(--borde); }
    .librerias-regiones  { grid-template-columns: repeat(2, 1fr); }
    .distribucion-caja   { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 480px) {
    .rejilla-4              { grid-template-columns: 1fr; }
    .rejilla-5              { grid-template-columns: repeat(2, 1fr); }
    .pie-superior           { grid-template-columns: 1fr; }
    .rejilla-autores        { grid-template-columns: 1fr 1fr; }
    .rejilla-autores-inicio { grid-template-columns: repeat(2, 1fr); }
    .categorias-pildoras    { gap: .5rem; }
    /* sobre-nosotros */
    .sobre-pilares          { grid-template-columns: 1fr; }
    .sobre-pilar            { border-right: none; border-bottom: 1px solid var(--borde); }
    .sobre-pilar:last-child { border-bottom: none; }
    .librerias-regiones     { grid-template-columns: 1fr; }
}

/* =========================================================
   22. Blog público
   ========================================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.blog-tarjeta {
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.blog-tarjeta:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.blog-tarjeta-imagen {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.blog-tarjeta-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}

.blog-tarjeta:hover .blog-tarjeta-imagen img {
    transform: scale(1.04);
}

.blog-tarjeta-cuerpo {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-tarjeta-meta {
    font-size: .75rem;
    color: var(--texto-suave);
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.blog-tarjeta-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 .75rem;
    flex: 1;
}

.blog-tarjeta-titulo a {
    color: var(--texto);
    text-decoration: none;
}

.blog-tarjeta-titulo a:hover {
    color: var(--acento);
}

.blog-tarjeta-extracto {
    font-size: .875rem;
    color: var(--texto-suave);
    line-height: 1.55;
    margin: 0 0 1rem;
}

.blog-tarjeta-leer-mas {
    font-size: .82rem;
    font-weight: 600;
    color: var(--acento);
    text-decoration: none;
    letter-spacing: .02em;
}

.blog-tarjeta-leer-mas:hover { text-decoration: underline; }

/* Paginador blog */
.pagina-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 .75rem;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    font-size: .875rem;
    color: var(--texto);
    text-decoration: none;
    background: #fff;
    transition: border-color .15s, background .15s;
}

.pagina-link:hover { border-color: var(--acento); color: var(--acento); }
.pagina-activo     { background: var(--acento); border-color: var(--acento); color: #fff !important; font-weight: 700; }

/* Artículo individual — contenido Quill */
.articulo-contenido .ql-align-right   { text-align: right; }
.articulo-contenido .ql-align-center  { text-align: center; }
.articulo-contenido .ql-align-justify { text-align: justify; }
.articulo-contenido .ql-editor h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.articulo-contenido .ql-editor h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.articulo-contenido .ql-editor h4 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
.articulo-contenido .ql-editor p  { margin-bottom: 1.15rem; }
.articulo-contenido .ql-editor img { max-width: 100%; border-radius: var(--radio); margin: 1rem 0; }
.articulo-contenido .ql-editor blockquote {
    border-left: 3px solid var(--acento);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--texto-suave);
    font-style: italic;
}
.articulo-contenido .ql-editor ul,
.articulo-contenido .ql-editor ol { padding-left: 1.75rem; margin-bottom: 1rem; }
.articulo-contenido .ql-editor li { margin-bottom: .4rem; line-height: 1.65; }
.articulo-contenido .ql-editor a  { color: var(--acento); }
.articulo-contenido .ql-editor code {
    background: #f3f4f6;
    padding: .15rem .4rem;
    border-radius: 3px;
    font-size: .875em;
}
.articulo-contenido .ql-editor pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--radio);
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   23. Crowdfunding — página pública de campaña
   ===================================================== */

.cf-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    background: #1a1a1a;
}
.cf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    width: 100%;
}
.cf-hero-inner { padding-bottom: 2.5rem; }
.cf-hero-titulo {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 .5rem;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.cf-hero-extracto {
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    margin: 0;
    max-width: 620px;
    line-height: 1.5;
}
.cf-hero .miga-pan a,
.cf-hero .miga-pan span { color: rgba(255,255,255,.65) !important; }

.cf-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}
.cf-main { min-width: 0; }
.cf-aside { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

.caja-cf {
    background: #fff;
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 1.25rem;
}
.cf-recompensa {
    transition: border-color .2s, box-shadow .2s;
}
.cf-recompensa:hover {
    border-color: var(--acento);
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.cf-agotada {
    opacity: .55;
    filter: grayscale(.4);
}

/* Reward cards rediseño */
.cf-recompensa { padding: 1.1rem; }

@media (max-width: 860px) {
    .cf-layout { grid-template-columns: 1fr; }
    .cf-aside { position: static; }
    .cf-hero { min-height: 220px; }
}

/* ── Stats bar ─────────────────────────────────────────── */
.cf-statsbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cf-statsbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .7rem 1rem;
    flex-wrap: wrap;
}
.cf-statsbar-kpis {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.cf-kpi {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.cf-kpi strong { font-size: 1.1rem; font-weight: 800; color: var(--texto); }
.cf-kpi span   { font-size: .65rem; font-weight: 600; color: var(--texto-suave); letter-spacing: .04em; }
.cf-kpi-sep {
    width: 1px;
    height: 28px;
    background: var(--borde);
    flex-shrink: 0;
}
.cf-statsbar-prog {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 120px;
    max-width: 220px;
}
.cf-statsbar-barra {
    flex: 1;
    height: 5px;
    background: var(--fondo-suave);
    border-radius: 10px;
    overflow: hidden;
}
.cf-statsbar-fill {
    height: 100%;
    background: var(--acento);
    border-radius: 10px;
    transition: width .6s ease;
}
.cf-statsbar-pct {
    font-size: .72rem;
    font-weight: 700;
    color: var(--acento);
    white-space: nowrap;
}
.cf-statsbar-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cf-statsbar-prog { display: none; }
    .cf-statsbar-actions .btn { font-size: .82rem; padding: .4rem .75rem; }
}

/* Menú compartir */
.cf-share-btn {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .55rem .75rem;
    border: none;
    background: none;
    border-radius: 7px;
    font-size: .85rem;
    color: var(--texto);
    text-decoration: none;
    cursor: pointer;
    transition: background .12s;
    text-align: left;
    white-space: nowrap;
}
.cf-share-btn:hover { background: var(--fondo-suave); }

/* ============================================================================
   ============ RESPONSIVE / MÓVIL — repaso completo ============
   Bloque centralizado de overrides responsive. Añadido al final para auditar
   fácilmente y no romper el diseño de escritorio ya existente.
   Breakpoints: 900px (tablet) · 600px (móvil) · 380px (móvil estrecho)
   ============================================================================ */

/* ------------------------------------------------------------------ *
 * Seguridad global anti-desbordamiento (scroll horizontal en móvil)  *
 * ------------------------------------------------------------------ */
@media (max-width: 900px) {
    html, body { overflow-x: hidden; }
    img, video, iframe, svg { max-width: 100%; }
    /* Reduce el padding lateral de la página en pantallas medianas/pequeñas */
    :root { --padding-pagina: 0 1rem; }
    table { max-width: 100%; }
}

/* ============================================================
   TABLET (max-width: 900px)
   ============================================================ */
@media (max-width: 900px) {

    /* Rejillas genéricas */
    .rejilla-2 { grid-template-columns: 1fr; }
    .rejilla-3 { grid-template-columns: repeat(2, 1fr); }

    /* Ficha de producto: galería + info en una columna */
    .ficha-producto { grid-template-columns: 1fr; gap: 2rem; }
    .ficha-galeria  { position: static; }

    /* Catálogo: sidebar de categorías debajo de los productos */
    .catalogo-layout    { grid-template-columns: 1fr; }
    .barra-lateral      { position: static; order: 2; }
    .catalogo-productos { order: 1; }

    /* Checkout y contacto a una columna */
    .layout-checkout { grid-template-columns: 1fr; }
    .layout-contacto { grid-template-columns: 1fr; }
    .caja-resumen-pedido { position: static; }

    /* Autores: una sola tarjeta por fila ya en tablet (tarjetas anchas) */
    .rejilla-autores { grid-template-columns: 1fr; }

    /* Crowdfunding a una columna */
    .cf-layout { grid-template-columns: 1fr; }
    .cf-aside  { position: static; }
}

/* ============================================================
   MÓVIL (max-width: 600px)
   ============================================================ */
@media (max-width: 600px) {

    /* ---- Tipografía / títulos más contenidos ---- */
    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.3rem; }
    .banda-titulo            { padding: 1.8rem 0; margin-bottom: 1.8rem; }
    .banda-titulo h1         { font-size: 1.5rem; }
    .ficha-info h1           { font-size: 1.45rem; }

    /* ---- Rejillas de producto: 2 columnas (no 1) para no agigantar ---- */
    .rejilla-3,
    .rejilla-4,
    .rejilla-5            { grid-template-columns: repeat(2, 1fr); gap: .8rem; }

    /* ---- Explora categorías ---- */
    .explorar-grid       { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
    .explorar-card       { height: 180px; }

    /* ---- Autores (sección inicio + página) ---- */
    .rejilla-autores-inicio { grid-template-columns: repeat(3, 1fr); }
    .rejilla-autores        { grid-template-columns: 1fr; gap: 1rem; }
    /* La tarjeta de autor: foto arriba centrada, texto debajo */
    .tarjeta-autor          { flex-direction: column; align-items: center; text-align: center; padding: 1.2rem; gap: 1rem; }
    .tarjeta-autor-foto     { width: 120px; }
    .tarjeta-autor-info     { align-items: center; width: 100%; }
    .tarjeta-autor-btn      { align-self: center; }

    /* ---- Ficha de producto ---- */
    .imagen-principal       { max-height: 320px; object-fit: contain; }
    .ficha-accion           { flex-wrap: wrap; }
    .ficha-accion .btn      { flex: 1; min-width: 0; }
    .ficha-tecnica          { grid-template-columns: 1fr; }
    .ficha-tecnica .ft-dato { border-right: none; }
    .ficha-meta-mini        { gap: .8rem; }
    /* "Volver al catálogo" alineado a la izquierda en la barra superior */
    .ficha-cabecera-nav     { flex-wrap: wrap; gap: .6rem; }
    /* Productos relacionados: tarjetas algo más estrechas */
    .relacionados-pista .tarjeta-producto { flex: 0 0 150px; }

    /* ---- Carrito (tabla ancha → scroll horizontal controlado) ---- */
    .carrito-tabla-scroll   { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; }
    .carrito-tabla-scroll .carrito-tabla { min-width: 480px; margin-bottom: 0 !important; }
    .carrito-tabla          { font-size: .82rem; }
    .carrito-tabla th,
    .carrito-tabla td       { padding: .55rem .5rem; }
    .carrito-imagen         { width: 44px; height: 56px; }
    .carrito-cantidad       { width: 56px; }
    .carrito-resumen        { max-width: 100%; margin-left: 0; }
    /* El bloque acciones + resumen se apila */
    .carrito-vacio          { padding: 2.5rem 1rem; }

    /* ---- Tablas genéricas (ej. mi-cuenta "Mis pedidos") ---- */
    .tabla th, .tabla td    { padding: .6rem .65rem; }
    .tabla                  { font-size: .85rem; }

    /* ---- Checkout (pedido.php) ---- */
    .co-metodos             { grid-template-columns: 1fr; }
    .co-metodo              { flex-direction: row; justify-content: center; gap: .6rem; padding: .75rem; font-size: .8rem; }
    .co-metodo svg, .co-metodo img { width: 22px; height: 22px; }

    /* ---- Pie de página (móvil) ---- */
    .pie-superior           { grid-template-columns: 1fr; gap: 2.4rem; text-align: center; padding-top: 2.4rem; padding-bottom: 2rem; }
    .pie-logo               { display: flex; flex-direction: column; align-items: center; }
    .pie-logo img           { height: 54px; margin: 0 auto .9rem; }
    .pie-logo p             { max-width: 300px; margin-left: auto; margin-right: auto; }
    .pie-origen             { margin-top: .3rem; }
    .pie-redes              { justify-content: center; }
    .pie-bloque h4          { text-align: center; margin-bottom: .9rem; }
    /* Enlaces de información: 1 columna centrada, ordenada */
    .pie-nav-2col           { grid-template-columns: 1fr; gap: .6rem; text-align: center; }
    .pie-nav-2col::after    { display: none; }
    .pie-nav-2col a:nth-child(odd),
    .pie-nav-2col a:nth-child(even) { padding-left: 0; padding-right: 0; }
    /* Copyright: centrado, apilado y legible */
    .pie-inferior           { flex-direction: column; text-align: center; justify-content: center; gap: .15rem; line-height: 1.6; font-size: .78rem; padding: 1.1rem .5rem; }

    /* Páginas legales: texto justificado en móvil (mismo ancho) */
    .pagina-interior, .pagina-interior p, .pagina-interior li { text-align: justify; }

    /* ---- Catálogo: barra de filtros apilada ---- */
    .catalogo-filtros-barra { flex-direction: column; align-items: stretch; }
    .filtro-grupo,
    .filtro-busqueda-grupo  { width: 100%; max-width: 100%; flex: none; min-width: 0; box-sizing: border-box; }
    .filtro-grupo,
    .filtro-busqueda-grupo  { min-height: 42px; }          /* misma altura en todos */
    .filtro-grupo select    { width: 100%; flex: 1; }
    .filtro-busqueda-input  { width: 100%; flex: 1; }       /* el buscador llena el ancho igual que los demás */
    .filtro-precio-grupo    { flex: 1; width: 100%; }
    .filtro-precio-grupo input[type="number"] { flex: 1; width: auto; min-width: 0; }
    .filtro-btn-aplicar,
    .filtro-btn-limpiar     { width: 100%; justify-content: center; }
    .catalogo-cabecera      { flex-wrap: wrap; gap: .6rem; }

    /* ---- Blog ---- */
    .blog-grid              { grid-template-columns: 1fr; }

    /* ---- Crowdfunding (campana.php) ---- */
    /* Datos personales del modal de pago: una columna */
    #modal-pago [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }

    /* ---- Sobre nosotros ---- */
    .sobre-interior         { grid-template-columns: 1fr; gap: 2rem; }
    .sobre-pilares          { grid-template-columns: 1fr 1fr; }
    .librerias-regiones     { grid-template-columns: 1fr 1fr; }
    .distribucion-caja      { flex-direction: column; gap: 1.5rem; text-align: center; padding: 2rem 1.5rem; }
    .lista-librerias        { grid-template-columns: 1fr 1fr; }

    /* ---- Páginas estáticas / formularios estrechos ---- */
    .pagina-interior        { margin: 1.8rem auto; }

    /* ---- Productos relacionados: que el wrapper no provoque overflow ---- */
    .relacionados-wrapper   { gap: .4rem; }
    .relacionados-btn       { width: 32px; height: 32px; font-size: 1.2rem; }
}

/* ============================================================
   MÓVIL ESTRECHO (max-width: 380px)
   ============================================================ */
@media (max-width: 380px) {

    h1 { font-size: 1.4rem; }
    .banda-titulo h1 { font-size: 1.35rem; }

    /* Productos: 1 columna en pantallas muy pequeñas */
    .rejilla-3,
    .rejilla-4,
    .rejilla-5              { grid-template-columns: 1fr; }
    .explorar-grid          { grid-template-columns: 1fr; }

    /* Autores inicio: 2 columnas */
    .rejilla-autores-inicio { grid-template-columns: repeat(2, 1fr); }

    /* Pilares / regiones / librerías a 1 columna */
    .sobre-pilares          { grid-template-columns: 1fr; }
    .librerias-regiones     { grid-template-columns: 1fr; }
    .lista-librerias        { grid-template-columns: 1fr; }

    /* Donaciones sugeridas (campana): que no se aprieten */
    .ficha-precio           { font-size: 1.5rem; }
}
