/*
 * Product page (PDP): Figma "Baraka Website" → 04_PDP. Built by Nabil Mohed
 * (PR #5) in the WoodMart child theme; moved into the Baraka theme. Loaded on
 * product pages only (inc/pdp.php); scoped to .bd-pdp. Jost comes from home.css.
 * Uses logical properties (inline-start/end) so Arabic (RTL) mirrors itself.
 */


/* ---------------------------------------------------------------- tokens */

.bd-pdp {
	--bd-white: #fff;
	--bd-cream: #faf6f3;        /* grey/97   Vista White  */
	--bd-sand: #f5ede7;         /* grey/93   Dawn Pink    */
	--bd-sand-2: #eaddd3;       /* orange/87                */
	--bd-line: #ede2da;         /* orange/89 Bizarre      */
	--bd-line-strong: #e3d4c8;  /* orange/84 Dust Storm   */
	--bd-khaki: #c3a492;        /* orange/67 Indian Khaki */
	--bd-muted: #a18a7c;        /* orange/56 Pharlap      */
	--bd-soft: #8a756a;         /* orange/48 Americano    */
	--bd-body: #6b584e;         /* orange/36 Pine Cone    */
	--bd-brand: #775c50;        /* orange/39 Roman Coffee */
	--bd-ink: #4a3a32;          /* orange/24 Taupe        */
	--bd-sale: #c0642a;         /* orange/46 Tuscany      */
	--bd-ok: #4c8c4a;           /* green/42               */
	--bd-alert: #a8442f;        /* red/42                 */
	--bd-alert-bg: #f7e7e3;
	--bd-alert-line: #e8c3b8;

	--bd-font: "Jost", "Futura", "ge-ss-two-normal", system-ui, sans-serif;
	--bd-pill: 999px;
	--bd-gutter: 100px;

	font-family: var(--bd-font);
	color: var(--bd-ink);
	background: var(--bd-white);
}

/* Arabic: Jost has no Arabic letters, keep the site's Arabic face first. */
html[lang^="ar"] .bd-pdp,
.rtl .bd-pdp {
	--bd-font: "ge-ss-two-normal", "Jost", system-ui, sans-serif;
}

.bd-pdp *,
.bd-pdp *::before,
.bd-pdp *::after {
	box-sizing: border-box;
}

.bd-pdp__wrap {
	max-width: calc(1240px + 2 * var(--bd-gutter));
	margin-inline: auto;
	padding-inline: var(--bd-gutter);
}

/* ------------------------------------------------------------- shared bits */

.bd-pdp__label {
	margin: 0 0 10px;
	font-family: var(--bd-font);
	font-size: 11px;
	font-weight: 400 !important;
	line-height: 1;
	letter-spacing: 1.76px;
	text-transform: uppercase;
	color: var(--bd-muted);
}
.bd-pdp__label--light {
	font-weight: 300 !important;
	line-height: 19.25px;
	margin-bottom: 2px;
}

.bd-badge {
	position: absolute;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	border-radius: var(--bd-pill);
	font-family: var(--bd-font);
	font-size: 10.5px;
	font-weight: 400 !important;
	line-height: 1;
	letter-spacing: 1.26px;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}
.bd-badge--solid { background: var(--bd-brand); color: var(--bd-white); }
.bd-badge--sale { background: var(--bd-sale); color: var(--bd-white); }
.bd-badge--outline {
	padding-block: 4px;
	background: var(--bd-white);
	border: 1px solid var(--bd-line-strong);
	color: var(--bd-brand);
}

.bd-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bd-tag {
	display: inline-flex;
	align-items: center;
	height: 34px;
	margin: 0;
	padding-inline: 14px;
	border-radius: var(--bd-pill);
	background: var(--bd-sand);
	font-size: 13px;
	line-height: 1;
	color: var(--bd-brand);
}
.bd-tag--alert {
	background: var(--bd-alert-bg);
	border: 1px solid var(--bd-alert-line);
	color: var(--bd-alert);
}

/* Pill buttons. WoodMart styles .button heavily, hence the specificity. */
.bd-pdp .bd-btn,
.bd-pdp .single_add_to_cart_button.button,
.bd-pdp .bd-card__cta .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0 24px;
	border: 1px solid var(--bd-brand);
	border-radius: var(--bd-pill);
	background: var(--bd-brand);
	box-shadow: none;
	font-family: var(--bd-font);
	font-size: 13px;
	font-weight: 400 !important;
	line-height: 1;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	color: var(--bd-white);
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.bd-pdp .bd-btn:hover,
.bd-pdp .single_add_to_cart_button.button:hover,
.bd-pdp .bd-card__cta .button:hover {
	background: var(--bd-ink);
	border-color: var(--bd-ink);
	color: var(--bd-white);
}
.bd-pdp .single_add_to_cart_button.button.disabled,
.bd-pdp .single_add_to_cart_button.button:disabled {
	opacity: .5;
}

.bd-pdp :focus-visible {
	outline: 2px solid var(--bd-brand);
	outline-offset: 2px;
}

/* -------------------------------------------------------------- breadcrumb */

