/* BetaDarou — new product page. Every rule is scoped to .bdpp (the product) or .bdpp-sticky,
   so the header, footer and other pages are not affected. */

.bdpp, .bdpp-sticky {
	--bd-indigo: #4e4ee5;
	--bd-indigo-50: #eeeefd;
	--bd-mint: #00f2a1;
	--bd-mint-50: #e3fff5;
	--bd-mint-700: #007a52;
	--bd-navy: #39397c;
	--bd-ink: #15153a;
	--bd-ink-2: #1f1f52;
	--bd-bg: #f4f5fb;
	--bd-text: #1c1c40;
	--bd-muted: #6a6a92;
	--bd-line: #e4e5f2;
	--bd-red: #e8365a;
	--bd-gold: #ffb938;
	--bd-r: 18px;
	--bd-shadow: 0 10px 30px -14px rgba(57, 57, 124, .28);
}

.bdpp { color: var(--bd-text); }
.bdpp *, .bdpp-sticky * { box-sizing: border-box; }
.bdpp [hidden] { display: none !important; }

/* ---------- Hero: gallery + buy box ---------- */
.bdpp .bdpp-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin-bottom: 32px;
}
.bdpp .bdpp-hero > * { min-width: 0; }
.woocommerce .bdpp .bdpp-gallery div.images,
.woocommerce .bdpp .bdpp-gallery .woocommerce-product-gallery,
.woocommerce .bdpp div.summary.bdpp-buybox {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
}
.bdpp .bdpp-gallery {
	position: sticky;
	top: 20px;
	background: #fff;
	border: 1px solid var(--bd-line);
	border-radius: 24px;
	padding: 16px;
}
.bdpp .bdpp-gallery img { border-radius: 16px; }
.bdpp .bdpp-gallery .onsale {
	background: var(--bd-red);
	color: #fff;
	border-radius: 999px;
	font-weight: 800;
	z-index: 3;
}

.bdpp .bdpp-buybox {
	background: #fff;
	border: 1px solid var(--bd-line);
	border-radius: var(--bd-r);
	box-shadow: var(--bd-shadow);
	padding: 24px;
}
.bdpp .bdpp-buybox .product_title {
	font-size: 24px;
	line-height: 1.6;
	font-weight: 800;
	color: var(--bd-ink);
	margin: 6px 0 2px;
}
.bdpp .bdpp-buybox .product-english-title {
	display: block;
	direction: ltr;
	text-align: right;
	color: var(--bd-muted);
	font-size: 13px;
}
.bdpp .bdpp-buybox .betadarou-product-brand { font-size: 13px; color: var(--bd-muted); }
.bdpp .bdpp-buybox .betadarou-product-brand a { color: var(--bd-indigo); font-weight: 700; }
.bdpp .bdpp-buybox .woocommerce-product-rating { margin: 8px 0 0; font-size: 13px; }

