/* Shared hierarchy; layout selection only changes the overview arrangement. */
body.fbp{background-color:var(--fbp-bg,#f0f1f3)}
.fbp-book-detail-top-card,.fbp-book-info-card,.fbp-book-reviews-card,.fbp-post-community,.fbp-shelf-card,.fbp-product-shelf{box-sizing:border-box;background:#fff;color:var(--fbp-ink,#25272c);border:1px solid var(--fbp-border,#dedfe3);border-radius:10px;margin:20px 0;padding:22px;min-width:0;max-width:100%}
.fbp-book-detail-top-card{display:grid;grid-template-columns:minmax(130px,230px) minmax(0,1fr);gap:30px;align-items:start;clear:both}
body.fbp .fbp-book-detail-top-card>.woocommerce-product-gallery,body.fbp .fbp-book-detail-top-card>.summary{width:100%!important;float:none!important;margin:0!important;min-width:0}
body.fbp .fbp-book-detail-top-card .product_title{font-size:28px!important;line-height:1.25!important;margin:0 0 8px!important;overflow-wrap:anywhere}
.fbp-commerce-amazon .fbp-book-detail-top-card{grid-template-columns:170px minmax(0,1fr)}
.fbp-commerce-barnes-noble .fbp-book-detail-top-card,.fbp-commerce-publisher .fbp-book-detail-top-card{grid-template-columns:260px minmax(0,1fr)}
.fbp-commerce-classic .fbp-book-detail-top-card{border-radius:0;border-top:4px double var(--fbp-border,#ddd)}
.fbp-commerce-author .fbp-book-detail-top-card{grid-template-columns:180px minmax(0,1fr)}
.fbp-book-detail-bottom{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;margin:20px 0;clear:both}
.fbp-book-detail-bottom .fbp-book-info-card{margin:0;padding:0;overflow:hidden}
.fbp-book-detail-bottom .fbp-book-info-card:first-child{grid-row:span 2}
.fbp-commerce-anchovy .fbp-book-detail-bottom,.fbp-commerce-classic .fbp-book-detail-bottom{display:block}
.fbp-commerce-anchovy .fbp-book-info-card,.fbp-commerce-classic .fbp-book-info-card{margin-bottom:18px}
body.fbp h2.fbp-detail-section-bar{font:600 18px/1.4 var(--fbp-heading-font,Georgia,serif)!important;background:#f0f1f3;color:var(--fbp-ink,#25272c);margin:0!important;padding:12px 20px!important;border-bottom:1px solid var(--fbp-border,#ddd)}
.fbp-detail-section-body{padding:20px;overflow-wrap:anywhere}.fbp-book-reviews-card,.fbp-post-community{padding:0;overflow:hidden}
.fbp-product-author{display:flex;gap:16px;align-items:start}.fbp-product-author img{max-width:80px;height:auto}.fbp-product-author h3{font-size:17px!important;line-height:1.4!important}
.fbp-book-detail-bottom .fbp-reader-product-attributes{font-size:14px}.fbp-reader-product-attributes>div{display:grid;grid-template-columns:minmax(90px,1fr) 2fr;gap:10px;margin:8px 0}.fbp-reader-product-attributes dd{margin:0}
.fbp-library-status{font:400 12px/1.5 Arial,sans-serif;margin:14px 0 0!important;padding:7px 10px;background:#f4f4f6;border-radius:5px;min-height:0}.fbp-library-status:empty{display:none}
.fbp-free-pill{display:inline-block;border-radius:20px;padding:4px 10px;background:color-mix(in srgb,var(--fbp-brand,#a72e37) 10%,white);color:var(--fbp-brand,#a72e37);font:600 11px/1.4 Arial,sans-serif}
.fbp-market-actions{gap:8px!important;display:flex;flex-wrap:wrap;margin-top:12px!important}.fbp-market-actions form{margin:0}.fbp-market-actions .button,.fbp-market-actions button{width:auto!important;font:600 12px/1.3 Arial,sans-serif!important;padding:9px 11px!important;min-height:34px!important}
.fbp-market-price{margin:12px 0 10px!important}.fbp-market-book h3{font:600 14px/1.35 Arial,sans-serif!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.fbp-product-shelf>header h2,.fbp-format-row>header h2{font-family:var(--fbp-shelf-heading-font,Georgia,serif)!important;font-size:var(--fbp-shelf-heading-size,21px)!important;font-weight:var(--fbp-shelf-heading-weight,600)!important;line-height:1.3!important;margin:0!important}
.fbp-format-row>header{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:16px}.fbp-format-row>header>a{margin-left:auto;font-size:13px}
.fbp-story-shelf-arrows{display:flex;gap:6px}.fbp-story-shelf-arrows button{min-width:34px;min-height:34px;padding:6px;border:1px solid var(--fbp-border,#ddd);background:#fff;color:var(--fbp-ink,#222);border-radius:6px}.fbp-story-shelf-arrows svg{width:16px;height:16px}
.fbp-format-scroll{display:flex;gap:18px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:8px}.fbp-format-scroll>.fbp-story-tile{flex:0 0 160px!important;scroll-snap-align:start}
.fbp-story-row .fbp-story-cover{padding:0}.fbp-story-row .fbp-story-cover img{aspect-ratio:2/3;width:100%;object-fit:contain}.fbp-story-row .fbp-story-tile{border:0!important;background:transparent!important}.fbp-story-row .fbp-story-tile-body{padding:10px 0}
.fbp-story-row .fbp-story-tile h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.fbp-story-title-hidden .fbp-story-title,.fbp-story-title-hidden .fbp-story-card-subtitle{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(50%);overflow:hidden}
.fbp-story-library>h2{font-weight:700!important}.fbp-story-library>p{margin-bottom:24px}.fbp-story-category>header{background:#fff;border:1px solid var(--fbp-border,#ddd);border-radius:10px;padding:24px;margin-bottom:24px}
.fbp-review-detail-page{max-width:1120px;margin:30px auto;padding:0 18px}.fbp-review-detail-page h1{font-size:28px!important}.fbp-review-detail-page h2{font-size:21px!important}.fbp-review-detail-page h3{font-size:17px!important}.fbp-review-detail-page .fbp-review-page{border:0;padding:0}
.fbp-book-reviews-card #reviews{display:flex;flex-direction:column}.fbp-book-reviews-card #review_form_wrapper{order:-1;border:1px solid var(--fbp-border,#ddd);border-radius:8px;padding:18px;margin:0 0 24px!important;background:#fff}
.fbp-book-reviews-card #comments{order:1}.fbp-book-reviews-card .woocommerce-Reviews-title{font-size:20px!important}.fbp-book-reviews-card .commentlist{padding:0!important;list-style:none}.fbp-book-reviews-card .commentlist>li{border-top:1px solid var(--fbp-border,#ddd);padding:18px 0!important}
.fbp-book-reviews-card .comment-text{margin-left:0!important;border:0!important}.fbp-book-reviews-card textarea,.fbp-post-community textarea{box-sizing:border-box;width:100%;max-width:100%}
.fbp-review-stars{display:flex;gap:4px;margin:8px 0}.fbp-review-stars button{font-size:27px!important;line-height:1.2!important;min-width:36px;min-height:36px;background:transparent!important;border:0!important;color:var(--fbp-brand,#a72e37)!important;padding:3px!important}
.fbp-rating-select{position:absolute!important;clip-path:inset(50%);height:1px!important;width:1px!important}.fbp-story-review-form{background:#fff;padding:18px;border:1px solid var(--fbp-border,#ddd);border-radius:8px;margin:18px 0}.fbp-story-review-list>div{padding:18px 0;border-top:1px solid var(--fbp-border,#ddd)}
.fbp-reader-detail-shell .fbp-book-info-card,.fbp-reader-detail-shell .fbp-post-community,.fbp-reader-detail-shell .fbp-product-shelf{color:var(--fbp-ink,#25272c)}
@media(max-width:700px){body.fbp .fbp-book-detail-top-card{grid-template-columns:100px minmax(0,1fr)!important;gap:16px;padding:16px}.fbp-book-detail-top-card .summary .product_title{font-size:21px!important}body.fbp .fbp-book-detail-top-card .product_title{font-size:21px!important}.fbp-book-detail-bottom{display:block}.fbp-book-detail-bottom .fbp-book-info-card{margin-bottom:16px}.fbp-detail-section-body{padding:16px}.fbp-product-shelf,.fbp-shelf-card{padding:16px}.fbp-format-scroll>.fbp-story-tile{flex-basis:125px!important}.fbp-product-author{flex-wrap:wrap}.fbp-reader-product-attributes>div{grid-template-columns:1fr 1.5fr}.fbp-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:360px){body.fbp .fbp-book-detail-top-card{grid-template-columns:84px minmax(0,1fr)!important;gap:12px}.fbp-book-detail-top-card .summary .button{font-size:12px!important;padding:10px!important}}
@media(pointer:coarse){.fbp-market-actions .button,.fbp-market-actions button,.fbp-story-tile .button,.fbp-review-stars button,.fbp-story-shelf-arrows button{min-height:44px!important}}

/* 0.14.1: the outer product is a vertical stack, only the overview is a grid.
   This overrides legacy product-detail.css and every selected commerce layout. */
body.fbp.single-product.fbp-shared-book-details .woocommerce div.product,
body.fbp.single-product.fbp-shared-book-details div.product.type-product{
 display:block!important;grid-template-columns:none!important;gap:0!important;
 width:100%!important;max-width:1180px!important;box-sizing:border-box;
}
body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-top-card{
 display:grid!important;grid-template-columns:minmax(180px,280px) minmax(0,1fr)!important;
 gap:32px!important;width:100%!important;max-width:100%!important;float:none!important;
}
body.fbp.single-product.fbp-shared-book-details .fbp-book-detail-top-card>.summary,
body.fbp.single-product.fbp-shared-book-details .fbp-book-detail-top-card>.woocommerce-product-gallery{
 width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;margin:0!important;grid-column:auto!important;
}
body.fbp.single-product.fbp-shared-book-details .fbp-book-detail-top-card>.summary{
 overflow-wrap:break-word;word-break:normal!important;
}
body.fbp.single-product.fbp-shared-book-details .fbp-book-detail-top-card>.summary .product_title{
 word-break:normal!important;overflow-wrap:break-word!important;
}
body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-bottom,
body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-reviews-card,
body.fbp.single-product.fbp-shared-book-details div.product>.fbp-product-shelf{
 clear:both!important;float:none!important;width:100%!important;max-width:100%!important;grid-column:1/-1!important;
}
body.fbp.single-product.fbp-shared-book-details .fbp-compact-book-details{
 display:grid!important;grid-template-columns:minmax(70px,120px) minmax(0,1fr)!important;
 gap:10px 16px!important;min-width:0!important;width:100%!important;
}
body.fbp.single-product.fbp-shared-book-details .fbp-compact-book-details dd{
 min-width:0!important;margin:0!important;word-break:normal!important;overflow-wrap:break-word!important;
}
@media(max-width:700px){
 body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-top-card{
 grid-template-columns:minmax(84px,30%) minmax(0,1fr)!important;gap:16px!important;padding:16px!important;
 }
 body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-bottom{display:block!important;}
}

/* 0.14.2: reserve the mobile cover column only for the identity row.
   Purchase forms and reader controls are moved neither cloned nor replaced. */
.fbp-book-mobile-identity{display:contents}
@media(max-width:700px){
 body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-top-card{
  display:block!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-book-detail-top-card>.woocommerce-product-gallery{
  max-width:180px!important;margin:0 auto 20px!important;
 }
 body.fbp.single-product.fbp-shared-book-details div.product>.fbp-book-detail-top-card.fbp-has-mobile-identity{
  display:grid!important;grid-template-columns:minmax(84px,28%) minmax(0,1fr)!important;
  gap:20px 16px!important;align-items:start!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-has-mobile-identity>.summary{
  display:contents!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-has-mobile-identity>.woocommerce-product-gallery{
  grid-column:1!important;grid-row:1!important;max-width:100%!important;margin:0!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-has-mobile-identity>.summary>.fbp-book-mobile-identity{
  display:block!important;grid-column:2!important;grid-row:1!important;min-width:0!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-has-mobile-identity>.summary>:not(.fbp-book-mobile-identity){
  grid-column:1/-1!important;grid-row:auto!important;width:100%!important;max-width:100%!important;
  min-width:0!important;box-sizing:border-box!important;margin-left:0!important;margin-right:0!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-book-mobile-identity .product_title{
  font-size:22px!important;line-height:1.25!important;margin:8px 0!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-book-mobile-identity .woocommerce-breadcrumb{
  font-size:12px!important;line-height:1.45!important;word-break:normal!important;
 }
 body.fbp.single-product.fbp-shared-book-details .fbp-book-mobile-identity .fbp-product-byline{
  font-size:14px!important;line-height:1.5!important;
 }
 body.fbp.single-product.fbp-shared-book-details .woocommerce-product-details__short-description{
  font-size:16px!important;line-height:1.65!important;
 }
 body.fbp.single-product.fbp-shared-book-details .summary :is(.fbp-purchased-book,.fbp-product-wishlist,.fbp-reader-promotion){
  max-width:100%!important;width:100%!important;box-sizing:border-box!important;
 }
}

/* 0.14.3: compact books only within Reader, preserving website book layouts. */
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-hero{
 display:grid!important;grid-template-columns:minmax(100px,180px) minmax(0,1fr)!important;gap:24px!important;align-items:start!important;
}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-cover{width:100%!important;max-width:180px!important;margin:0!important;min-width:0}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-cover img{width:100%!important;max-height:270px!important;height:auto!important;object-fit:contain}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-info{min-width:0!important;width:100%!important}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-info h2{font-size:25px!important;line-height:1.25!important}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-edition-summary{display:block!important}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-purchase-card{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-purchase-card>p{flex-basis:100%}
[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-purchase-card button,[data-reader-dialog] .fbp-reader-compact-book .fbp-reader-purchase-card a{font-size:14px!important;padding:10px 12px!important;min-height:44px!important}
[data-reader-dialog] .fbp-reader-compact-book .fbp-book-detail-bottom{display:block!important}
.fbp-series-member-cards{display:none}.fbp-series-member-card{display:grid;grid-template-columns:70px minmax(0,1fr);gap:16px;padding:16px;border:1px solid #ddd;border-radius:8px;background:#fff;color:#25272c;min-width:0}
.fbp-series-member-cover{display:block!important;width:70px!important;min-width:0!important;max-width:70px!important;background:transparent!important;overflow:hidden}
.fbp-series-member-cover img{display:block!important;width:70px!important;max-width:70px!important;height:auto!important;max-height:110px!important;object-fit:contain}
.fbp-series-member-cover :is(div,span){max-width:70px!important;background:transparent!important}
.fbp-series-member-info{min-width:0}.fbp-series-member-info h3{font-size:18px!important;line-height:1.3!important;margin:0 0 6px!important}.fbp-series-member-info p{font-size:14px!important;line-height:1.5!important;margin:6px 0!important}.fbp-series-member-action .button{font-size:14px!important;padding:10px 14px!important;min-height:44px}
[data-reader-dialog] .fbp-reader-series .fbp-series-member-cards{display:grid;gap:14px}[data-reader-dialog] .fbp-reader-series .fbp-series-desktop-table{display:none}
[data-reader-dialog] .fbp-series-heading{display:grid!important;grid-template-columns:minmax(90px,160px) minmax(0,1fr)!important;gap:20px!important;align-items:start!important}
[data-reader-dialog] .fbp-series-heading .fbp-series-cover{width:100%!important;max-width:160px!important}
[data-reader-dialog] .fbp-series-cover img{width:100%!important;height:auto!important;max-height:240px!important;object-fit:contain}
.fbp-series-about{margin:24px 0}.fbp-series-info{min-width:0}.fbp-series-info h1{overflow-wrap:break-word}
.fbp-story-details-page .post_header_wrap{display:none!important}
.fbp-product-sample-under-cover .button{font-size:14px!important;line-height:1.2!important;padding:10px 8px!important;min-height:40px!important;white-space:nowrap!important;letter-spacing:0!important}
@media(max-width:700px){
 [data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-hero{grid-template-columns:minmax(84px,30%) minmax(0,1fr)!important;gap:16px!important;padding:16px!important}
 [data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-info h2{font-size:21px!important}
 [data-reader-dialog] .fbp-reader-compact-book .fbp-reader-detail-cover img{max-height:200px!important}
 .fbp-series-details .fbp-series-heading{display:grid!important;grid-template-columns:minmax(84px,30%) minmax(0,1fr)!important;gap:16px!important;align-items:start!important}
 .fbp-series-details .fbp-series-cover{max-width:130px!important;width:100%!important;margin:0!important}
 .fbp-series-details .fbp-series-cover img{width:100%!important;height:auto!important;max-height:200px!important;object-fit:contain}
 .fbp-series-details .fbp-series-info h1{font-size:23px!important;line-height:1.3!important;margin:8px 0!important}
 .fbp-series-details .fbp-series-member-cards{display:grid!important;gap:14px!important}.fbp-series-details .fbp-series-desktop-table{display:none!important}
 [data-reader-dialog] :is(.fbp-reader-market-grid,.fbp-product-grid,.fbp-product-scroll,.fbp-library-grid,.fbp-format-grid){
 display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;scroll-snap-type:x proximity;gap:14px!important;padding-bottom:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;
 }
 [data-reader-dialog] :is(.fbp-reader-market-grid,.fbp-product-grid,.fbp-product-scroll,.fbp-library-grid,.fbp-format-grid)>article{
 flex:0 0 160px!important;width:160px!important;min-width:160px!important;max-width:160px!important;scroll-snap-align:start;box-sizing:border-box!important;
 }
}