.bd-pdp__crumbs {
	padding-block: 24px 22px;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 1.92px;
	text-transform: uppercase;
	color: var(--bd-muted);
}
.bd-pdp__crumbs a {
	color: inherit;
	text-decoration: none;
}
.bd-pdp__crumbs a:hover { color: var(--bd-brand); }
.bd-pdp__crumb-sep { margin-inline: .45em; }

/* ------------------------------------------------------------------ layout */

.bd-pdp__main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 52px;
	align-items: start;
}

.bd-pdp__side {
	display: flex;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

/* ----------------------------------------------------------------- gallery */

.bd-pdp__gallery {
	position: relative;
	min-width: 0;
}
.bd-pdp__badge {
	inset-block-start: 20px;
	inset-inline-start: 20px;
	padding: 6px 12px;
	font-size: 11px;
	letter-spacing: 1.43px;
}

.bd-pdp .woocommerce-product-gallery {
	width: 100% !important; /* WC/WoodMart set an inline width */
	margin: 0;
	float: none;
	opacity: 1 !important;
}

/* Main image: square, cream, rounded. */
.bd-pdp .woocommerce-product-gallery__wrapper,
.bd-pdp .wd-gallery-images,
.bd-pdp .woocommerce-product-gallery .wd-carousel-container:first-child {
	border-radius: 20px;
	overflow: hidden;
	background: var(--bd-cream);
}
.bd-pdp .woocommerce-product-gallery__image {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bd-cream);
}
.bd-pdp .woocommerce-product-gallery__image > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.bd-pdp .woocommerce-product-gallery__image img {
	width: 82%;
	height: 85%;
	object-fit: contain;
	mix-blend-mode: multiply; /* product shots on white blend into the cream */
}

/* Thumbnails: 82px rounded tiles, 12px apart, below the image. */
.bd-pdp .wd-gallery-thumb,
.bd-pdp .flex-control-thumbs {
	margin-block-start: 12px;
}
.bd-pdp .wd-gallery-thumb .wd-carousel-item,
.bd-pdp .flex-control-thumbs li {
	flex: 0 0 82px;
	max-width: 82px;
	margin-inline-end: 12px;
	padding: 0;
}
.bd-pdp .wd-gallery-thumb .wd-carousel-item img,
.bd-pdp .flex-control-thumbs img {
	width: 82px;
	height: 82px;
	padding: 8px;
	object-fit: contain;
	border: 1px solid var(--bd-line);
	border-radius: 12px;
	background: var(--bd-cream);
	mix-blend-mode: multiply;
	opacity: 1;
	cursor: pointer;
}
.bd-pdp .wd-gallery-thumb .wd-carousel-item.wd-thumb-active img,
.bd-pdp .flex-control-thumbs img.flex-active {
	border-color: var(--bd-khaki);
}

/* ----------------------------------------------------------------- buy box */

.bd-pdp__buy {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 32px;
	border: 1px solid var(--bd-line);
	border-radius: 20px;
	background: var(--bd-white);
}

.bd-pdp .bd-pdp__title {
	margin: 0;
	font-family: var(--bd-font);
	font-size: 40px;
	font-weight: 500 !important;
	line-height: 1.06;
	letter-spacing: -0.6px;
	color: var(--bd-brand);
}

.bd-pdp__sold {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 34px;
	margin: 16px 0 0;
	padding-inline: 14px;
	border-radius: var(--bd-pill);
	background: var(--bd-sand);
	font-size: 12.5px;
	line-height: 1;
	color: var(--bd-body);
}
.bd-pdp__sold-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bd-ok);
}

.bd-pdp .bd-pdp__price {
	margin: 16px 0 0;
	font-family: var(--bd-font);
	font-size: 32px;
	font-weight: 500 !important;
	line-height: 1.2;
	color: var(--bd-ink);
}
.bd-pdp .bd-pdp__price .amount,
.bd-pdp .bd-pdp__price ins { color: inherit; text-decoration: none; font-weight: inherit; }
.bd-pdp .bd-pdp__price del {
	margin-inline-end: 8px;
	font-size: 18px;
	font-weight: 300 !important;
	color: var(--bd-muted);
}
.bd-pdp .bd-pdp__price del .amount { color: inherit; }

/* Weight presets */
.bd-pdp__weights { margin-top: 24px; }
.bd-pdp__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.bd-pdp .bd-chip {
	display: inline-flex;
	align-items: center;
	height: 44px;
	margin: 0;
	padding: 0 20px;
	border: 1px solid var(--bd-line-strong);
	border-radius: var(--bd-pill);
	background: var(--bd-white);
	box-shadow: none;
	font-family: var(--bd-font);
	font-size: 14px;
	font-weight: 400 !important;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	color: var(--bd-ink);
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.bd-pdp .bd-chip:hover { border-color: var(--bd-khaki); }
.bd-pdp .bd-chip[aria-pressed="true"] {
	background: var(--bd-brand);
	border-color: var(--bd-brand);
	color: var(--bd-white);
}

/* Everything WooCommerce and plugins print in the summary. */
.bd-pdp__summary {
	margin-top: 16px;
}
.bd-pdp__summary > :last-child { margin-bottom: 0; }
.bd-pdp__summary .stock {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--bd-soft);
}
.bd-pdp__summary .stock.out-of-stock { color: var(--bd-alert); }

