/* BooksFirst v10.96 — targeted editorial shelves, product card, and book-detail polish.
 * Loaded AFTER existing styles. Does not replace navigation, hero, footer, checkout,
 * promo logic, admin layout, or the v93 bundled-products treatment. */
:root{--bf96-ink:#122344;--bf96-muted:#6c7689;--bf96-red:#d60032;--bf96-surface:#f4f3f0}
/* Shelves: clean image-led card gallery inspired by the reference, preserving BooksFirst's own palette. */
.page-home .bf96-first-books{padding-top:25px!important;}
.bf9-shelf .bf9-shelf-head{align-items:center;}
.bf9-shelf .bf96-shelf-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex:0 0 auto;}
.bf9-shelf .bf96-shelf-arrow{display:grid;place-items:center;width:37px;height:37px;padding:0;border:1px solid #dce1e9;border-radius:50%;background:#fff;color:var(--bf96-ink);font-size:27px;line-height:1;cursor:pointer;transition:background .18s,border-color .18s,opacity .18s;}
.bf9-shelf .bf96-shelf-arrow:not(:disabled):hover{background:var(--bf96-ink);border-color:var(--bf96-ink);color:white;}
.bf9-shelf .bf96-shelf-arrow:disabled{opacity:.35;cursor:not-allowed;}
.bf9-shelf .bf96-shelf-actions .bf9-view-all{margin-left:8px;white-space:nowrap;}
.bf9-shelf .bf9-product-row{grid-auto-columns:clamp(206px,21.8vw,270px)!important;gap:12px!important;padding:2px 2px 14px!important;scrollbar-width:thin;scrollbar-color:#d8dce3 transparent;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;}
/* Shared product cards retain functional quick-view, wishlist, cart form and badges. */
.product-card.bf96-product-card{min-width:0;border-radius:14px;transform:none!important;perspective:none;box-shadow:none!important;}
.product-card.bf96-product-card:before{display:none;}
.product-card.bf96-product-card .product-cover,
.bf9-product-row .product-card.bf96-product-card .product-cover{height:clamp(236px,23.5vw,298px)!important;display:grid;place-items:center;background:linear-gradient(155deg,#e7e6e1 0%,#f8f7f4 100%)!important;padding:19px!important;border-radius:12px!important;overflow:hidden;transition:background .2s ease;}
.product-card.bf96-product-card .product-cover img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 10px rgba(26,36,48,.17));transition:transform .24s ease;}
.product-card.bf96-product-card:hover .product-cover img{transform:scale(1.035);}
.product-card.bf96-product-card .product-badges{left:10px;right:10px;top:10px;}
.product-card.bf96-product-card .condition-badge,
.product-card.bf96-product-card .stock-badge{font-size:9px;letter-spacing:0;text-transform:none;border-radius:99px;padding:5px 9px;background:#ffffffdf;color:#344256;border:1px solid #ffffffa1;box-shadow:none;}
.product-card.bf96-product-card .stock-badge.sale{color:#b00030;background:#fff0f4;}
.product-card.bf96-product-card .cover-fallback{width:78%;height:83%;border-radius:8px;overflow:hidden;box-shadow:0 12px 24px #16264923;}
.product-card.bf96-product-card .product-content,
.bf9-product-row .product-card.bf96-product-card .product-content{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'title title' 'author author' 'meta meta' 'offer offer' 'price actions';column-gap:8px;align-items:center;min-height:145px;padding:11px 2px 5px!important;}
.product-card.bf96-product-card .product-title,
.bf9-product-row .product-card.bf96-product-card .product-title{grid-area:title;margin:0;min-height:34px!important;font-size:11px!important;font-weight:800!important;line-height:1.4!important;color:var(--bf96-ink);}
.product-card.bf96-product-card .product-author,
.bf9-product-row .product-card.bf96-product-card .product-author{grid-area:author;display:block;min-height:16px;margin:2px 0!important;font-size:9px!important;color:var(--bf96-muted);}
.product-card.bf96-product-card .product-meta-row,
.bf9-product-row .product-card.bf96-product-card .product-meta-row{grid-area:meta;display:flex;align-items:center;margin:3px 0 7px!important;font-size:9px!important;color:#556273;}
.product-card.bf96-product-card .product-meta-row:before{content:'';flex:0 0 auto;width:7px;height:7px;background:#da0032;border:2px solid #fff;box-shadow:0 0 0 1px #e9d5da;border-radius:50%;}
.product-card.bf96-product-card .product-price{grid-area:price;align-self:end;min-width:0;min-height:34px;display:flex;flex-direction:column;justify-content:end;align-items:flex-start;gap:1px;}
.product-card.bf96-product-card .product-price strong,
.bf9-product-row .product-card.bf96-product-card .product-price strong{font-size:13px!important;line-height:1.3;font-weight:900;color:#111e35;white-space:nowrap;}
.product-card.bf96-product-card .product-price del{font-size:9px!important;}
.product-card.bf96-product-card .bf10-deal-saving{grid-area:offer;display:block;margin:0 0 5px;font-size:8px;color:#b51a37;}
.product-card.bf96-product-card .bf93-buy-actions{grid-area:actions;display:block!important;width:auto!important;max-width:max-content;min-width:0;margin:0!important;align-self:end;}
.product-card.bf96-product-card .bf93-buy-actions .quick-add{display:block;width:auto;margin:0!important;}
.product-card.bf96-product-card .bf93-buy-actions .quick-add button,
.page-home .product-card.bf96-product-card .bf93-buy-actions .quick-add button,
.bf9-product-row .product-card.bf96-product-card .bf93-buy-actions .quick-add button{height:34px!important;min-height:34px!important;min-width:76px!important;width:auto!important;border:1px solid var(--bf96-red)!important;border-radius:999px!important;background:var(--bf96-red)!important;color:#fff!important;padding:4px 10px!important;font-size:10px!important;white-space:nowrap;box-shadow:none!important;}
.product-card.bf96-product-card .bf93-buy-actions .quick-add button:hover{background:#a90029!important;border-color:#a90029!important;}
.product-card.bf96-product-card .bf93-buy-actions .quick-add button svg{display:none;}
/* Move the existing quick-view action on to the photo; don't hide or disable it. */
.product-card.bf96-product-card .bf93-buy-actions .bf61-quick-view{position:absolute;z-index:4;right:9px;top:clamp(197px,19.9vw,260px);height:27px;min-height:27px;width:auto;min-width:0;display:block;margin:0;padding:4px 9px;font-size:9px;font-weight:800;background:#fff;color:var(--bf96-ink);border:1px solid #dedee4;border-radius:999px;box-shadow:0 2px 10px #0001;}
/* Book detail page: polished but unchanged grid, actions and checkout semantics. */
.bf7-product-page .bf11-product-main-image{background:linear-gradient(155deg,#ecebe6,#f9f8f6);border-radius:18px;overflow:hidden;}
.bf7-product-page .bf11-product-main-image img{object-fit:contain;max-width:100%;}
.bf7-product-page .product-info h1{letter-spacing:-.045em;line-height:1.13;color:var(--bf96-ink);}
.bf7-product-page .bf7-purchase-card{border:1px solid #e4e6ea;border-radius:17px;box-shadow:0 12px 34px #14254a0b;}
.bf7-product-page .product-add-form button[type=submit],.bf42-mobile-sticky-atc button[type=submit]{background:var(--bf96-red)!important;color:#fff!important;border-color:var(--bf96-red)!important;border-radius:11px;}
.bf7-product-page .product-add-form button[type=submit]:hover,.bf42-mobile-sticky-atc button[type=submit]:hover{background:#ac002a!important;}
/* Admin diagnostic is a text card using existing admin styles; no admin CSS replacement. */
.bf96-catalogue-help{padding:17px 20px;margin:0 0 15px;border-left:3px solid #c90832;}
.bf96-catalogue-help b{color:#162345;font-size:13px;}
.bf96-catalogue-help p{margin:9px 0 0;max-width:1040px;font-size:11px;line-height:1.65;color:#4a5363;}
.bf96-catalogue-help a{text-decoration:underline;}
@media(max-width:900px){
  .bf9-shelf .bf9-product-row{grid-auto-columns:clamp(190px,32vw,240px)!important;}
  .product-card.bf96-product-card .product-cover,.bf9-product-row .product-card.bf96-product-card .product-cover{height:230px!important;}
  .product-card.bf96-product-card .bf93-buy-actions .bf61-quick-view{top:194px;}
}
@media(max-width:600px){
  .bf9-shelf .bf9-shelf-head{align-items:flex-start;gap:8px;}
  .bf9-shelf .bf96-shelf-actions{gap:5px;}
  .bf9-shelf .bf96-shelf-arrow{width:30px;height:30px;font-size:22px;}
  .bf9-shelf .bf96-shelf-actions .bf9-view-all{margin-left:3px;font-size:9px;}
  .bf9-shelf .bf9-product-row{grid-auto-columns:minmax(174px,67vw)!important;gap:11px!important;margin-right:-12px!important;padding-right:12px!important;}
  .product-card.bf96-product-card .product-cover,.bf9-product-row .product-card.bf96-product-card .product-cover{height:210px!important;padding:13px!important;}
  .product-card.bf96-product-card .bf93-buy-actions .bf61-quick-view{top:174px;}
  .product-card.bf96-product-card .product-content,.bf9-product-row .product-card.bf96-product-card .product-content{min-height:144px;padding:10px 2px 4px!important;}
  .product-card.bf96-product-card .product-title,.bf9-product-row .product-card.bf96-product-card .product-title{font-size:10.5px!important;}
  .product-card.bf96-product-card .product-price strong,.bf9-product-row .product-card.bf96-product-card .product-price strong{font-size:12px!important;}
  .product-card.bf96-product-card .bf93-buy-actions .quick-add button{font-size:9px!important;min-width:68px!important;}
}
@media(prefers-reduced-motion:reduce){.bf9-shelf .bf9-product-row{scroll-behavior:auto!important;}.product-card.bf96-product-card .product-cover img{transition:none;}}
