/* Book Buy Links — frontend styles. All rules are scoped under .bbl-root
   (and sibling .bbl-longdesc-wrap) so they cannot leak into the theme. */

.bbl-root,
.bbl-root *,
.bbl-longdesc-wrap,
.bbl-longdesc-wrap *,
.bbl-reviews-wrap,
.bbl-reviews-wrap * { box-sizing: border-box; }

.bbl-root {
	font-family: Archivo, system-ui, -apple-system, sans-serif;
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 44px;
	align-items: start;
	max-width: 1000px;
	color: #1c1e18;
}

.bbl-cov { position: relative; }
.bbl-cov img {
	width: 100%;
	border-radius: 4px;
	box-shadow: 0 26px 60px rgba(20, 22, 16, .22), 0 8px 16px rgba(20, 22, 16, .10);
	display: block;
}
.bbl-badge {
	position: absolute;
	top: -10px;
	left: -10px;
	background: #bd5b34;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	padding: 7px 12px;
	border-radius: 3px;
}

.bbl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bbl-root h2.bbl-title {
	font-weight: 800;
	font-size: 32px;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: #1c1e18;
	margin: 0 0 6px;
}
.bbl-sub {
	font-family: Spectral, Georgia, serif;
	font-style: italic;
	font-size: 18px;
	color: #7c7e72;
	margin: 0 0 10px;
}
.bbl-desc {
	font-family: Spectral, Georgia, serif;
	font-size: 18px;
	line-height: 1.65;
	color: #3f4334;
	margin: 0 0 22px;
	max-width: 54ch;
}

/* Buy panel */
.bbl-buy {
	background: #f8f6f0;
	border: 1px solid #e0dacb;
	border-radius: 14px;
	padding: 22px;
	box-shadow: 0 1px 3px rgba(28, 30, 24, .09);
}
.bbl-step {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #7c7e72;
	margin: 0 0 12px;
}
.bbl-step:not(:first-child) { margin-top: 20px; }