/* WoodMart's free-shipping progress (kept: it is a live shop feature),
   styled like the design's info box under the button. */
.bd-pdp__summary .wd-shipping-progress-bar {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--bd-line);
	border-radius: 12px;
	background: var(--bd-cream);
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--bd-body);
}
.bd-pdp__summary .wd-shipping-progress-bar .amount { color: var(--bd-brand); font-weight: 500 !important; }
/* WoodMart's inner dashed frame: our box replaces it. */
.bd-pdp__summary .wd-shipping-progress-bar .wd-progress-bar {
	margin: 0;
	padding: 0;
	border: 0 !important;
}
.bd-pdp__summary .wd-shipping-progress-bar .progress-msg p { margin: 0; }
.bd-pdp__summary .wd-shipping-progress-bar .progress-area { margin-top: 8px; }

/* Variation pickers (variable products) as chips. */
.bd-pdp .variations_form table.variations {
	width: 100%;
	margin: 0 0 16px;
	border: 0;
}
.bd-pdp .variations_form table.variations th,
.bd-pdp .variations_form table.variations td {
	display: block;
	padding: 0;
	border: 0;
	text-align: start;
}
.bd-pdp .variations_form table.variations th.label,
.bd-pdp .variations_form table.variations .label label {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 400 !important;
	letter-spacing: 1.76px;
	text-transform: uppercase;
	color: var(--bd-muted);
}
.bd-pdp .variations_form select {
	height: 52px;
	padding-inline: 18px;
	border: 1px solid var(--bd-line-strong);
	border-radius: 14px;
	font-family: var(--bd-font);
	font-size: 14.5px;
	color: var(--bd-ink);
}

/*
 * Add-to-cart row: [ stepper ............ ][ ♡ ]
 *                  [ ADD TO CART · KD x.xxx    ]
 * Simple products: form.cart. Variable: .woocommerce-variation-add-to-cart.
 */
.bd-pdp form.cart:not(.variations_form),
.bd-pdp .woocommerce-variation-add-to-cart {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 54px;
	gap: 16px 12px;
	align-items: center;
	margin: 0;
}
.bd-pdp form.cart:not(.variations_form) > *,
.bd-pdp .woocommerce-variation-add-to-cart > * {
	grid-column: 1 / -1;
	margin: 0;
}
.bd-pdp form.cart .quantity,
.bd-pdp form.cart .wwbp_calculation_section {
	grid-column: 1;
	grid-row: 1;
}
.bd-pdp form.cart .bd-pdp__wish {
	grid-column: 2;
	grid-row: 1;
}
.bd-pdp form.cart .single_add_to_cart_button {
	grid-column: 1 / -1;
	grid-row: 2;
}
/* No wishlist heart (wishlist switched off): stepper takes the whole row. */
.bd-pdp form.cart:not(:has(.bd-pdp__wish)) .quantity,
.bd-pdp form.cart:not(:has(.bd-pdp__wish)) .wwbp_calculation_section {
	grid-column: 1 / -1;
}
/* No stepper (sold one at a time): heart beside the button instead. */
.bd-pdp form.cart:not(:has(.quantity:not(.hidden), .wwbp_calculation_section)) .single_add_to_cart_button {
	grid-column: 1;
	grid-row: 1;
}
.bd-pdp form.cart:not(:has(.quantity:not(.hidden), .wwbp_calculation_section)) .bd-pdp__wish {
	grid-row: 1;
}

/* Quantity stepper (WooCommerce/WoodMart .quantity and the weight plugin). */
.bd-pdp form.cart .quantity,
.bd-pdp .wwbp_calculation_section .weight,
.bd-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 54px;
	margin: 0;
	padding-inline: 8px;
	border: 1px solid var(--bd-line-strong);
	border-radius: var(--bd-pill);
	background: var(--bd-white);
}
.bd-pdp form.cart .quantity.hidden { display: none; }
.bd-pdp form.cart .quantity input.qty,
.bd-pdp .wwbp_calculation_section input.qty {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	text-align: center;
	font-family: var(--bd-font);
	font-size: 15px;
	font-weight: 500 !important;
	color: var(--bd-ink);
	-moz-appearance: textfield;
	appearance: textfield;
}
.bd-pdp input.qty::-webkit-outer-spin-button,
.bd-pdp input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.bd-pdp form.cart .quantity .minus,
.bd-pdp form.cart .quantity .plus,
.bd-pdp .wwbp_calculation_section input[type="button"].wwbp_button,
.bd-pdp .bd-stepper__btn {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0 !important; /* WoodMart frames its quantity buttons */
	border-radius: 50%;
	background: transparent;
	box-shadow: none !important;
	font-family: var(--bd-font);
	font-size: 18px;
	font-weight: 400 !important;
	line-height: 1;
	color: var(--bd-brand);
	cursor: pointer;
}
.bd-pdp form.cart .quantity .minus:hover,
.bd-pdp form.cart .quantity .plus:hover,
.bd-pdp .wwbp_calculation_section .wwbp_button:hover,
.bd-pdp .bd-stepper__btn:hover { background: var(--bd-sand); }
.bd-pdp .wwbp_calculation_section .wwbp_button:disabled { opacity: .35; cursor: default; background: transparent; }