/* Expiry badge */
.bdpp .bdpp-expiry {
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	border: 1px solid var(--bd-line);
	background: var(--bd-bg);
	border-radius: 12px;
	padding: 9px 14px;
	font-size: 14px;
}
.bdpp .bdpp-expiry b { font-size: 16px; font-weight: 900; unicode-bidi: isolate; }
.bdpp .bdpp-expiry__left:empty { display: none; }
.bdpp .bdpp-expiry__left {
	margin-inline-start: auto;
	font-size: 12.5px;
	font-weight: 800;
	border-radius: 8px;
	padding: 2px 10px;
}
.bdpp .bdpp-expiry.is-good { background: var(--bd-mint-50); border-color: #9cf0cf; color: #06603f; }
.bdpp .bdpp-expiry.is-good .bdpp-expiry__left { background: var(--bd-mint); color: var(--bd-ink); }

/* Module 1: macro tiles */
.bdpp .bdpp-macros { display: grid; gap: 8px; margin: 16px 0 4px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bdpp .bdpp-macros--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bdpp .bdpp-macros--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bdpp .bdpp-macros--1 { grid-template-columns: minmax(0, 1fr); }
.bdpp .bdpp-macro {
	background: linear-gradient(160deg, var(--bd-ink-2), var(--bd-ink));
	color: #fff;
	border-radius: 14px;
	padding: 12px 6px;
	text-align: center;
}
.bdpp .bdpp-macro strong { display: block; font-size: 21px; font-weight: 900; color: var(--bd-mint); line-height: 1.4; }
.bdpp .bdpp-macro small { font-size: 12px; opacity: .85; }

/* Price + per serving */
.bdpp .bdpp-buybox > .price,
.bdpp .bdpp-buybox .woocommerce-variation-price .price {
	font-size: 26px;
	font-weight: 900;
	color: var(--bd-ink);
	margin: 14px 0 0;
}
.bdpp .bdpp-buybox .price del { font-size: 15px; color: var(--bd-muted); font-weight: 500; }
.bdpp .bdpp-buybox .price ins { text-decoration: none; }
.bdpp .bdpp-per-serving-slot:empty { display: none; }
.bdpp .bdpp-per-serving {
	display: inline-block;
	margin-top: 8px;
	background: var(--bd-mint-50);
	color: var(--bd-mint-700);
	border: 1px dashed var(--bd-mint-700);
	font-size: 13px;
	font-weight: 800;
	border-radius: 10px;
	padding: 5px 12px;
}

/* Variation chips */
.bdpp .bdpp-attrs { margin: 16px 0 6px; }
.bdpp .bdpp-attr { margin-bottom: 12px; }
.bdpp .bdpp-attr--hidden { display: none; }
.bdpp .bdpp-attr__label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; color: var(--bd-ink); margin-bottom: 8px; }
.bdpp .bdpp-attr__label label { margin: 0; font-weight: 800; }
.bdpp .bdpp-attr__current { font-weight: 500; color: var(--bd-muted); font-size: 13px; }
.bdpp .bdpp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bdpp .bdpp-chips:empty + .bdpp-attr__select { position: static; opacity: 1; pointer-events: auto; height: auto; }
.bdpp .bdpp-chip {
	border: 2px solid var(--bd-line);
	border-radius: 12px;
	background: #fff;
	color: var(--bd-text);
	padding: 7px 14px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.bdpp .bdpp-chip:hover { border-color: #c9c9f3; background: #fff; color: var(--bd-text); }
.bdpp .bdpp-chip.is-on { border-color: var(--bd-indigo); background: var(--bd-indigo-50); color: var(--bd-indigo); }
.bdpp .bdpp-chip.is-off { opacity: .45; text-decoration: line-through; cursor: not-allowed; }
.bdpp .bdpp-chip:focus-visible { outline: 3px solid var(--bd-indigo-50); outline-offset: 1px; }
/* the native select stays for WooCommerce's script but is visually hidden when chips exist */
.bdpp .bdpp-attr__select { position: absolute; opacity: 0; pointer-events: none; height: 0; overflow: hidden; }
.bdpp .reset_variations { display: none !important; }

/* Add to cart row */
.bdpp .bdpp-buybox form.cart { margin: 12px 0 0 !important; }
.bdpp .bdpp-buybox .woocommerce-variation-add-to-cart,
.bdpp .bdpp-buybox form.cart:not(.variations_form) {
	display: flex;
	gap: 10px;
	align-items: stretch;
	flex-wrap: wrap;
}
.bdpp .bdpp-buybox .woocommerce-variation-add-to-cart > *:not(.quantity):not(.single_add_to_cart_button) { flex-basis: 100%; }
.bdpp .bdpp-buybox .single_add_to_cart_button,
.bdpp .bdpp-btn {
	flex: 1;
	min-height: 54px;
	border-radius: 14px !important;
	background: var(--bd-mint) !important;
	color: var(--bd-ink) !important;
	font: inherit;
	font-weight: 900 !important;
	font-size: 16px !important;
	border: 0 !important;
	box-shadow: 0 12px 24px -12px rgba(0, 242, 161, .9);
	cursor: pointer;
	padding: 0 20px;
	transition: transform .15s, filter .15s;
}
.bdpp .bdpp-buybox .single_add_to_cart_button { margin: 0 !important; }
/* clearfix pseudo-elements would take up flex slots */
.bdpp .bdpp-buybox form.cart::before,
.bdpp .bdpp-buybox form.cart::after,
.bdpp .bdpp-buybox .woocommerce-variation-add-to-cart::before,
.bdpp .bdpp-buybox .woocommerce-variation-add-to-cart::after { display: none !important; }
.bdpp .bdpp-buybox .single_add_to_cart_button:hover,
.bdpp .bdpp-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.bdpp .bdpp-buybox .single_add_to_cart_button.disabled { opacity: .55; }
.bdpp .bdpp-qty,
.bdpp .bdpp-buybox .quantity {
	display: flex;
	align-items: center;
	border: 2px solid var(--bd-line);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	margin: 0 !important;
}
.bdpp .bdpp-qty input.qty {
	width: 44px;
	border: 0 !important;
	background: transparent !important;
	text-align: center;
	font-weight: 900;
	font-size: 17px;
	box-shadow: none !important;
	-moz-appearance: textfield;
	padding: 0;
}
.bdpp .bdpp-qty input.qty::-webkit-outer-spin-button,
.bdpp .bdpp-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bdpp .bdpp-qty__btn {
	width: 40px;
	height: 50px;
	border: 0;
	background: transparent;
	color: var(--bd-indigo);
	font-size: 22px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}
.bdpp .bdpp-buybox .woocommerce-variation-availability p.stock { margin: 6px 0; font-size: 13px; }

/* Shipping */
.bdpp .bdpp-shipping { margin-top: 14px; display: grid; gap: 8px; }
.bdpp .bdpp-shipping__cost,
.bdpp .bdpp-shipping__today {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 13.5px;
	border-radius: 12px;
	padding: 10px 12px;
}
.bdpp .bdpp-shipping__cost { background: var(--bd-indigo-50); color: var(--bd-navy); }
.bdpp .bdpp-shipping__cost b { color: var(--bd-indigo); }
.bdpp .bdpp-shipping__today { background: #fffaf0; border: 1px solid #ffe3a8; }
.bdpp .bdpp-shipping__today b { color: #9a5b00; }
.bdpp .bdpp-shipping__today[hidden] { display: none; }

/* Trust */
.bdpp .bdpp-trust {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 8px;
}
.bdpp .bdpp-trust li {
	border: 1px solid var(--bd-line);
	border-radius: 12px;
	padding: 10px 6px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--bd-navy);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
}
/* Restored: these are stroke icons, so without fill:none they render as solid black shapes. */
.bdpp .bdpp-trust svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--bd-indigo);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.bdpp .bdpp-buybox .woocommerce-product-details__short-description {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--bd-line);
	font-size: 14px;
	color: var(--bd-muted);
}
.bdpp .bdpp-buybox .product_meta {
	margin-top: 18px !important;
	padding-top: 12px !important;
	border-top: 1px solid var(--bd-line) !important;
	font-size: 13px;
	color: var(--bd-muted);
}

/* Theme/Astra quantity buttons */
.bdpp .bdpp-qty--theme .minus,
.bdpp .bdpp-qty--theme .plus {
	display: grid;
	place-items: center;
	width: 40px;
	height: 50px;
	border: 0 !important;
	background: transparent !important;
	color: var(--bd-indigo) !important;
	font-size: 22px;
	font-weight: 700;
	text-decoration: none;
	padding: 0;
	margin: 0;
}

/* Astra prints the categories twice (meta + category element) */
.bdpp .bdpp-buybox .single-product-category { display: none !important; }

/* Short description: clamp long text */
.bdpp .bdpp-buybox .bdpp-clamp {
	max-height: 170px;
	overflow: hidden;
	position: relative;
}
.bdpp .bdpp-buybox .bdpp-clamp::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 60px;
	background: linear-gradient(transparent, #fff);
}
.bdpp .bdpp-buybox .bdpp-clamp.is-open { max-height: none; }
.bdpp .bdpp-buybox .bdpp-clamp.is-open::after { display: none; }
.bdpp .bdpp-more {
	background: none;
	border: 0;
	padding: 4px 0;
	color: var(--bd-indigo);
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}
.bdpp .bdpp-buybox .woocommerce-product-details__short-description p { margin-bottom: .6em; }

/* The Min/Max quantity plugin prints a second copy of the variation's stock text — keep WooCommerce's one */
.bdpp .bdpp-buybox:has(.woocommerce-variation-availability .stock) .wcmmq-custom-stock-msg { display: none !important; }

/* Low stock (real stock ≤ setting) */
.bdpp .bdpp-buybox .bdpp-stock--low {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0 !important;
	padding: 6px 12px;
	border-radius: 10px;
	background: #fff1f4;
	border: 1px solid #ffc2cf;
	color: #c21d42 !important;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.6;
}
.bdpp .bdpp-buybox .bdpp-stock--low b { font-weight: 900; }
.bdpp .bdpp-buybox .bdpp-stock__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--bd-red);
	color: #fff;
	font-size: 13px;
	font-weight: 900;
	animation: bdpp-pulse 1.8s ease-in-out infinite;
}
@keyframes bdpp-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(232, 54, 90, .45); }
	50% { box-shadow: 0 0 0 6px rgba(232, 54, 90, 0); }
}
@media (prefers-reduced-motion: reduce) { .bdpp .bdpp-buybox .bdpp-stock__icon { animation: none; } }

