/* CoreEbooks card rhythm: original covers, palette and fonts, with a dedicated price row. */
.book-card.ce-card-v46{display:flex;flex-direction:column;min-width:0}
.book-card.ce-card-v46[hidden]{display:none}
.ce-card-v46 .ce-card-copy{margin-top:7px;margin-bottom:9px;min-width:0}
.ce-card-v46 .book-card__title{display:block;max-width:100%;min-height:0;overflow-wrap:anywhere}
.ce-card-v46 .book-card__subtitle{margin-top:4px;min-height:0;font-size:12px;line-height:1.5;color:#6b8076}
.ce-card-v46 .ce-card-pricing{display:flex;align-items:center;justify-content:flex-start;gap:6px 8px;flex-wrap:wrap;margin-top:0;padding-top:0;border-top:0;min-height:0}
.ce-card-v46 .ce-card-price-main{display:flex;flex-wrap:nowrap;gap:6px;align-items:baseline;min-width:0;white-space:nowrap}
.ce-card-v46 .book-card__price{font-size:18px;font-weight:800;letter-spacing:-.45px;line-height:1.2;color:#126d51}
.ce-card-v46 .ce-card-original{font-family:'Manrope',sans-serif;font-size:12px;font-weight:500;line-height:1.3;color:#809086;white-space:nowrap}
.ce-card-v46 .ce-card-currency{display:inline;flex-basis:auto;font-size:11px;letter-spacing:.2px;font-weight:600;color:#788d80;line-height:1.7}
.ce-card-v46 .ce-card-offer{display:inline-flex;flex-direction:row;align-items:center;gap:6px;margin-left:0;max-width:100%;text-align:left}
.ce-card-v46 .ce-card-discount{display:inline-block;padding:4px 6px;border:1px solid #d2e7da;border-radius:5px;background:#eaf4ed;color:#24674a;font-family:'Manrope',sans-serif;font-size:12px;line-height:1.2;letter-spacing:.2px;font-weight:800;white-space:nowrap}
.ce-card-v46 .ce-card-offer small{font-size:12px;line-height:1.35;font-weight:500;color:#617b6b;max-width:120px}
.ce-card-v46 .ce-card-bulk-note{margin:7px 0 0;font-size:12px;color:#617b6b;line-height:1.4}
@media(max-width:550px){.ce-card-v46 .ce-card-copy{margin-top:6px;margin-bottom:8px}.ce-card-v46 .book-card__title{font-size:12px;line-height:1.4;min-height:0}.ce-card-v46 .book-card__subtitle{font-size:11px;line-height:1.5}.ce-card-v46 .ce-card-pricing{gap:8px;padding-top:0;min-height:0;align-items:flex-start}.ce-card-v46 .book-card__price{font-size:16px}.ce-card-v46 .ce-card-original{font-size:12px}.ce-card-v46 .ce-card-offer{align-items:flex-start;text-align:left;margin-left:0}.ce-card-v46 .ce-card-offer small{max-width:none}.ce-card-v46 .ce-card-discount{font-size:12px;padding:4px 6px}}

/* The favorite stays a separate button above the cover link, never inside it.
   Specificity overrides the older full-cover grid without cropping the artwork. */
.book-card.ce-card-v46[data-book-card] > .book-card__visual{position:relative!important;display:block!important}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn{position:absolute!important;top:8px!important;right:8px!important;bottom:auto!important;left:auto!important;z-index:5;width:36px;height:36px;margin:0!important;cursor:pointer}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn:focus-visible{outline:3px solid #156f52;outline-offset:3px;box-shadow:0 0 0 3px #fff}
/* Compact visible mobile heart, while the separate button retains a 44px touch target. */
@media(max-width:650px){
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn{width:44px;height:44px;top:0!important;right:0!important;background:transparent!important;border:0;box-shadow:none}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn::before{content:"";position:absolute;inset:0;margin:auto;width:28px;height:28px;border:1px solid #d9e5de;border-radius:7px;background:#fffffff2;box-shadow:0 2px 7px #133a3210;pointer-events:none;z-index:0}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn svg{position:relative;z-index:1;width:14px;height:14px;pointer-events:none}
.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn:hover::before,.book-card.ce-card-v46[data-book-card] > .book-card__visual > .wishlist-btn[aria-pressed=true]::before{background:#156f52;border-color:#156f52}
}

.ce-card-v46 .ce-card-details{min-width:0;margin-bottom:10px}
.ce-card-v46 .ce-card-actions{margin-top:auto;padding-top:0;padding-bottom:12px;border-top:0;border-bottom:1px solid #dbe6df}
.ce-card-v46 .ce-card-add{width:100%;min-height:44px;padding:10px 12px;font-size:11px;letter-spacing:.4px;justify-content:center}
.ce-card-v46 .ce-card-add:focus-visible{outline:3px solid #156f52;outline-offset:3px}

/* Keep each price, currency and saving together. Conditional bulk terms remain explicit. */
.book-card.ce-card-v47 .ce-card-actions{padding-top:0;padding-bottom:0;border-top:0;border-bottom:0}
.ce-card-v47 .ce-card-offer--bulk{flex-basis:100%;flex-wrap:wrap}
.ce-card-v47 .ce-card-offer--bulk small{max-width:none}
.catalog-products:has(>.ce-card-v47),.featured-grid:has(>.ce-card-v47),.book-grid:has(>.ce-card-v47){grid-template-columns:repeat(4,minmax(0,1fr));row-gap:26px;padding-bottom:13px}
.ce-card-grid{position:relative}
.book-card.ce-card-v47{position:relative}
.book-card.ce-card-v47[data-ce-row-start]::after{content:"";position:absolute;left:0;bottom:-13px;width:var(--ce-card-grid-width,100%);height:1px;background:#dbe6df;pointer-events:none}
@media(max-width:950px){.catalog-products:has(>.ce-card-v47),.featured-grid:has(>.ce-card-v47),.book-grid:has(>.ce-card-v47){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.catalog-products:has(>.ce-card-v47),.featured-grid:has(>.ce-card-v47),.book-grid:has(>.ce-card-v47){grid-template-columns:repeat(2,minmax(0,1fr))}.book-card.ce-card-v47 .ce-card-offer{align-items:center}.book-card.ce-card-v47 .ce-card-currency{font-size:11px}}

/* Home book rows only. Shop, categories, favorites and related books keep
   their existing grid. The 3/2-column tablet/mobile rules remain unchanged. */
@media(min-width:951px){
  .home-section > .featured-grid:has(>.ce-card-v47){grid-template-columns:repeat(5,minmax(0,1fr))}
  .home-section > .featured-grid > .book-card.ce-card-v47:nth-child(5){display:flex}
}