/* Weight plugin: keep its stepper, drop its table layout and labels. The
   total it calculates is shown on the add-to-cart button (pdp.js). */
.bd-pdp .wwbp_calculation_section table,
.bd-pdp .wwbp_calculation_section tbody,
.bd-pdp .wwbp_calculation_section tr,
.bd-pdp .wwbp_calculation_section td {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}
.bd-pdp .wwbp_calculation_section tr:first-child td:first-child,
.bd-pdp .wwbp_calculation_section tr:not(:first-child) {
	display: none;
}
.bd-pdp .wwbp_calculation_section .weight::after {
	content: attr(data-bd-unit);
	order: 2;
	margin-inline-end: 6px;
	font-size: 13px;
	color: var(--bd-muted);
}
.bd-pdp .wwbp_calculation_section .wwbp_button.plus { order: 3; }

/* Wishlist heart (WoodMart's button with the design's icon). */
.bd-pdp__wish .wd-wishlist-btn,
.bd-card__wish .wd-wishlist-btn {
	margin: 0;
}
.bd-pdp__wish .wd-wishlist-btn > a,
.bd-card__wish .wd-wishlist-btn > a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 1px solid var(--bd-line-strong);
	border-radius: 50%;
	background: var(--bd-white) url("heart-18.svg") center / 18px 18px no-repeat;
	font-size: 0;
	color: transparent;
	transition: border-color .2s ease, background-color .2s ease;
}
.bd-pdp__wish .wd-wishlist-btn > a:hover,
.bd-card__wish .wd-wishlist-btn > a:hover { border-color: var(--bd-khaki); }
.bd-pdp__wish .wd-wishlist-btn > a.added,
.bd-card__wish .wd-wishlist-btn > a.added { background-color: var(--bd-sand); border-color: var(--bd-khaki); }
.bd-pdp__wish .wd-wishlist-btn > a::before,
.bd-pdp__wish .wd-wishlist-btn > a::after,
.bd-pdp__wish .wd-wishlist-btn .wd-action-icon,
.bd-pdp__wish .wd-wishlist-btn .wd-action-text,
.bd-card__wish .wd-wishlist-btn > a::before,
.bd-card__wish .wd-wishlist-btn > a::after,
.bd-card__wish .wd-wishlist-btn .wd-action-icon,
.bd-card__wish .wd-wishlist-btn .wd-action-text {
	display: none;
}

/* WoodMart's extras under the button (compare, delivery estimate, ...). */
.bd-pdp__summary .wd-compare-btn,
.bd-pdp__summary .wd-wishlist-btn:not(.bd-pdp__wish .wd-wishlist-btn) { margin-top: 12px; }

/* --------------------------------------------------------------------- tabs */

.bd-pdp__tabs {
	border: 1px solid var(--bd-line);
	border-radius: 20px;
	overflow: hidden;
	background: var(--bd-white);
}
.bd-pdp__tablist {
	display: flex;
	border-bottom: 1px solid var(--bd-line);
	overflow-x: auto;
	scrollbar-width: none;
}
.bd-pdp__tablist::-webkit-scrollbar { display: none; }
.bd-pdp .bd-pdp__tab {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 16px 10px;
	border: 0;
	border-radius: 0;
	background: var(--bd-white);
	box-shadow: none;
	font-family: var(--bd-font);
	font-size: 13px;
	font-weight: 400 !important;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	color: var(--bd-soft);
	cursor: pointer;
}
.bd-pdp .bd-pdp__tab:hover { color: var(--bd-brand); }
.bd-pdp .bd-pdp__tab[aria-selected="true"] {
	background: var(--bd-sand);
	font-weight: 500 !important;
	color: var(--bd-brand);
}
.bd-pdp__panel {
	padding: 28px;
	font-size: 15px;
	font-weight: 300 !important;
	line-height: 1.75;
	color: var(--bd-body);
}
.bd-pdp__panel[hidden] { display: none; }
.bd-pdp__panel > :first-child { margin-top: 0; }
.bd-pdp__panel > :last-child { margin-bottom: 0; }
.bd-pdp__panel h2:first-child { display: none; } /* WooCommerce repeats the tab name */

.bd-facts { display: flex; flex-direction: column; gap: 18px; }
.bd-facts__group > .bd-pdp__label + .bd-tags { margin-top: 0; }
.bd-facts__ingredients {
	margin: 0;
	font-size: 15px;
	font-weight: 300 !important;
	line-height: 26.25px;
	color: var(--bd-body);
}
.bd-facts__ingredients strong,
.bd-facts__ingredients b {
	font-weight: 500 !important;
	color: var(--bd-ink);
}
.bd-facts__note {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 300 !important;
	line-height: 22.1px;
	color: var(--bd-soft);
}

.bd-attrs {
	margin: 20px 0 0;
	padding: 0;
	font-size: 14px;
}
.bd-attrs__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-top: 1px solid var(--bd-line);
}
.bd-attrs dt { margin: 0; font-weight: 500 !important; color: var(--bd-ink); }
.bd-attrs dd { margin: 0; text-align: end; font-weight: 300 !important; color: var(--bd-body); }