/* Features box now sits under the add-to-cart button */
.bdpp .bdpp-buybox form.cart + .bdpp-features { margin-top: 16px; }

/* «ویژگی‌های کلیدی» (short description) */
.bdpp .bdpp-features {
	margin: 14px 0 4px;
	background: var(--bd-bg);
	border-radius: 14px;
	padding: 12px 14px;
}
.bdpp .bdpp-features__title { font-size: 13px; font-weight: 800; color: var(--bd-ink); margin-bottom: 6px; }
.bdpp .bdpp-features__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bdpp .bdpp-features__list li {
	position: relative;
	margin: 0;
	padding-inline-start: 24px;
	font-size: 13.5px;
	line-height: 1.8;
	color: var(--bd-text);
}
.bdpp .bdpp-features__list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: .45em;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--bd-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2315153a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.bdpp .bdpp-features__list li.is-more { display: none; }
.bdpp .bdpp-features.is-open .bdpp-features__list li.is-more { display: list-item; }
.bdpp .bdpp-features__more {
	background: none;
	border: 0;
	padding: 4px 0 0;
	color: var(--bd-indigo);
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}
.bdpp .bdpp-features__text { font-size: 13.5px; color: var(--bd-text); }
.bdpp .bdpp-features__text p:last-child { margin-bottom: 0; }

/* Quantity box when the stock allows only 1 (WooCommerce hides the input) */
.bdpp .bdpp-buybox .quantity:has(input[type="hidden"]) { display: none !important; }

/* ---------- Sections ---------- */
.bdpp .bdpp-section { margin: 32px 0; }
.bdpp .bdpp-card { background: #fff; border: 1px solid var(--bd-line); border-radius: var(--bd-r); box-shadow: var(--bd-shadow); }
.bdpp .bdpp-h2 {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 21px;
	font-weight: 900;
	color: var(--bd-ink);
	margin: 0 0 16px;
}
.bdpp .bdpp-h2::before {
	content: "";
	width: 6px;
	height: 24px;
	border-radius: 4px;
	background: linear-gradient(var(--bd-mint), var(--bd-indigo));
}

/* Module 3: nutrition band + calculator */
.bdpp .bdpp-band {
	background:
		radial-gradient(circle at 85% 0, rgba(0, 242, 161, .18), transparent 40%),
		radial-gradient(circle at 0 100%, rgba(78, 78, 229, .45), transparent 50%),
		var(--bd-ink);
	color: #fff;
	border-radius: 28px;
	padding: 32px;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 28px;
}
.bdpp .bdpp-band--single { grid-template-columns: minmax(0, 1fr); }
.bdpp .bdpp-band .bdpp-h2 { color: #fff; }
.bdpp .bdpp-bars { display: flex; flex-direction: column; gap: 14px; }
.bdpp .bdpp-bar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 80px; gap: 12px; align-items: center; font-size: 14px; }
.bdpp .bdpp-bar__track { height: 12px; border-radius: 8px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bdpp .bdpp-bar__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--bd-indigo), var(--bd-mint));
	transition: width 1s cubic-bezier(.2, .8, .2, 1);
}
.bdpp .bdpp-bars.is-in .bdpp-bar__fill { width: var(--w); }
.bdpp .bdpp-bar__val { color: var(--bd-mint); text-align: left; }
.bdpp .bdpp-band__note { font-size: 12px; opacity: .65; margin: 12px 0 0; }