/* Pill button groups: country, language, format share one look */
.bbl-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.bbl-pill {
	cursor: pointer;
	font: 700 13px Archivo, sans-serif;
	letter-spacing: .04em;
	color: #3f4334;
	background: #fff;
	border: 1.5px solid #cfc8b4;
	border-radius: 9px;
	padding: 11px 18px;
}
.bbl-fmt { font-weight: 600; font-size: 14px; }
.bbl-pill:hover { border-color: #6e7359; }
.bbl-pill[aria-selected="true"] {
	background: #464a39;
	border-color: #464a39;
	color: #fff;
}
.bbl-pill:focus-visible,
.bbl-st:focus-visible {
	outline: 3px solid rgba(189, 91, 52, .55);
	outline-offset: 2px;
}

/* Country dropdown */
.bbl-country-wrap { margin-bottom: 4px; }
.bbl-country-select {
	width: 100%;
	max-width: 340px;
	font: 600 15px Archivo, sans-serif;
	color: #1c1e18;
	background: #fff;
	border: 1.5px solid #cfc8b4;
	border-radius: 9px;
	padding: 11px 38px 11px 16px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23bd5b34' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
}
.bbl-country-select:hover { border-color: #6e7359; }
.bbl-country-select:focus-visible {
	outline: 3px solid rgba(189, 91, 52, .55);
	outline-offset: 2px;
}

/* Stores grid */
.bbl-stores { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.bbl-st {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-decoration: none;
	font: 600 15px Archivo, sans-serif;
	color: #1c1e18;
	background: #fff;
	border: 1.5px solid #cfc8b4;
	border-radius: 10px;
	padding: 13px 16px;
}
.bbl-st:hover { border-color: #6e7359; }
.bbl-st .a { color: #bd5b34; }
.bbl-st.is-rec { background: #bd5b34; border-color: #bd5b34; color: #fff; }
.bbl-st.is-rec .a { color: #fff; }
.bbl-st.is-disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

.bbl-rec {
	position: absolute;
	top: -9px;
	right: 10px;
	background: #bd5b34;
	color: #fff;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 3px 7px;
	border-radius: 999px;
	line-height: 1;
	white-space: nowrap;
}
.bbl-st.is-rec .bbl-rec { background: #fff; color: #bd5b34; }

/* ISBN / EAN line under the buy buttons */
.bbl-isbn {
	margin: 14px 0 0;
	font: 600 12px Archivo, sans-serif;
	letter-spacing: .04em;
	color: #7c7e72;
}

/* Coming-soon and empty states */
.bbl-coming,
.bbl-empty {
	background: #fff;
	border: 1.5px solid #cfc8b4;
	border-radius: 10px;
	padding: 18px;
	font: 600 16px Archivo, sans-serif;
	color: #3f4334;
}
.bbl-coming span,
.bbl-empty span {
	display: block;
	font-family: Spectral, Georgia, serif;
	font-style: italic;
	font-weight: 400;
	font-size: 16px;
	color: #7c7e72;
	margin-top: 6px;
}

/* Long description — full-width block below the buy block */
.bbl-longdesc-wrap {
	max-width: 1000px;
	margin: 36px 0 0;
	padding-top: 28px;
	border-top: 1px solid #e0dacb;
}
.bbl-longdesc {
	font-family: Spectral, Georgia, serif;
	font-size: 18px;
	line-height: 1.65;
	color: #3f4334;
}
.bbl-longdesc p { margin: 0 0 1em; }
.bbl-longdesc :last-child { margin-bottom: 0; }
.bbl-longdesc a { color: #bd5b34; }

/* Reviews — "Praise for the book" -------------------------------------- */
.bbl-reviews-wrap { font-family: Archivo, system-ui, -apple-system, sans-serif; }
.bbl-praise {
	background: #2b2d26;
	color: #f4f1e8;
	border-radius: 16px;
	padding: 56px 40px;
}
.bbl-praise-inner { max-width: 1080px; margin: 0 auto; }
.bbl-reviews-eyebrow {
	font: 700 12px/1 Archivo, sans-serif;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #bd5b34;
	margin: 0 0 14px;
}
.bbl-reviews-title {
	font-family: Archivo, sans-serif;
	font-weight: 800;
	font-size: 34px;
	line-height: 1.05;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: #f4f1e8;
	margin: 0 0 30px;
}
.bbl-reviews {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
	align-items: flex-start;
}
.bbl-rev-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.bbl-reviews > .bbl-review { flex: 1 1 280px; } /* no-JS fallback */
.bbl-review {
	background: #34362e;
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 14px;
	padding: 24px 28px 22px;
	margin: 0;
}
.bbl-review-quote {
	font: 700 58px/1 Georgia, "Times New Roman", serif;
	color: #bd5b34;
	margin: -8px 0 0;
}
.bbl-review-stars { font-size: 14px; letter-spacing: 2px; line-height: 1; margin: 0 0 12px; }
.bbl-review-stars .bbl-stars-on { color: #bd5b34; }
.bbl-review-stars .bbl-stars-off { color: rgba(255, 255, 255, .18); }
.bbl-review-text {
	font-family: Spectral, Georgia, serif;
	font-style: italic;
	font-size: 17px;
	line-height: 1.6;
	color: #d7d5cb;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
	quotes: none;
}
.bbl-review-text p { margin: 0 0 .8em; }
.bbl-review-text :last-child { margin-bottom: 0; }
.bbl-review-author {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 4px;
}
.bbl-review-avatar {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(189, 91, 52, .65);
	background: #2b2d26;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bbl-review-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bbl-review-initials { font: 700 15px Archivo, sans-serif; letter-spacing: .02em; color: #f4f1e8; }
.bbl-review-by { font: 700 15px Archivo, sans-serif; color: #f4f1e8; margin: 0; }
.bbl-review-role {
	font-family: Spectral, Georgia, serif;
	font-style: italic;
	font-size: 13.5px;
	color: #a3a394;
	margin: 2px 0 0;
}

/* Collapsible long lists */
.bbl-reviews-clip { position: relative; }
.bbl-reviews-clip.is-collapsed { overflow: hidden; }
.bbl-reviews-fade {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 130px;
	pointer-events: none;
	background: linear-gradient(rgba(43, 45, 38, 0), #2b2d26);
}
.bbl-reviews-clip.is-collapsed .bbl-reviews-fade { display: block; }
.bbl-praise .bbl-reviews-more {
	display: none;
	margin: 20px auto 0;
	font: 700 13px Archivo, sans-serif;
	letter-spacing: .04em;
	color: #fff;
	background: #bd5b34;
	border: 1.5px solid #bd5b34;
	border-radius: 9px;
	padding: 11px 24px;
	cursor: pointer;
	text-decoration: none;
	text-transform: none;
}
.bbl-praise .bbl-reviews-more.is-shown { display: block; }
.bbl-praise .bbl-reviews-more:hover { background: #a54d2b; border-color: #a54d2b; color: #fff; }
.bbl-praise .bbl-reviews-more:focus-visible { outline: 3px solid rgba(189, 91, 52, .55); outline-offset: 2px; }

/* Light variant: [book_reviews ... theme="light"] */
.bbl-praise--light { background: #f8f6f0; color: #1c1e18; }
.bbl-praise--light .bbl-review { background: #fff; border-color: #e0dacb; box-shadow: 0 1px 3px rgba(28, 30, 24, .09); }
.bbl-praise--light .bbl-reviews-title { color: #1c1e18; }
.bbl-praise--light .bbl-review-text { color: #3f4334; }
.bbl-praise--light .bbl-review-by { color: #1c1e18; }
.bbl-praise--light .bbl-review-role { color: #7c7e72; }
.bbl-praise--light .bbl-review-avatar { background: #f8f6f0; }
.bbl-praise--light .bbl-review-initials { color: #1c1e18; }
.bbl-praise--light .bbl-review-stars .bbl-stars-off { color: #ddd6c6; }
.bbl-praise--light .bbl-reviews-fade { background: linear-gradient(rgba(248, 246, 240, 0), #f8f6f0); }

@media (max-width: 640px) {
	.bbl-praise { padding: 36px 22px; }
	.bbl-reviews-title { font-size: 26px; }
}

.bbl-error {
	font-family: Archivo, sans-serif;
	border: 1px dashed #bd5b34;
	color: #8a3f22;
	background: #fdf3ee;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
}

/* Tablet: keep two columns, slightly tighter gaps. */
@media (max-width: 980px) {
	.bbl-root { gap: 32px; grid-template-columns: 240px 1fr; }
}

/* Phone: single column, cover stacks above and centres. */
@media (max-width: 700px) {
	.bbl-root { grid-template-columns: 1fr; gap: 26px; }
	.bbl-cov { max-width: 240px; margin: 0 auto; }
	.bbl-stores { grid-template-columns: 1fr; }
	.bbl-root h2.bbl-title { font-size: 27px; }
}
