/* BooksFirst v10.98 — Black November + 30 years storefront refinement.
   Layered after existing CSS; no route, stock, pricing or checkout changes. */
:root { --bf98-ink:#0d182a;--bf98-navy:#0a1d43;--bf98-red:#e50045;--bf98-border:#e6e9ee; }
html { scrollbar-gutter:stable; }
body { overflow-x:clip; }
.shell, .shop-layout, .shop-layout>* { min-width:0; }
/* Keep the heritage identity and premium campaign treatment, but improve legibility. */
.bf64-nov-announcement { line-height:1.5; letter-spacing:.02em; text-align:center; }
.bf66-home-hero-copy { max-width:min(670px,100%); }
.bf66-home-hero-actions a { min-height:44px; }
.bf66-30years { isolation:isolate; }
/* Catalogue: fixed-width sidebar must not force five-up cards beyond the viewport. */
.shop-layout.bf7-shop-layout { grid-template-columns:minmax(225px,255px) minmax(0,1fr);column-gap:24px; }
.shop-layout.bf7-shop-layout>.filters, .shop-layout.bf7-shop-layout>div { min-width:0; }
.bf7-shop-layout .catalog-grid, .bf39-deals-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;min-width:0; }
.bf7-shop-layout .catalog-grid>.product-card, .bf39-deals-grid>.product-card { min-width:0;max-width:100%;width:100%; }
.bf7-shop-layout .product-card .product-content, .bf39-deals-grid .product-content { min-width:0; }
.bf7-shop-layout .product-card .product-title, .bf39-deals-grid .product-title { font-size:clamp(12px,1vw,14px)!important;line-height:1.45!important;min-height:2.85em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.bf7-shop-layout .product-author, .bf39-deals-grid .product-author { font-size:11px!important;line-height:1.5; }
.bf7-shop-layout .product-price strong, .bf39-deals-grid .product-price strong { font-size:clamp(13px,1.05vw,16px)!important; }
.bf7-shop-layout .bf93-buy-actions button, .bf39-deals-grid .bf93-buy-actions button { min-height:38px; }
.bf7-shop-layout .product-cover img, .bf39-deals-grid .product-cover img { object-fit:contain; }
.bf7-shop-layout .product-meta-row, .bf39-deals-grid .product-meta-row { flex-wrap:wrap; }
/* Cover fallback explicitly states what is missing; it must not masquerade as the original edition artwork. */
.cover-fallback.bf7-cover-fallback { background:linear-gradient(160deg,rgba(9,28,64,.88),rgba(12,34,67,.92)),var(--fallback-cover),#0b2047!important;background-position:center;background-size:cover!important;color:#fff!important; }
.cover-fallback.bf7-cover-fallback span, .cover-fallback.bf7-cover-fallback small { color:#fff!important;overflow-wrap:anywhere; }
/* Filtering remains part of the normal document flow on small devices. */
.bf7-shop-top .bf7-shop-title-row h1 { font-size:clamp(28px,3.2vw,44px)!important;line-height:1.08;letter-spacing:-.035em; }
.bf7-shop-top .bf7-shop-title-row p { font-size:clamp(13px,1.15vw,16px)!important;line-height:1.65;max-width:70ch; }
.bf40-deals-filters { min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.bf40-deals-filters>* { min-width:0; }
.bf40-deals-filters input, .bf40-deals-filters select { min-width:0;width:100%;max-width:100%; }
.bf39-deals-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
/* Keyboard focus and input sizes are meaningful conversion/accessibility requirements. */
:where(.bf7-shop-layout,.bf39-cheap-books,.site-header,.bf66-home-hero) :where(a,button,input,select):focus-visible { outline:3px solid #e50045!important;outline-offset:3px; }
@media(max-width:1200px) {
 .bf7-shop-layout .catalog-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
 .bf39-deals-grid {grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media(max-width:900px) {
 .shop-layout.bf7-shop-layout {grid-template-columns:minmax(0,1fr);}
 .shop-layout.bf7-shop-layout>.filters {display:none;position:static;}
 .shop-layout.bf7-shop-layout>.filters.open {display:block;}
 .bf7-shop-layout .catalog-grid, .bf39-deals-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
 .bf40-deals-filters {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px) {
 .bf7-shop-layout .catalog-grid, .bf39-deals-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
 .bf7-shop-layout .catalog-grid>.product-card, .bf39-deals-grid>.product-card {width:100%;}
 .bf40-deals-filters {grid-template-columns:minmax(0,1fr);padding:14px;}
 .bf40-deals-filters .bf40-filter-actions {grid-column:auto;}
 .bf7-shop-layout .product-card .product-title, .bf39-deals-grid .product-title {font-size:12px!important;}
 .bf7-shop-layout .product-cover, .bf39-deals-grid .product-cover {height:clamp(170px,56vw,245px)!important;min-width:0;max-width:100%;}
 .bf7-shop-layout .product-price, .bf39-deals-grid .product-price {display:flex;flex-wrap:wrap;gap:4px 7px;}
 .bf39-deals-hero-grid {grid-template-columns:minmax(0,1fr);}
 .bf66-home-hero-actions {display:flex;flex-wrap:wrap;gap:10px;}
}
@media(prefers-reduced-motion:reduce) {
 .bf7-shop-layout *, .bf39-deals-grid *, .bf66-home-hero * {scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;}
}