.bdpp .bdpp-calc {
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 20px;
	padding: 20px;
}
.bdpp .bdpp-calc h3 { color: #fff; font-size: 17px; font-weight: 900; margin: 0 0 4px; }
.bdpp .bdpp-calc__sub { font-size: 13px; opacity: .75; margin: 0 0 14px; }
.bdpp .bdpp-calc__label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.bdpp .bdpp-calc__desc { opacity: .75; font-weight: 500; }
.bdpp .bdpp-calc__picker {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(0, 0, 0, .25);
	border-radius: 14px;
	padding: 6px;
}
.bdpp .bdpp-calc__picker button {
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, .1);
	color: var(--bd-mint);
	font-size: 24px;
	font-weight: 900;
	cursor: pointer;
	padding: 0;
}
.bdpp .bdpp-calc__value { font-size: 30px; font-weight: 900; color: #fff; }
.bdpp .bdpp-calc__quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.bdpp .bdpp-calc__quick button {
	border: 0;
	border-radius: 10px;
	padding: 8px 2px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.bdpp .bdpp-calc__quick button.is-on { background: var(--bd-mint); color: var(--bd-ink); }
.bdpp .bdpp-calc__out { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.bdpp .bdpp-calc__out > div { background: rgba(0, 0, 0, .25); border-radius: 14px; padding: 12px; text-align: center; }
.bdpp .bdpp-calc__out strong { display: block; font-size: 24px; font-weight: 900; color: var(--bd-mint); line-height: 1.6; }
.bdpp .bdpp-calc__out small { font-size: 12px; opacity: .75; }
.bdpp .bdpp-calc__tip {
	margin: 12px 0 0;
	font-size: 13px;
	background: rgba(0, 242, 161, .12);
	border-radius: 12px;
	padding: 10px 12px;
	color: #bff9e4;
}

/* Module 4: bundle */
.bdpp .bdpp-bundle { padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: center; }
.bdpp .bdpp-bundle__items { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bdpp .bdpp-bundle__item {
	position: relative;
	width: 170px;
	border: 2px solid var(--bd-line);
	border-radius: 16px;
	padding: 12px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	cursor: pointer;
	transition: border-color .15s;
}
.bdpp .bdpp-bundle__item.is-on { border-color: var(--bd-indigo); }
.bdpp .bdpp-bundle__item input { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; accent-color: var(--bd-indigo); z-index: 1; }
.bdpp .bdpp-bundle__thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--bd-bg); }
.bdpp .bdpp-bundle__name { font-size: 13px; font-weight: 800; line-height: 1.7; }
.bdpp .bdpp-bundle__name em { font-style: normal; color: var(--bd-indigo); }
.bdpp .bdpp-bundle__name a { color: inherit; }
.bdpp .bdpp-bundle__price { font-size: 13px; color: var(--bd-muted); }
.bdpp .bdpp-bundle__plus { font-size: 26px; font-weight: 900; color: var(--bd-indigo); }
.bdpp .bdpp-bundle__sum { background: var(--bd-bg); border-radius: 16px; padding: 18px; }
.bdpp .bdpp-bundle__row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.bdpp .bdpp-bundle__save { color: var(--bd-mint-700); font-weight: 800; }
.bdpp .bdpp-bundle__total { font-size: 22px; font-weight: 900; color: var(--bd-ink); margin: 6px 0 12px; }
.bdpp .bdpp-bundle__total small { font-size: 13px; color: var(--bd-muted); font-weight: 600; }
.bdpp .bdpp-bundle__add { width: 100%; }
.bdpp .bdpp-bundle__add.is-loading { opacity: .6; }
.bdpp .bdpp-bundle__msg { font-size: 13px; margin: 10px 0 0; }

/* Tabs (WooCommerce's own markup) */
.bdpp .woocommerce-tabs {
	background: #fff;
	border: 1px solid var(--bd-line);
	border-radius: var(--bd-r);
	box-shadow: var(--bd-shadow);
	margin: 32px 0;
	padding: 0 !important;
	overflow: hidden;
}
.bdpp .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	margin: 0 !important;
	padding: 0 12px !important;
	border-bottom: 1px solid var(--bd-line);
	list-style: none;
}
.bdpp .woocommerce-tabs ul.tabs::before,
.bdpp .woocommerce-tabs ul.tabs li::before,
.bdpp .woocommerce-tabs ul.tabs li::after { display: none !important; }
.bdpp .woocommerce-tabs ul.tabs li {
	border: 0 !important;
	background: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0 !important;
}
.bdpp .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 16px 14px !important;
	font-weight: 800;
	color: var(--bd-muted) !important;
	border-bottom: 3px solid transparent;
	white-space: nowrap;
}
.bdpp .woocommerce-tabs ul.tabs li.active a { color: var(--bd-indigo) !important; border-bottom-color: var(--bd-indigo); }
.bdpp .woocommerce-tabs .panel { padding: 24px !important; margin: 0 !important; }
.bdpp .woocommerce-tabs table { width: 100%; }

/* Reviews */
.bdpp .bdpp-reviews__avg { font-size: 14px; font-weight: 700; color: var(--bd-muted); display: inline-flex; align-items: center; gap: 6px; }
.bdpp .bdpp-stars { --pct: calc(var(--r) / 5 * 100%); display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; }
.bdpp .bdpp-stars::before {
	content: "★★★★★";
	background: linear-gradient(to left, var(--bd-gold) var(--pct), #d8d8e6 var(--pct));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.bdpp .bdpp-reviews__body { padding: 22px; }

/* FAQ */
.bdpp .bdpp-faq details { border-bottom: 1px solid var(--bd-line); }
.bdpp .bdpp-faq details:last-child { border-bottom: 0; }
.bdpp .bdpp-faq summary {
	list-style: none;
	cursor: pointer;
	padding: 16px 20px;
	font-weight: 800;
	color: var(--bd-ink);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.bdpp .bdpp-faq summary::-webkit-details-marker { display: none; }
.bdpp .bdpp-faq summary::after { content: "+"; font-size: 22px; color: var(--bd-indigo); transition: transform .2s; }
.bdpp .bdpp-faq details[open] summary::after { transform: rotate(45deg); }
.bdpp .bdpp-faq__a { padding: 0 20px 16px; color: var(--bd-muted); font-size: 14px; }

/* ---------- Sticky add-to-cart ---------- */
.bdpp-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	background: rgba(255, 255, 255, .97);
	border-top: 1px solid var(--bd-line);
	box-shadow: 0 -8px 24px -12px rgba(21, 21, 58, .25);
	transform: translateY(110%);
	transition: transform .25s;
}
.bdpp-sticky.is-visible { transform: none; }
.bdpp-sticky__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	direction: rtl;
}
.bdpp-sticky__thumb img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--bd-bg); }
.bdpp-sticky__name { font-weight: 800; font-size: 14px; line-height: 1.5; color: var(--bd-text); }
.bdpp-sticky__var { display: block; font-weight: 500; font-size: 12px; color: var(--bd-muted); }
.bdpp-sticky__price { margin-inline-start: auto; font-weight: 900; font-size: 16px; white-space: nowrap; color: var(--bd-ink); }
.bdpp-sticky__price del { font-size: 12px; color: var(--bd-muted); font-weight: 500; }
.bdpp-sticky__price ins { text-decoration: none; }
.bdpp-sticky .bdpp-btn {
	flex: 0 0 200px;
	min-height: 48px;
	border-radius: 14px;
	background: var(--bd-mint);
	color: var(--bd-ink);
	font: inherit;
	font-weight: 900;
	font-size: 15px;
	border: 0;
	cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 921px) {
	.bdpp .bdpp-hero,
	.bdpp .bdpp-band,
	.bdpp .bdpp-bundle { grid-template-columns: minmax(0, 1fr); }
	.bdpp .bdpp-gallery { position: static; }
}
/* Reviews: the form opens from a button */
.bdpp .bdpp-review-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 12px;
	border: 2px solid var(--bd-indigo);
	background: #fff;
	color: var(--bd-indigo);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}
