/* ZHIYAR — price display + discount badge, matching the site's glass/gold aesthetic. */

/* Astra's own "فروش‌ویژه!" onsale ribbon renders independently of the
   woocommerce_sale_flash filter and was stacking with our own discount
   badge in the same corner — we only want our badge, so hide Astra's. */
.ast-on-card-button.ast-onsale-card,
span.onsale {
	display: none !important;
}

/* Minimal red discount ribbon, top corner of a shop/category-loop product
   thumbnail — see zhiyar_has_django_discount()/the woocommerce_before_shop_
   loop_item_title hook in zhiyar-pricing.php. Small rounded tag, not a big
   diagonal banner — deliberately kept lean/minimal. */
.woocommerce ul.products li.product {
	position: relative;
}

.zhiyar-loop-discount-ribbon {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	z-index: 2;
	padding: 3px 8px;
	border-radius: 6px;
	background: #dc2626;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
}

/* تومان: thinner, smaller, sitting to the left of the number with a bit of
   breathing room (currency position is right_space — see options). */
.woocommerce-Price-currencySymbol {
	font-size: 0.75em;
	font-weight: 400;
	margin-inline-start: 4px;
	color: rgba(18, 36, 28, 0.65);
}

.price,
.woocommerce-Price-amount.amount {
	font-size: 0.9em;
}

.zhiyar-no-price {
	color: rgba(18, 36, 28, 0.55);
}

/* Single-product "call for price" glass pill — see the woocommerce_get_price_html
   filter in zhiyar-customizations.php (only rendered on is_product(), never in
   shop/category/carousel loops, since those already nest inside a card link). */
