/* versión pastel / discreta */
:root{--tinta:#2f2d29;--papel:#efebe1;--hoja:#fdfbf5;--linea:#dbe5ee;--margen:#e9b3ad;--amarillo:#f7ecb5;--rosa:#f3d3d9;--naranja:#f0d2b6;--rojo:#c98877;--cian:#cfe6e0;--menta:#a9cfc2;--azul:#8494c4;--verde:#d9e8c8;--kraft:#dccbb0;--kraft-o:#c4ad8a;--gris:#6f6b62;--sh:1px 2px 6px rgba(47,45,41,.16);--sh2:2px 5px 14px rgba(47,45,41,.2)}
.temas li:nth-child(6n) a{background:#e2daf3}
.temas a,.chips a,.filtros a,.filtros select,.acc-f button,.seguir,.form input,.cajon header button,.modal-x,.flecha,.fav{border-color:rgba(47,45,41,.55)}
.busca,.busca-hero{box-shadow:2px 3px 0 rgba(47,45,41,.25);border-color:rgba(47,45,41,.7)}.busca:focus-within{box-shadow:3px 4px 0 var(--azul)}
.anadir{box-shadow:2px 2px 0 var(--amarillo)}.anadir:hover,.anadir.ok{box-shadow:2px 2px 0 rgba(47,45,41,.35)}
.chips a,.filtros a,.filtros select,.acc-f button,.seguir,.form input,.cajon header button,.flecha,.fav{box-shadow:1px 2px 0 rgba(47,45,41,.22)}
.btn,.mas{box-shadow:3px 3px 0 var(--amarillo)}.btn-claro,.btn:hover,.mas:hover{box-shadow:3px 3px 0 rgba(47,45,41,.3)}
.compra .anadir{box-shadow:3px 3px 0 rgba(47,45,41,.3);color:#fff}
.hero h1 mark{color:#fff}.chip-d{background:var(--rojo)}.precios .dto,.ant .dto{background:var(--rojo)}
.pr b,.compra .precio{filter:drop-shadow(1px 2px 0 rgba(47,45,41,.35))}
.sello-h{border-color:var(--azul);color:var(--azul);box-shadow:inset 0 0 0 4px rgba(255,255,255,.6),inset 0 0 0 6px var(--azul);opacity:.85}
.top{background:#3b3935}.top b{color:var(--amarillo)}
#avisos{box-shadow:2px 2px 0 rgba(47,45,41,.3)}.wa{box-shadow:2px 2px 0 rgba(47,45,41,.3)}
.cuenta,.cuenta-g{background:var(--rojo)}.cuenta[data-cero]{background:var(--tinta)}
.vende-s .env::after{color:var(--verde);text-shadow:1px 1px 0 rgba(47,45,41,.4)}
.tapa::before,.m::before,.up::before,.principal::before,.entrada::before,.compra::before,.art::before{opacity:.8}

/* paleta fría, distinta de librosoutlet */
:root{--tinta:#2b2f3a;--papel:#edf0f5;--hoja:#fbfcfe;--linea:#d3dcee;--margen:#eeaaa6;--amarillo:#fbf3c9;--rosa:#f7d8cc;--naranja:#f8dcc4;--rojo:#6c7cc2;--cian:#cfe0f4;--menta:#b8d8cb;--azul:#5464b0;--verde:#d2e7da;--kraft:#d9def1;--kraft-o:#bcc5e4;--gris:#6a6f7c;--sh:1px 2px 6px rgba(43,47,58,.15);--sh2:2px 5px 14px rgba(43,47,58,.18)}
body{background-image:var(--fibra)}
.temas li:nth-child(6n+1) a{background:#fbf3c9}.temas li:nth-child(6n+2) a{background:#dfe6fa}.temas li:nth-child(6n+3) a{background:#d2e7da}.temas li:nth-child(6n+4) a{background:#e6ddf6}.temas li:nth-child(6n+5) a{background:#f7d8cc}.temas li:nth-child(6n) a{background:#cfe0f4}
.top{background:#2b2f3a}.cab::before{opacity:.4}
.hero::after{opacity:.7}
.garantias li:nth-child(1){background:#fbf3c9}.garantias li:nth-child(2){background:#e6ddf6}.garantias li:nth-child(3){background:#d2e7da}.garantias li:nth-child(4){background:#cfe0f4}
.sec:nth-of-type(3n) h2{background:#e6ddf6}
.tema{background-color:#e6ddf6}.tema:nth-child(4n+2){background-color:#fbf3c9}.tema:nth-child(4n+3){background-color:#cfe0f4}.tema:nth-child(4n){background-color:#d2e7da}
.lo-tenemos,.gar-f{background-color:#dfe6fa}
.tapa::before,.m::before{background:rgba(207,224,244,.85)}

/* móvil de la versión neutra: solo libros */
@media(max-width:640px){
.top{display:none}
.temas{display:none}
.inicio .hero,.inicio .garantias,.inicio .vende-s,.inicio .sec:has(.temas-g),.inicio .sec:has(.entradas){display:none!important}
.inicio main>.env:first-of-type .sec:first-of-type{padding-top:14px}
.inicio .sec{padding:18px 0 2px}.inicio .sec-cab{margin-bottom:6px}.inicio .sec-cab p{display:none}
.inicio .sec h2{font-size:21px}
.inicio .carrusel{grid-auto-columns:58%;gap:18px;padding:16px 12px 12px}
.inicio .libro h3{font-size:14.5px}
.enlaces-m{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:26px 16px 8px}.enlaces-m a{display:block;text-align:center;text-decoration:none;font-weight:700;font-size:14px;padding:11px 8px;background:var(--hoja);border:1.5px solid rgba(43,47,58,.35);color:var(--tinta)}.enlaces-m a:last-child{grid-column:1/-1;background:var(--amarillo)}
.inicio .pie-in>div:not(:first-child){display:none}.inicio .pie{margin-top:20px;padding-top:26px}
}

/* móvil neutro: rejilla fija de 3, sin deslizar */
@media(max-width:640px){
.inicio .carrusel-w .flecha{display:none}
.inicio .carrusel,.rejilla{display:grid!important;grid-auto-flow:row!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-columns:auto!important;gap:16px 10px!important;overflow:visible!important;padding:10px 0 4px!important;margin:0!important;scroll-snap-type:none}
.inicio .carrusel .libro:nth-child(n+7){display:none}
.inicio .carrusel .libro,.rejilla .libro{font-size:12px}
.inicio .libro h3,.rejilla .libro h3{font-size:12px;line-height:1.25;margin:9px 0 0}
.inicio .libro .au,.rejilla .libro .au{display:none}
.inicio .libro .pr,.rejilla .libro .pr{margin:5px 0 6px;gap:4px;flex-wrap:wrap}.inicio .libro .pr b,.rejilla .libro .pr b{font-size:12px;padding:4px 6px 3px 16px;background-position:0 0}.inicio .libro .pr s,.rejilla .libro .pr s{font-size:10.5px}
.inicio .libro .anadir,.rejilla .libro .anadir{font-size:11px;padding:6px 2px;box-shadow:none}
.inicio .chips-t .chip:not(.chip-d),.rejilla .chips-t .chip:not(.chip-d){display:none}.chip-d{font-size:10px;padding:6px 4px}
.inicio .fav,.rejilla .fav{width:26px;height:26px;right:-4px;top:-6px}.inicio .fav svg,.rejilla .fav svg{width:13px;height:13px}
.tapa::before{height:12px;top:-6px}
}

/* móvil de noche: beige cálido, menos contraste */
@media(max-width:640px){
html.noche{--tinta:#3b3227;--papel:#e8dcc4;--hoja:#efe5d0;--linea:#dccfb3;--gris:#6e6252;--amarillo:#eedfae;--rosa:#e8cbbd;--cian:#d4d8cf;--verde:#d6dcc0;--azul:#6f6a8f;--rojo:#a87862;--kraft:#ddcfb4;--sh:1px 2px 5px rgba(59,50,39,.18);--sh2:2px 4px 12px rgba(59,50,39,.2);color-scheme:light}
html.noche body{background-color:var(--papel)}
html.noche .cab,html.noche .tabbar,html.noche .barra{background-color:var(--hoja)}
html.noche .busca,html.noche .busca input,html.noche .tapa,html.noche .m,html.noche .principal,html.noche .resumen,html.noche .compra,html.noche .sug,html.noche #ck-av,html.noche #ck-av button,html.noche .pr b{background-color:var(--hoja)!important}
html.noche .busca button,html.noche .anadir{background:#4a3f31;color:#f3ead7;border-color:#4a3f31}
html.noche .cuenta[data-cero]{background:#4a3f31}
html.noche img{filter:brightness(.9) sepia(.12)}
html.noche .wa{filter:saturate(.7) brightness(.92)}
html.noche ::selection{background:#e6d29a}
}

/* 9/11 (Pedro): titular «Libros que / quieren / otra vuelta» — cada tira de papel es un bloque propio, ninguna pisa a otra */
.hero h1 { line-height: 1.05; }
.hero h1 .h-a { display: inline-block; line-height: 1.12; padding: .04em .25em .1em; transform: rotate(-1.5deg); }
.hero h1 .h-a2 { transform: rotate(.8deg) translateX(.15em); margin-top: .14em; }
.hero h1 mark { margin-top: .14em; line-height: 1.12; }

/* 9/11 (Pedro): Recién llegados en rejilla (30 libros, 5-6 filas) en vez de carrusel */
.rejilla-nov { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 24px 16px; }
@media (max-width: 1100px) { .rejilla-nov { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sec-nov-mas { margin-top: 0 !important; padding-top: 6px !important; }
.sec-nov { margin-bottom: 8px; }
.rejilla-nov article.libro { width: auto; min-width: 0; max-width: none; flex: none; }
.mas-nov { text-align: center; margin: 26px 0 0; }
@media (max-width: 600px) { .rejilla-nov { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }

/* rejilla de 8 columnas: tarjeta compacta para que precio y botón quepan en una línea */
@media (min-width: 1101px) {
  .rejilla-nov article.libro h3 { font-size: .82rem; }
  .rejilla-nov article.libro .au { font-size: .72rem; }
  .rejilla-nov article.libro .pr { white-space: nowrap; font-size: .8rem; }
  .rejilla-nov article.libro .pr s { font-size: .68rem; }
  .rejilla-nov article.libro .anadir { font-size: .72rem; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
}