.bdpp .bdpp-reviews #review_form_wrapper.bdpp-collapsed { display: none; }

/* Long description tab: first part + «ادامه» (phones & tablets) */
/* ---------- توضیحات / مشخصات as standalone sections (1.0.25) ----------
 * They used to be tabs, so they inherit the tab panel's inner padding and table rules. */
.bdpp .bdpp-section__body { padding: 24px; }
.bdpp .bdpp-section__inner > :first-child { margin-top: 0; }
.bdpp .bdpp-section__inner > :last-child { margin-bottom: 0; }
.bdpp .bdpp-section__body table { width: 100%; }
/* ---------- «مشخصات» attributes table ----------
 * Shared by the standalone section and the tab, so both look the same. */
body.bdpp-page .bdpp table.shop_attributes { margin: 0; border: 0; width: 100%; }
body.bdpp-page .bdpp table.shop_attributes th { color: var(--bd-muted); font-weight: 700; }
body.bdpp-page .bdpp table.shop_attributes th,
body.bdpp-page .bdpp table.shop_attributes td {
	/*
	 * WooCommerce core styles the value column «font-style: italic; padding: 0» at a specificity
	 * the plainer .bdpp selectors did not beat. Inside a tab panel the theme happened to override
	 * it, so it only surfaced on products with no tabs, where مشخصات is a section of its own:
	 * italic values with no cell padding, on desktop and on phones.
	 */
	font-style: normal;
	padding: 12px 14px;
	vertical-align: middle;
	text-align: start;
}
body.bdpp-page .bdpp table.shop_attributes p { margin: 0; }

/*
 * Desktop: two pairs per line. One column left a very wide empty gap between the label and its
 * value and made the card needlessly tall. The table becomes a two-column grid and each row a
 * flex line, so a label still sits beside its own value.
 */
@media (min-width: 922px) {
	body.bdpp-page .bdpp table.shop_attributes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
	body.bdpp-page .bdpp table.shop_attributes > tbody { display: contents; }
	body.bdpp-page .bdpp table.shop_attributes tr {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 16px;
		border-bottom: 1px dotted var(--bd-line);
	}
	body.bdpp-page .bdpp table.shop_attributes th,
	body.bdpp-page .bdpp table.shop_attributes td { display: block; padding: 11px 2px; }
	/*
	 * The theme puts a bottom border on every cell and a right border on the label. In a table
	 * those merged into the row rules; in a grid they showed up as broken lines and a stray
	 * vertical divider between the columns. The row's own border replaces them.
	 * The label's border is set with !important by the theme, so it needs one back.
	 */
	body.bdpp-page .bdpp table.shop_attributes { border-top: 0; }
	body.bdpp-page .bdpp table.shop_attributes td { border: 0; }
	body.bdpp-page .bdpp table.shop_attributes th { border: 0 !important; }
	body.bdpp-page .bdpp table.shop_attributes td { text-align: end; }
	/* An odd number of rows leaves one cell empty; nothing should hang under it. */
	body.bdpp-page .bdpp table.shop_attributes tr:last-child,
	body.bdpp-page .bdpp table.shop_attributes tr:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}

/* ---------- One spacing rhythm for everything below the buy box (1.0.27) ----------
 * The tab block was picking up a 60px bottom margin from the theme while every other
 * section used 32px, so the gap under the tabs was nearly twice the others. */
body.bdpp-page .bdpp .woocommerce-tabs,
body.bdpp-page .bdpp .bdpp-section { margin-block: var(--bd-gap, 32px); }

.bdpp { --bd-clamp: 560px; }
.bdpp .bdpp-desc-clamp { max-height: var(--bd-clamp, 560px); overflow: hidden; position: relative; }
.bdpp .bdpp-desc-clamp::after {
	content: "";
	/*
	 * display + clear are not optional here: the theme has a clearfix on .panel::after
	 * («display: table; clear: both»), and an absolutely positioned table shrinks to fit, so the
	 * gradient came out 0px wide and no fade appeared on the tab panels at all.
	 */
	display: block;
	clear: none;
	position: absolute;
	inset: auto 0 0 0;
	/* Tall enough, and reaching white early, so the fade lands on text rather than on the
	 * card's bottom padding — at 90px the strongest part fell on empty space and the content
	 * just looked chopped. */
	height: 170px;
	background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .88) 62%, #fff 100%);
	pointer-events: none;
}
/* While clamped there is nothing below the cut, so the panel's own bottom padding only pushed
 * the fade off the text. The button's margin provides the gap instead. */