.bd-nutrition {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 14px;
}
.bd-nutrition th,
.bd-nutrition td {
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--bd-line);
	text-align: start;
	font-weight: 300 !important;
	color: var(--bd-body);
}
.bd-nutrition td { text-align: end; font-weight: 500 !important; color: var(--bd-ink); }
.bd-nutrition__head th {
	padding-top: 0;
	font-size: 11px;
	font-weight: 400 !important;
	letter-spacing: 1.76px;
	text-transform: uppercase;
	color: var(--bd-muted);
}

/* -------------------------------------------------------- You may also like */

.bd-also {
	padding-block: 88px;
	background: var(--bd-white);
}
.bd-also__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 36px;
}
.bd-pdp .bd-also__title {
	margin: 0;
	font-family: var(--bd-font);
	font-size: 36px;
	font-weight: 500 !important;
	line-height: 1.1;
	letter-spacing: -0.36px;
	color: var(--bd-brand);
}
.bd-also__all {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 44px;
	padding-inline: 20px 8px;
	border-radius: var(--bd-pill);
	background: var(--bd-sand);
	font-size: 13px;
	line-height: 1;
	letter-spacing: 1.04px;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--bd-brand);
	text-decoration: none;
}
.bd-also__all:hover { color: var(--bd-ink); }
.bd-also__all-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--bd-sand-2);
}
.rtl .bd-also__all-arrow { transform: scaleX(-1); }

.bd-also__viewport { position: relative; }
.bd-also__track {
	display: flex;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.bd-also__track::-webkit-scrollbar { display: none; }

.bd-pdp .bd-also__nav {
	position: absolute;
	z-index: 4;
	inset-block-start: 103px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 0 2px;
	border: 1px solid var(--bd-line);
	border-radius: 50%;
	background: var(--bd-white);
	box-shadow: none;
	font-family: var(--bd-font);
	font-size: 18px;
	line-height: 1;
	color: var(--bd-brand);
	cursor: pointer;
}
.bd-pdp .bd-also__nav:hover { border-color: var(--bd-khaki); }
.bd-pdp .bd-also__nav:disabled { opacity: 0; pointer-events: none; }
.bd-also__nav--prev { inset-inline-start: -20px; }
.bd-also__nav--next { inset-inline-end: -20px; }
.rtl .bd-also__nav { transform: scaleX(-1); }

/* Card */
.bd-card {
	position: relative;
	flex: 0 0 calc((100% - 3 * 22px) / 4);
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--bd-line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--bd-white);
	scroll-snap-align: start;
}
.bd-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 251px;
	background: var(--bd-cream);
}
.bd-pdp .bd-card__img {
	width: 70%;
	height: 82%;
	object-fit: contain;
	mix-blend-mode: multiply;
}
.bd-card__badge {
	inset-block-start: 14px;
	inset-inline-start: 14px;
}
.bd-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 18px;
}
.bd-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	min-height: 42px;
}
.bd-pdp .bd-card__name {
	margin: 0;
	font-family: var(--bd-font);
	font-size: 16px;
	font-weight: 500 !important;
	line-height: 20.8px;
	color: var(--bd-ink);
}
.bd-card__name a { color: inherit; text-decoration: none; }
.bd-card__name a:hover { color: var(--bd-brand); }
.bd-card__wish { flex: 0 0 30px; }
.bd-card__wish .wd-wishlist-btn > a {
	width: 30px;
	height: 30px;
	border-color: var(--bd-line);
	background-image: url("heart-14.svg");
	background-size: 14px 14px;
}
.bd-pdp .bd-card__price {
	margin: 16px 0 0;
	font-family: var(--bd-font);
	font-size: 18px;
	font-weight: 500 !important;
	line-height: 1.2;
	color: var(--bd-ink);
}
.bd-pdp .bd-card__price .amount,
.bd-pdp .bd-card__price ins { color: inherit; text-decoration: none; font-weight: inherit; }
.bd-pdp .bd-card__price del {
	order: 2;
	margin-inline-start: 8px;
	font-size: 13px;
	font-weight: 300 !important;
	color: var(--bd-muted);
}
.bd-pdp .bd-card__price del .amount { color: inherit; }
.bd-pdp .bd-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.bd-pdp .bd-card__price ins { order: 1; }
.bd-pdp .bd-card__price del { order: 2; margin: 0; }

.bd-card__cta { margin-top: auto; padding-top: 24px; }
/* WoodMart's loop button shows an icon and hides its text on desktop. */
.bd-pdp .bd-card__cta .button .wd-action-icon { display: none; }
.bd-pdp .bd-card__cta .button .wd-action-text {
	display: inline !important;
	position: static;
	width: auto;
	height: auto;
	opacity: 1;
	visibility: visible;
	transform: none;
	clip: auto;
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}
.bd-pdp .bd-card__cta .button {
	opacity: 1;
	visibility: visible;
	transform: none;
	min-height: 44px;
	font-size: 12.5px;
	letter-spacing: 1px;
}
.bd-pdp .bd-card__cta--secondary .button {
	background: var(--bd-white);
	border-color: var(--bd-khaki);
	color: var(--bd-brand);
}
.bd-pdp .bd-card__cta--secondary .button:hover {
	background: var(--bd-sand);
	border-color: var(--bd-brand);
	color: var(--bd-brand);
}
.bd-pdp .bd-card__cta .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	text-align: center;
	color: var(--bd-brand);
}
.bd-card__note {
	margin: 16px 0 0;
	font-size: 11.5px;
	font-weight: 300 !important;
	line-height: 1;
	color: var(--bd-muted);
}