.zhiyar-price-call-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: rgba(245, 240, 230, 0.55) !important;
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	backdrop-filter: blur(12px) saturate(160%);
	border: 1px solid rgba(201, 160, 84, 0.35);
	box-shadow: 0 10px 24px -14px rgba(74, 60, 46, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.6);
	color: var(--ast-global-color-2, #1a3d2e) !important;
	font-size: 0.95em;
	font-weight: 700;
	text-decoration: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.zhiyar-price-call-btn:hover {
	transform: translateY(-1px);
	background: rgba(245, 240, 230, 0.75) !important;
	box-shadow: 0 14px 30px -14px rgba(74, 60, 46, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7);
	color: var(--ast-global-color-2, #1a3d2e) !important;
}

.zhiyar-price-call-btn__icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
	color: var(--ast-global-color-1, #a9813f);
}

.zhiyar-price-call-btn__icon svg {
	width: 100%;
	height: 100%;
	stroke-width: 1.8;
}

/* ---------------------------------------------------------------------
 * Two-row price component: original price + red percent badge on top,
 * bold final price with a stacked "تو / مان" currency mark underneath.
 * Built by zhiyar_render_price_component_html() in zhiyar-pricing.php.
 * ------------------------------------------------------------------- */
.zhiyar-price-component {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.zhiyar-price-row--top {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.zhiyar-price-original {
	color: rgba(18, 36, 28, 0.45);
	font-weight: 400;
	font-size: 0.78em;
	text-decoration: line-through;
}

.zhiyar-price-original .woocommerce-Price-amount,
.zhiyar-price-original .woocommerce-Price-currencySymbol {
	color: inherit;
}

/* Red, fully-rounded percent-off pill — bold white text. */
.zhiyar-price-pct-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	background: #dc2626;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.zhiyar-price-row--final {
	display: flex;
	align-items: flex-end;
	gap: 4px;
}

/* Variable products shown at their cheapest variation's price ("از" prefix —
   see $is_range in zhiyar_render_price_component_html()). */
.zhiyar-price-from-label {
	font-size: 12px;
	font-weight: 500;
	color: rgba(18, 36, 28, 0.55);
	margin-inline-end: 1px;
}

.zhiyar-price-final-amount {
	font-size: 22px;
	font-weight: 800;
	color: #1a2a58;
	line-height: 1;
}

/* "تومان" written two-storey, "تو" over "مان" — Digikala-style logotype, on
   the left of the price, sized/line-height'd tight enough to match the
   number's height. */
.zhiyar-price-currency-stack {
	display: inline-flex;
	flex-direction: column;
	line-height: 1;
	font-size: 10px;
	font-weight: 600;
	color: #1a2a58;
	margin-inline-start: 2px;
}

.single-product .summary .zhiyar-price-final-amount {
	font-size: 30px;
}

.single-product .summary .zhiyar-price-currency-stack {
	font-size: 13px;
}

/* Shop / category archive: desktop cards are wide enough for the full
   two-row price, but tablet (3-up) and mobile (2-up) need the same
   single-line, smaller-font treatment as the homepage grid. */
@media (max-width: 991px) {
	body.woocommerce-shop .zhiyar-price-component,
	body.tax-product_cat .zhiyar-price-component,
	body.post-type-archive-product .zhiyar-price-component {
		flex-direction: row;
		align-items: baseline;
		flex-wrap: wrap;
		gap: 5px;
	}

	body.woocommerce-shop .zhiyar-price-row--top,
	body.tax-product_cat .zhiyar-price-row--top,
	body.post-type-archive-product .zhiyar-price-row--top,
	body.woocommerce-shop .zhiyar-price-row--final,
	body.tax-product_cat .zhiyar-price-row--final,
	body.post-type-archive-product .zhiyar-price-row--final {
		display: contents;
	}

	body.woocommerce-shop .zhiyar-price-original,
	body.tax-product_cat .zhiyar-price-original,
	body.post-type-archive-product .zhiyar-price-original {
		font-size: 13px;
		color: rgba(18, 36, 28, 0.6);
		text-decoration-thickness: 1.5px;
		text-decoration-color: rgba(18, 36, 28, 0.7);
	}

	body.woocommerce-shop .zhiyar-price-pct-badge,
	body.tax-product_cat .zhiyar-price-pct-badge,
	body.post-type-archive-product .zhiyar-price-pct-badge {
		font-size: 11px;
		padding: 2px 8px;
	}

	body.woocommerce-shop .zhiyar-price-from-label,
	body.tax-product_cat .zhiyar-price-from-label,
	body.post-type-archive-product .zhiyar-price-from-label {
		font-size: 11px;
	}

	body.woocommerce-shop .zhiyar-price-final-amount,
	body.tax-product_cat .zhiyar-price-final-amount,
	body.post-type-archive-product .zhiyar-price-final-amount {
		font-size: 17px;
	}

	body.woocommerce-shop .zhiyar-price-currency-stack,
	body.tax-product_cat .zhiyar-price-currency-stack,
	body.post-type-archive-product .zhiyar-price-currency-stack {
		font-size: 9px;
	}
}

@media (max-width: 599px) {
	body.woocommerce-shop .zhiyar-price-original,
	body.tax-product_cat .zhiyar-price-original,
	body.post-type-archive-product .zhiyar-price-original {
		font-size: 12px;
	}

	body.woocommerce-shop .zhiyar-price-pct-badge,
	body.tax-product_cat .zhiyar-price-pct-badge,
	body.post-type-archive-product .zhiyar-price-pct-badge {
		font-size: 10px;
		padding: 2px 7px;
	}

	body.woocommerce-shop .zhiyar-price-from-label,
	body.tax-product_cat .zhiyar-price-from-label,
	body.post-type-archive-product .zhiyar-price-from-label {
		font-size: 10px;
	}

	body.woocommerce-shop .zhiyar-price-final-amount,
	body.tax-product_cat .zhiyar-price-final-amount,
	body.post-type-archive-product .zhiyar-price-final-amount {
		font-size: 15px;
	}

	body.woocommerce-shop .zhiyar-price-currency-stack,
	body.tax-product_cat .zhiyar-price-currency-stack,
	body.post-type-archive-product .zhiyar-price-currency-stack {
		font-size: 8px;
	}
}

/* Loop card no longer shows the below-price "انتخاب گزینه‌ها" / "افزودن به
   سبد خرید" link — the whole thumbnail is already a link to the product
   page, so clicking the image is how customers get there. */
.astra-shop-summary-wrap > a.add_to_cart_button {
	display: none !important;
}

/* Glass frame around each price display under the product name — same
   cream-glass technique as the تخصات specs chips, not a plain white box. */
.zhiyar-price-frame {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 12px;
	background: rgba(245, 240, 230, 0.55);
	-webkit-backdrop-filter: blur(10px) saturate(150%);
	backdrop-filter: blur(10px) saturate(150%);
	border: 1px solid rgba(201, 160, 84, 0.3);
	box-shadow: 0 2px 8px rgba(13, 31, 23, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
	margin: 6px 0;
}

.zhiyar-price-range-sep {
	margin: 0 4px;
	color: rgba(18, 36, 28, 0.55);
	font-weight: 500;
}

.zhiyar-price-frame--sale {
	border-color: rgba(73, 121, 73, 0.35);
}