.bdpp .woocommerce-tabs .panel.bdpp-desc-clamp { padding-bottom: 0 !important; }
/* The button belongs to the card it opens, so it sits inside the padding, not floating under it. */
.bdpp .woocommerce-tabs .bdpp-desc-more { margin: 0 auto 22px; }
.bdpp .bdpp-section__inner + .bdpp-desc-more { margin: 18px auto 0; }
/* A centred pill, not a full-width bar: it reads as a control rather than another panel. */
.bdpp .bdpp-desc-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto;
	min-height: 44px;
	padding: 0 22px;
	border-radius: 999px;
	border: 1px solid var(--bd-indigo);
	background: #fff;
	color: var(--bd-indigo);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.bdpp .bdpp-desc-more::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}
.bdpp .bdpp-desc-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.bdpp .bdpp-desc-more:hover { background: var(--bd-indigo); color: #fff; }
.bdpp .bdpp-desc-more:focus-visible { outline: 2px solid var(--bd-indigo); outline-offset: 2px; }
/* A closed tab's button goes with it. More specific than the rule above, so display:flex cannot win. */
.bdpp .bdpp-desc-more[hidden] { display: none; }

/* Related products */
.bdpp .bdpp-related { margin: 32px 0; }

/* Related products: same heading style as the other sections */
.bdpp .related { margin-top: 32px; }
.bdpp .related .related-products-title,
.bdpp .related > h2,
.bdpp .up-sells > h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: inherit;
	font-size: 21px;
	font-weight: 900;
	line-height: 1.6;
	color: var(--bd-ink);
	margin: 0 0 16px;
	padding: 0;
	border: 0;
	background: none;
	text-align: right;
}
.bdpp .related .related-products-title::before,
.bdpp .related > h2::before,
.bdpp .up-sells > h2::before {
	content: "";
	flex: none;
	width: 6px;
	height: 24px;
	border-radius: 4px;
	background: linear-gradient(var(--bd-mint), var(--bd-indigo));
}
.bdpp .related .related-products-title::after { display: none !important; }

/* Desktop: keep the product images in view while scrolling the buy box.
   The theme sets overflow-x:hidden on <html>/<body>, which silently disables position:sticky.
   overflow-x:clip clips the same way without breaking sticky (product pages, desktop only). */
@media (min-width: 922px) {
	html:has(body.bdpp-page),
	body.bdpp-page { overflow-x: clip !important; overflow-y: visible !important; }
	.bdpp .bdpp-gallery { position: sticky; top: 24px; }
	body.admin-bar .bdpp .bdpp-gallery { top: 56px; }
}

/* Tablets & phones: the theme nests three containers (10 + 10 + 15px) around the product, plus the
   card's own padding, which left ~53px empty on each side. On product pages only, use one 12px gutter.
   Scoped to #content (the page body) — the header and footer are not touched. */
@media (max-width: 921px) {
	body.bdpp-page #content.site-content { padding-left: 12px !important; padding-right: 12px !important; }
	body.bdpp-page #content .ast-container,
	body.bdpp-page #content .ast-woocommerce-container { padding-left: 0 !important; padding-right: 0 !important; }
	body.bdpp-page #content #primary { padding-top: 12px; margin-top: 0; }
	.bdpp .bdpp-hero { gap: 14px; margin-bottom: 20px; }
	.bdpp .bdpp-section,
	.bdpp .woocommerce-tabs { margin: 20px 0; }
}
@media (max-width: 600px) {
	.bdpp .related .related-products-title, .bdpp .related > h2 { font-size: 18px; }
	.bdpp .bdpp-gallery { padding: 8px; border-radius: 18px; }
	/* keep the product image from filling the whole first screen */
	.bdpp .bdpp-gallery .woocommerce-product-gallery__image img { max-height: 300px; width: auto !important; margin: 0 auto; object-fit: contain; }
	.bdpp .bdpp-gallery .flex-control-thumbs { display: flex; justify-content: center; gap: 8px; margin-top: 6px !important; }
	.bdpp .bdpp-gallery .flex-control-thumbs li { width: 56px !important; float: none !important; margin: 0 !important; }
	.bdpp .bdpp-related { margin: 20px 0; }
	.bdpp .bdpp-gallery img { border-radius: 12px; }
	.bdpp .bdpp-buybox { padding: 16px 14px; border-radius: 16px; box-shadow: none; }
	.bdpp .bdpp-buybox .product_title { font-size: 19px; line-height: 1.7; margin-top: 4px; }
	.bdpp .bdpp-buybox .product-english-title { font-size: 12px; }
	.bdpp .bdpp-buybox > .price,
	.bdpp .bdpp-buybox .woocommerce-variation-price .price { font-size: 22px; margin-top: 10px; }
	.bdpp .bdpp-expiry { padding: 8px 10px; font-size: 13px; gap: 6px; }
	.bdpp .bdpp-expiry b { font-size: 15px; }
	.bdpp .bdpp-expiry__left { font-size: 11.5px; padding: 1px 8px; }
	.bdpp .bdpp-features { padding: 10px 12px; }
	.bdpp .bdpp-features__list li { font-size: 13px; }
	.bdpp .bdpp-macros { gap: 6px; }
	.bdpp .bdpp-macro { padding: 10px 4px; border-radius: 12px; }
	.bdpp .bdpp-macro strong { font-size: 17px; }
	.bdpp .bdpp-macro small { font-size: 11px; }
	.bdpp .bdpp-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.bdpp .bdpp-trust li { padding: 8px 4px; font-size: 11px; }
	.bdpp .bdpp-trust svg { width: 20px; height: 20px; }
	.bdpp .bdpp-shipping__cost,
	.bdpp .bdpp-shipping__today { font-size: 12.5px; padding: 9px 10px; }
	.bdpp .bdpp-h2 { font-size: 18px; }
	.bdpp .bdpp-band { padding: 18px 14px; border-radius: 20px; gap: 18px; }
	.bdpp .bdpp-calc { padding: 14px; }
	.bdpp .bdpp-bar { grid-template-columns: 84px minmax(0, 1fr) 60px; font-size: 13px; gap: 8px; }
	.bdpp .bdpp-bundle { padding: 14px; }
	.bdpp .bdpp-bundle__item { width: calc(50% - 5px); }
	.bdpp .bdpp-bundle__plus { display: none; }
	.bdpp .woocommerce-tabs .panel { padding: 16px 14px !important; }
	.bdpp .bdpp-section__body { padding: 16px 14px; }
	.bdpp { --bd-clamp: 420px; }
	.bdpp .woocommerce-tabs .bdpp-desc-more { margin: 0 auto 16px; }
	.bdpp .bdpp-section__inner + .bdpp-desc-more { margin: 14px auto 0; }
	body.bdpp-page .bdpp table.shop_attributes th { width: 40%; }
	body.bdpp-page .bdpp table.shop_attributes th,
	body.bdpp-page .bdpp table.shop_attributes td { padding: 10px 8px; }
	.bdpp .woocommerce-tabs ul.tabs li a { padding: 14px 10px !important; font-size: 14px; }
	.bdpp .bdpp-reviews__body { padding: 14px; }
	.bdpp .bdpp-faq summary { padding: 14px; font-size: 14px; }
	.bdpp .bdpp-faq__a { padding: 0 14px 14px; }
	.bdpp-sticky__inner { padding: 8px 12px; gap: 10px; }
	.bdpp-sticky__thumb,
	.bdpp-sticky__name { display: none; }
	.bdpp-sticky__price { margin-inline-start: 0; font-size: 15px; }
	.bdpp-sticky .bdpp-btn { flex: 1; min-height: 46px; }
}