/* ------------------------------------------------------ sticky bar (mobile) */

.bd-pdp__sticky { display: none; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1240px) {
	.bd-pdp { --bd-gutter: 40px; }
	.bd-card { flex-basis: calc((100% - 2 * 22px) / 3); }
}

@media (max-width: 1024px) {
	.bd-pdp__main { column-gap: 32px; }
	.bd-pdp .bd-pdp__title { font-size: 32px; }
	.bd-card { flex-basis: calc((100% - 22px) / 2); }
}

@media (max-width: 768px) {
	.bd-pdp { --bd-gutter: 16px; }

	.bd-pdp__crumbs { padding-block: 12px 14px; font-size: 10px; letter-spacing: 1.5px; }

	.bd-pdp__main {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 16px;
	}
	.bd-pdp__side { gap: 16px; }

	.bd-pdp__badge { inset-block-start: 14px; inset-inline-start: 14px; padding: 5px 10px; font-size: 10.5px; }
	.bd-pdp .woocommerce-product-gallery__wrapper,
	.bd-pdp .wd-gallery-images,
	.bd-pdp .woocommerce-product-gallery .wd-carousel-container:first-child { border-radius: 16px; }
	.bd-pdp .wd-gallery-thumb .wd-carousel-item,
	.bd-pdp .flex-control-thumbs li { flex-basis: 74px; max-width: 74px; margin-inline-end: 8px; }
	.bd-pdp .wd-gallery-thumb .wd-carousel-item img,
	.bd-pdp .flex-control-thumbs img { width: 74px; height: 74px; }

	.bd-pdp__buy { padding: 20px; border-radius: 16px; }
	.bd-pdp .bd-pdp__title { font-size: 28px; letter-spacing: -0.4px; }
	.bd-pdp__sold { margin-top: 12px; height: 30px; font-size: 12px; }
	.bd-pdp .bd-pdp__price { margin-top: 12px; font-size: 26px; }
	.bd-pdp__weights { margin-top: 20px; }
	.bd-pdp .bd-chip { height: 40px; padding-inline: 18px; font-size: 13.5px; }

	.bd-pdp form.cart:not(.variations_form),
	.bd-pdp .woocommerce-variation-add-to-cart { grid-template-columns: minmax(0, 1fr) 48px; gap: 12px 10px; }
	.bd-pdp form.cart .quantity,
	.bd-pdp .wwbp_calculation_section .weight { height: 48px; }
	.bd-pdp .single_add_to_cart_button.button { min-height: 50px; }
	.bd-pdp__wish .wd-wishlist-btn > a { width: 48px; height: 48px; }

	.bd-pdp__tabs { border-radius: 16px; }
	.bd-pdp .bd-pdp__tab { flex: 1 0 auto; padding: 14px 12px; font-size: 12.5px; white-space: normal; }
	.bd-pdp__panel { padding: 20px; font-size: 14px; }

	.bd-also { padding-block: 40px 56px; }
	.bd-also__head { margin-bottom: 16px; }
	.bd-pdp .bd-also__title { font-size: 24px; }
	.bd-also__all { display: none; }
	.bd-also__nav { display: none !important; }
	.bd-also__track {
		gap: 12px;
		margin-inline: calc(-1 * var(--bd-gutter));
		padding-inline: var(--bd-gutter);
		scroll-padding-inline: var(--bd-gutter);
	}
	.bd-card { flex-basis: 62%; border-radius: 12px; }
	.bd-card__media { height: 190px; }
	.bd-card__body { padding: 14px; }
	.bd-pdp .bd-card__name { font-size: 14px; line-height: 18px; }
	.bd-pdp .bd-card__price { margin-top: 12px; font-size: 16px; }
	.bd-card__cta { padding-top: 16px; }
	.bd-pdp .bd-card__cta .button { min-height: 40px; font-size: 11.5px; }

	/* Sticky add-to-cart once the main button has scrolled away. */
	.bd-pdp__sticky:not([hidden]) {
		position: fixed;
		z-index: 400;
		inset-inline: 0;
		inset-block-end: 0;
		display: grid;
		grid-template-columns: 140px minmax(0, 1fr);
		gap: 10px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--bd-line);
		background: var(--bd-white);
		box-shadow: 0 -8px 24px rgba(74, 58, 50, .08);
	}
	.bd-stepper--sticky { height: 48px; padding-inline: 4px; }
	.bd-stepper__value {
		flex: 1 1 auto;
		white-space: nowrap;
		text-align: center;
		font-size: 15px;
		font-weight: 500 !important;
		color: var(--bd-ink);
	}
	.bd-pdp .bd-pdp__sticky-add {
		min-height: 48px;
		padding-inline: 12px;
		font-size: 12px;
		letter-spacing: .6px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	body.bd-has-sticky { padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
	.bd-also__track { scroll-behavior: auto; }
	.bd-pdp * { transition: none !important; }
}

/* =========================================================================
 * Baraka theme: WooCommerce's own gallery and form instead of WoodMart's,
 * and the audit against Figma 04_PDP (1:5087 desktop, 8:7368 mobile).
 * ====================================================================== */

/* Page: one gutter (the page wrapper adds none on product pages); crumbs at 112. */
.bh-page-body--product { padding: 88px 0 0; }
.admin-bar .bh-page-body--product { padding-top: calc(88px + var(--wp-admin--admin-bar--height, 32px)); }
.bd-pdp__crumbs { padding-top: 24px; }

/* Gallery: rounded viewport, thumbs in one row, zoom as an icon button inside the photo; sticky on desktop. */
.bd-pdp .flex-viewport { border-radius: 20px; overflow: hidden; }
.bd-pdp .flex-control-thumbs { display: flex; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.bd-pdp .flex-control-thumbs li { flex: 0 0 82px; max-width: 82px; margin: 0; }
.bd-pdp .flex-control-thumbs img { width: 82px; height: 82px; object-fit: cover; border-radius: 12px; border: 1px solid var(--bd-line); cursor: pointer; opacity: .7; }
.bd-pdp .flex-control-thumbs img.flex-active, .bd-pdp .flex-control-thumbs img:hover { opacity: 1; border-color: var(--bd-brand); }
.bd-pdp .woocommerce-product-gallery { position: relative; }
.bd-pdp .woocommerce-product-gallery__trigger {
	position: absolute; z-index: 3; inset-block-start: 16px; inset-inline-end: 16px;
	display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border: 1px solid var(--bd-line); border-radius: 999px; background: #fff; font-size: 0; text-decoration: none;
}
.bd-pdp .woocommerce-product-gallery__trigger::before {
	content: ""; width: 16px; height: 16px;
	background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23775c50' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.bd-pdp .woocommerce-product-gallery__trigger img, .bd-pdp .woocommerce-product-gallery__trigger span { display: none; }
.bd-pdp__badge { z-index: 3; }
@media (min-width: 1025px) {
	.bd-pdp__gallery { position: sticky; top: calc(108px + var(--wp-admin--admin-bar--height, 0px)); }
}

/* Quantity: −/+ round the value (QtyStepper 1:5145); the weight plugin's own stepper on weight products. */
.bd-pdp form.cart:has(.wwbp_calculation_section) .quantity { display: none !important; }
.bd-pdp form.cart:not(:has(.bd-pdp__wish)),
.bd-pdp form.cart:not(:has(.bd-pdp__wish)) .woocommerce-variation-add-to-cart { grid-template-columns: minmax(0, 1fr); }
.bd-pdp form.cart .quantity { display: flex; align-items: center; height: 54px; border: 1px solid var(--bd-line-2, #e3d4c8); border-radius: 999px; background: #fff; }
.bd-pdp form.cart .quantity input.qty { flex: 1; min-width: 0; height: 100%; border: 0; background: none; text-align: center; font: 500 15px/1 var(--bd-font); color: var(--bd-ink); -moz-appearance: textfield; }
.bd-pdp form.cart .quantity input.qty::-webkit-inner-spin-button, .bd-pdp form.cart .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bd-pdp form.cart .quantity input.minus, .bd-pdp form.cart .quantity input.plus { flex: none; width: 54px; height: 100%; border: 0; background: none; font-size: 18px; color: var(--bd-brand); cursor: pointer; }

/* Variations as chips (VariantSelector 1:5625); the native select stays for WooCommerce, hidden. */
.bd-pdp table.variations { width: 100%; border: 0; }
.bd-pdp table.variations th, .bd-pdp table.variations td { display: block; padding: 0; border: 0; text-align: start; }
.bd-pdp table.variations th label { font-size: 11px; font-weight: 400 !important; letter-spacing: 1.76px; text-transform: uppercase; color: var(--bd-kicker, #a18a7c); }
.bd-pdp .bd-varchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.bd-pdp .bd-chip[aria-pressed="true"] { background: var(--bd-brand); border-color: var(--bd-brand); color: #fff; }
.bd-pdp .bd-chip:disabled { opacity: .4; cursor: not-allowed; }
.bd-pdp select.bd-varselect { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bd-pdp .reset_variations { font-size: 12.5px; color: var(--bd-muted); }

/* Out of stock (BuyBox 1:5557): pill by the title, a disabled button; WooCommerce's red line hidden. */
.bd-pdp .stock.out-of-stock { display: none; }
.bd-pdp__oos { display: inline-flex; align-items: center; height: 34px; margin-top: 12px; padding-inline: 14px; border: 1px solid #e3d4c8; border-radius: 999px; background: #fff; font-size: 12.5px; color: #8a756a; }
.bd-pdp__oos-cta { margin-top: 18px; }
.bd-pdp__oos-cta .bd-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border: 1px solid #e3d4c8; border-radius: 999px; font-size: 13px; letter-spacing: 1.3px; text-transform: uppercase; color: #8a756a; cursor: not-allowed; }

/* Added-to-cart notice: a calm brand box, not a bare line with a focus ring. */
.bd-pdp .woocommerce-notices-wrapper:not(:empty), .bh-page-body--product > .woocommerce-notices-wrapper:not(:empty) { max-width: 1240px; margin: 0 auto 8px; padding-inline: var(--bd-gutter); }
.bh .woocommerce-message, .bh .woocommerce-info, .bh .woocommerce-error {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
	margin: 16px 0 0; padding: 14px 18px; border: 1px solid var(--bh-line); border-radius: 14px; background: var(--bh-cream);
	font-size: 14px; color: var(--bh-ink); list-style: none; outline: 0;
}
.bh .woocommerce-message::before, .bh .woocommerce-info::before { display: none; }
.bh .woocommerce-message .button, .bh .woocommerce-message .wc-forward {
	order: 2; display: inline-flex; align-items: center; height: 36px; padding-inline: 16px; border-radius: 999px;
	background: var(--bh-coffee); color: #fff; font-size: 12px; font-weight: 500 !important; letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
}

/* Nutrition table (1:5849). */
.bd-nutrition th, .bd-nutrition td { padding: 13px 0; border-top: 1px solid #f2e8e1; border-bottom: 0; font-size: 14.5px; font-weight: 300 !important; }
.bd-nutrition th { color: var(--bd-body, #6b584e); }
.bd-nutrition td { font-weight: 300 !important; color: var(--bd-ink); }
.bd-nutrition__head th { padding-top: 16px; white-space: normal; }

/* Rail cards: buttons line up; the weight note sits under the button. */
.bd-card__body { display: flex; flex-direction: column; }
.bd-card__cta { margin-top: auto; }
.bd-card__note { order: 9; }

@media (max-width: 768px) {
	.bd-pdp { --bd-gutter: 20px; }
	.bh-page-body--product { padding-top: 68px; } /* Under the 58px floating header: crumbs at 80 (8:7368). */
	.bd-pdp__crumbs { padding-top: 12px; }
	.bd-pdp__main { row-gap: 18px; }
	.bd-pdp .flex-viewport { border-radius: 20px; }
	.bd-pdp .flex-control-thumbs { gap: 10px; }
	.bd-pdp .flex-control-thumbs li { flex-basis: 74px; max-width: 74px; }
	.bd-pdp .flex-control-thumbs img { width: 74px; height: 74px; }
	.bd-pdp__buy { border-radius: 20px; }
	.bd-pdp__sold { height: 34px; font-size: 12.5px; }
	.bd-pdp .bd-chip { height: 42px; padding-inline: 20px; font-size: 14px; }
	.bd-pdp form.cart .quantity, .bd-pdp .wwbp_calculation_section .weight { height: 54px; }
	.bd-pdp .single_add_to_cart_button.button { min-height: 54px; }
	.bd-pdp__tabs { border-radius: 20px; }
	/* Rail (8:7463). */
	.bd-also { padding-block: 40px 48px; }
	.bd-pdp .bd-also__title { font-size: 26px; letter-spacing: -.26px; }
	.bd-also__track { gap: 14px; }
	.bd-card { flex: 0 0 200px; }
	.bd-card__media { height: 166px; }
	.bd-card__body { padding: 12px; }
	.bd-pdp .bd-card__name { font-size: 13.5px; font-weight: 500 !important; }
	.bd-pdp .bd-card__price { font-size: 15px; }
	.bd-pdp .bd-card__cta .button { min-height: 40px; font-size: 11px; letter-spacing: .88px; }
	.bd-card__badge { padding: 4px 8px; font-size: 9.5px; }
	/* Sticky bar (8:7623). */
	.bd-pdp__sticky:not([hidden]) { grid-template-columns: 124px minmax(0, 1fr); padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -14px rgba(74, 58, 50, .3); }
	.bd-stepper--sticky { height: 50px; padding-inline: 14px; }
	.bd-pdp .bd-pdp__sticky-add { min-height: 50px; font-size: 12.5px; letter-spacing: 1px; }
}

/* Weight field: the plugin autofocuses it; no browser focus box on load. */
.bd-pdp .wwbp_calculation_section input.qty:focus { outline: 0; }
/* Many / long variation options: a styled dropdown (Figma BundleTiers select, 1:5138). */
.bd-pdp select.bd-select {
	width: 100%; height: 52px; margin: 10px 0 16px; padding-inline: 18px 42px; border: 1px solid var(--bd-line-strong, #e3d4c8); border-radius: 14px;
	background: #fff no-repeat right 16px center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23775c50' stroke-width='1.5'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
	font: 400 14.5px/1 var(--bd-font); color: var(--bd-ink); -webkit-appearance: none; appearance: none;
}
[dir="rtl"] .bd-pdp select.bd-select { padding-inline: 42px 18px; background-position: left 16px center; }
/* Out-of-stock button: outline, readable. */
.bd-pdp .bd-pdp__oos-cta .bd-btn { background: #fff; }