/* ================= 1.0.8 ================= */

/* Desktop: same content width as the shop/category pages (the theme adds 100px side padding on product pages only). */
@media (min-width: 922px) {
	body.bdpp-page #content .ast-woocommerce-container { padding-left: 0 !important; padding-right: 0 !important; }
}

/* Rating under the title (links to the reviews) — the theme's own copy in the buy box is hidden. */
.bdpp .bdpp-buybox .woocommerce-product-rating { display: none !important; }
.bdpp .bdpp-rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 4px;
	font-size: 13px;
	color: var(--bd-ink);
	text-decoration: none !important;
}
.bdpp .bdpp-rating b { font-size: 15px; font-weight: 900; }
.bdpp .bdpp-rating__count { color: var(--bd-indigo); text-decoration: underline; text-underline-offset: 3px; }
.bdpp .bdpp-rating:hover .bdpp-rating__count { color: var(--bd-ink); }

/* Expiry of variable products: right under the flavour/size choices. */
.bdpp .bdpp-expiry-slot--variation:empty { display: none; }
.bdpp .bdpp-expiry-slot--variation { margin: 4px 0 12px; }
.bdpp .bdpp-expiry-slot--variation .bdpp-expiry { margin: 0; }

/* View counter («بازدید») is not shown. */
.bdpp .product_views,
.bdpp .product_meta .product_views { display: none !important; }

/* Out of stock: a clear boxed notice instead of the bare word «ناموجود». */
.bdpp .bdpp-buybox p.stock.out-of-stock,
.bdpp .bdpp-buybox .ast-stock-detail .stock.out-of-stock,
.bdpp .bdpp-buybox .woocommerce-variation-availability .stock.out-of-stock {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 12px 0 !important;
	padding: 12px 14px !important;
	border: 1px solid #ffc2cf;
	border-radius: 14px;
	background: #fff1f4;
	color: #b0203f !important;
	font-size: 15px !important;
	font-weight: 900;
	line-height: 1.6;
}
.bdpp .bdpp-buybox .stock.out-of-stock::before {
	content: "✕";
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--bd-red);
	color: #fff;
	font-size: 13px;
	line-height: 26px;
	text-align: center;
}
.bdpp .bdpp-oos-help { margin: -4px 0 14px; font-size: 13px; color: #6b6b8a; }
.bdpp .bdpp-oos-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 10px;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--bd-indigo);
	color: #fff !important;
	font-weight: 800;
	text-decoration: none !important;
}
.bdpp .bdpp-oos-link:hover { background: var(--bd-ink); }
/* wcmmq prints its own copy of the stock text — one box is enough. */
.bdpp .bdpp-buybox:has(.stock.out-of-stock) .wcmmq-custom-stock-msg { display: none !important; }

/* «در هر پیمانه چه می‌گیرید؟» on desktop: no big empty area under the bars. */
@media (min-width: 922px) {
	.bdpp .bdpp-band { align-items: center; padding: 28px 32px; }
	.bdpp .bdpp-band__bars .bdpp-bars { gap: 18px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas: "h h" "s s" "l l" "p q" "o o" "t t";
		column-gap: 12px;
	}
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc > h3 { grid-area: h; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__sub { grid-area: s; margin-bottom: 10px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__label { grid-area: l; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__picker { grid-area: p; gap: 10px; padding: 4px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__picker button { width: 40px; height: 40px; font-size: 20px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__value { font-size: 24px; min-width: 28px; text-align: center; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__quick { grid-area: q; margin-top: 0; align-self: stretch; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__quick button { font-size: 12px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__out { grid-area: o; margin-top: 12px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__out > div { padding: 8px 10px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__out strong { font-size: 20px; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__tip { grid-area: t; }
}

/* ================= 1.0.13: colour roles =================
   Pink-red  = buy (only the add-to-cart buttons).
   Mint      = good news, used sparingly.
   Amber     = warnings (low stock, out of stock). The expiry badge is always neutral.
   Indigo    = information. */
.bdpp, .bdpp-sticky {
	--bd-cta: #e6005a;
	--bd-cta-hover: #c8004e;
	--bd-warn-bg: #fff7e6;
	--bd-warn-line: #fcd9a0;
	--bd-warn-text: #9a4a00;
	--bd-warn: #f59e0b;
	--bd-lav: #b8b8ff;
}
/* Buy buttons */
.bdpp .bdpp-buybox .single_add_to_cart_button,
.bdpp .bdpp-btn,
.bdpp-sticky .bdpp-btn {
	background: var(--bd-cta) !important;
	color: #fff !important;
	font-size: 17px !important;
	box-shadow: 0 12px 24px -12px rgba(230, 0, 90, .75) !important;
}
.bdpp .bdpp-buybox .single_add_to_cart_button:hover,
.bdpp .bdpp-btn:hover,
.bdpp-sticky .bdpp-btn:hover { background: var(--bd-cta-hover) !important; filter: none; }
.bdpp .bdpp-buybox .single_add_to_cart_button:focus-visible,
.bdpp .bdpp-btn:focus-visible,
.bdpp-sticky .bdpp-btn:focus-visible { outline: 3px solid var(--bd-indigo); outline-offset: 2px; }

/* Warnings → amber */
.bdpp .bdpp-buybox .bdpp-stock--low { background: var(--bd-warn-bg); border-color: var(--bd-warn-line); color: var(--bd-warn-text) !important; }
.bdpp .bdpp-buybox .bdpp-stock__icon { background: var(--bd-warn); color: var(--bd-ink); animation-name: bdpp-pulse-warn; }
@keyframes bdpp-pulse-warn {
	0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); }
	50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
.bdpp .bdpp-buybox .ast-stock-detail .stock.out-of-stock,
.bdpp .bdpp-buybox .woocommerce-variation-availability .stock.out-of-stock,
.bdpp .bdpp-buybox p.stock.out-of-stock { background: var(--bd-warn-bg); border-color: var(--bd-warn-line); color: var(--bd-warn-text) !important; }
.bdpp .bdpp-buybox .stock.out-of-stock::before { background: #d97706; }

/* Less mint around the button */
.bdpp .bdpp-macro strong { color: #fff; }
.bdpp .bdpp-per-serving { background: var(--bd-indigo-50); color: var(--bd-indigo); border-color: #b9b9f3; }
.bdpp .bdpp-expiry.is-good { background: #f7f8fc; border-color: var(--bd-line); color: var(--bd-text); }
.bdpp .bdpp-expiry.is-good .bdpp-expiry__left { background: var(--bd-indigo-50); color: var(--bd-indigo); }
.bdpp .bdpp-features__list li::before {
	background: var(--bd-indigo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.bdpp .bdpp-buybox .stock.in-stock,
.bdpp .bdpp-buybox .ast-stock-detail .stock:not(.out-of-stock) { color: var(--bd-muted) !important; }

/* Nutrition band (dark background): lavender instead of mint */
.bdpp .bdpp-bar__val,
.bdpp .bdpp-calc__out strong,
.bdpp .bdpp-calc__picker button { color: var(--bd-lav); }
.bdpp .bdpp-calc__quick button.is-on { background: var(--bd-lav); color: var(--bd-ink); }

/* 1.0.14: «افزودن ۳ بسته به سبد» under the calculator tip */
.bdpp .bdpp-calc__cta { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 10px; min-height: 48px; }
.bdpp .bdpp-calc__cta[hidden] { display: none !important; }
@media (min-width: 922px) {
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc { grid-template-areas: "h h" "s s" "l l" "p q" "o o" "t t" "c c"; }
	.bdpp .bdpp-band:not(.bdpp-band--single) .bdpp-calc__cta { grid-area: c; }
}

/* 1.0.16: tabs scroll sideways instead of being cut off (mostly a phone problem) */
.bdpp .woocommerce-tabs { overflow: visible; }
.bdpp .woocommerce-tabs ul.tabs {
	flex-wrap: nowrap !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	border-top-left-radius: var(--bd-r);
	border-top-right-radius: var(--bd-r);
}
.bdpp .woocommerce-tabs ul.tabs::-webkit-scrollbar { height: 0; }
.bdpp .woocommerce-tabs ul.tabs li { scroll-snap-align: end; flex: 0 0 auto; }
/* Fades on the side(s) that have more tabs, so it is clear the strip can be swiped. */
.bdpp .woocommerce-tabs .bdpp-tabs-wrap { position: relative; }
.bdpp .woocommerce-tabs .bdpp-tabs-wrap::before,
.bdpp .woocommerce-tabs .bdpp-tabs-wrap::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 1px;
	width: 34px;
	pointer-events: none;
	opacity: 0;
	transition: opacity .2s;
	z-index: 2;
}
.bdpp .woocommerce-tabs .bdpp-tabs-wrap::before { left: 0; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.bdpp .woocommerce-tabs .bdpp-tabs-wrap::after { right: 0; background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0)); }
.bdpp .woocommerce-tabs .bdpp-tabs-wrap.has-left::before,
.bdpp .woocommerce-tabs .bdpp-tabs-wrap.has-right::after { opacity: 1; }
@media (max-width: 600px) {
	.bdpp .woocommerce-tabs ul.tabs { padding: 0 8px !important; }
	.bdpp .woocommerce-tabs ul.tabs li a { padding: 13px 12px !important; }
}

/* 1.0.17: «قیمت و موجودی: بروزرسانی … » under the price */
.bdpp .bdpp-fresh {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 2px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--bd-muted);
}
.bdpp .bdpp-fresh__ico { font-size: 13px; color: var(--bd-indigo); }
.bdpp .bdpp-fresh.is-plain { font-weight: 600; }

/* 1.0.18: mobile fixes */
/* The freshness line always sits on its own row (it used to run on after the price / per-serving badge). */
.bdpp .bdpp-fresh { display: flex; width: 100%; flex-basis: 100%; }
/* Four trust boxes: 2×2 on phones (three columns left one box alone on its own row). */
@media (max-width: 600px) {
	.bdpp .bdpp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.bdpp .bdpp-trust li { padding: 10px 6px; font-size: 11.5px; line-height: 1.5; }
}
@media (min-width: 601px) and (max-width: 921px) {
	.bdpp .bdpp-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
