/* ==========================================================================
   Single product widgets: badges, short specs, installment, add to cart.
   ========================================================================== */

/* Badges */
.haminart-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.haminart-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	min-height: 19px;
	padding: 0 7px;
	font-size: 10px;
	font-weight: 700;
	line-height: 19px;
	border-radius: 31px;
}

.haminart-badge svg {
	width: 13px;
	height: 13px;
}

.haminart-badge--rating {
	font-size: 12.58px;
	font-weight: 600;
	color: #858484;
	background: #ececec;
}

.haminart-badge--rating svg {
	color: #c8c8c8;
	fill: currentColor;
}

.haminart-badge--sale {
	min-height: 22.6px;
	padding: 0 6px;
	font-size: 14.28px;
	line-height: 22.6px;
	color: #fff;
	background: #ff2950;
}

.haminart-badge--stock {
	font-weight: 700;
	color: #269368;
	background: #c7ffe9;
}

.haminart-badge--out {
	font-weight: 400;
	color: var(--haminart-gray);
	background: #f1f1f1;
}

/* Short specs pill */
/* Figma: rounded outline box, the title sits on the top border like a fieldset legend. */
.haminart-specs-pill {
	position: relative;
	padding-top: 11px;
}

.haminart-specs-pill__title {
	position: absolute;
	top: 0;
	inset-inline-start: 26px;
	z-index: 1;
	margin: 0;
	padding: 0 6px;
	font-size: 14px;
	font-weight: 800;
	line-height: 22px;
	color: #797979;
	background: var(--haminart-specs-bg, #fff);
}

.haminart-specs-pill__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 34px;
	min-height: 55px;
	margin: 0;
	padding: 12px 32px 10px;
	list-style: none;
	border: 1px solid #efefef;
	border-radius: 60px;
}

.haminart-specs-pill__list li {
	position: relative;
	white-space: nowrap;
	padding-inline-start: 12px;
	font-size: 12.54px;
	line-height: 1.6;
	color: #797979;
}

.haminart-specs-pill__list li::before {
	content: "";
	position: absolute;
	top: 50%;
	inset-inline-start: 0;
	width: 4px;
	height: 4px;
	background: #797979;
	border-radius: 50%;
	transform: translateY(-50%);
}

/* Installment */
.haminart-installment {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	gap: 10px;
	min-height: 55px;
	margin: 11px 0 0;
	padding: 8px 30px;
	font-size: 12.54px;
	line-height: 1.6;
	color: #e5097f;
	background: rgba(229, 9, 127, 0.1);
	border-radius: 60px;
}

.haminart-installment__icon {
	display: inline-flex;
	color: var(--haminart-pink);
}

.haminart-installment__icon svg,
.haminart-installment__icon i {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

.haminart-installment strong {
	font-weight: 700;
	color: #e5097f;
}

/* Add to cart ------------------------------------------------------------ */
.haminart-atc form.cart {
	margin: 0;
}

.haminart-atc table.variations {
	width: auto;
	margin: 0 0 22px;
	border: 0;
	border-collapse: collapse;
}

.haminart-atc table.variations tr {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-bottom: 10px;
}

.haminart-atc table.variations th,
.haminart-atc table.variations td {
	padding: 0;
	text-align: start;
	background: none;
	border: 0;
}

.haminart-atc table.variations th label {
	font-size: 14px;
	font-weight: 700;
	color: #4d4d4d;
}

.haminart-atc table.variations th label::after {
	content: ":";
}

.haminart-atc table.variations td.value {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.haminart-atc.has-pills .haminart-pills__select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

.haminart-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.haminart-atc .haminart-pill {
	min-width: 51px;
	height: 26px;
	padding: 0 12px;
	font-family: inherit;
	font-size: 10px;
	font-weight: 500;
	line-height: 24px;
	color: #868686;
	cursor: pointer;
	background: #fff;
	border: 1px solid #d2d2d2;
	border-radius: 500px;
	transition: all 0.2s;
}

.haminart-atc .haminart-pill:hover {
	border-color: var(--haminart-pink);
}

.haminart-atc .haminart-pill.is-active {
	font-weight: 700;
	color: #fff;
	background: var(--haminart-pink);
	border-color: var(--haminart-pink);
}

.haminart-atc .haminart-pill:disabled {
	cursor: not-allowed;
	opacity: 0.4;
	text-decoration: line-through;
}

.haminart-atc .reset_variations {
	display: none !important;
}

.haminart-atc .woocommerce-variation-price {
	display: none;
}

.haminart-atc .woocommerce-variation-availability p {
	margin: 0 0 10px;
	font-size: 12px;
}

/* The buy bar */
.haminart-atc .woocommerce-variation-add-to-cart,
.haminart-atc form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	min-height: 68px;
	padding: 0 0 0 15px;
	background: #f9f9f9;
	border-radius: 15px;
}

.haminart-atc__price {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-inline-end: auto;
}

.haminart-atc__price-sign {
	font-size: 25px;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}

.haminart-atc__price-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 68px;
	font-size: 25px;
	font-weight: 700;
	color: #898484;
	background: #efefef;
	border-radius: 15px 15px 15px 0;
}

.haminart-atc__price-icon svg {
	width: 24px;
	height: 24px;
}

.haminart-atc__price-value {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

/* Figma: old price on top, sale price under it. */
.haminart-atc__price-value del {
	order: 1;
}

.haminart-atc__price-value ins {
	order: 2;
}

.haminart-atc__price-value {
	line-height: 1.79;
}

.haminart-atc__price-value del {
	position: relative;
	display: inline-block;
	font-size: 17.35px;
	font-weight: 300;
	line-height: 1.5;
	color: #626262;
	text-decoration: none;
	opacity: 0.6;
}

/* Figma: a thin slanted line across the old price and its تومان (not a flat line-through). */
.haminart-atc__price-value del::after {
	content: "";
	position: absolute;
	top: 52%;
	right: 2px;
	left: 2px;
	height: 0.9px;
	background: #626262;
	transform: rotate(-4deg);
	pointer-events: none;
}

.haminart-atc__price-value del .woocommerce-Price-amount,
.haminart-atc__price-value del bdi {
	text-decoration: none;
}

.haminart-atc__price-value del .woocommerce-Price-currencySymbol {
	font-size: 13px;
	font-weight: 400;
}

.haminart-atc__price-value ins,
.haminart-atc__price-value > .woocommerce-Price-amount {
	font-size: 18.55px;
	font-weight: 700;
	color: #e5097f;
	text-decoration: none;
	background: none;
}

.haminart-atc__price-value .woocommerce-Price-currencySymbol {
	margin-inline-start: 3px;
	font-size: 12.97px;
}

.haminart-qty {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 45px;
	padding: 0 15px 0 12px;
	font-size: 11px;
	letter-spacing: -0.04em;
	font-weight: 700;
	color: #535353;
	background: rgba(143, 143, 143, 0.1);
	border-radius: 42px;
}

.haminart-qty__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.haminart-qty__label svg,
.haminart-qty__label i {
	flex: none;
	width: 12px;
	height: 12px;
	font-size: 12px;
}

.haminart-qty .quantity {
	display: flex;
	align-items: center;
	width: 65px;
	height: 26px;
	padding: 0 4px;
	background: #dbdbdb;
	border-radius: 41px;
}

.haminart-qty .quantity input.qty {
	width: 20px;
	height: 26px;
	padding: 0;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #424242;
	text-align: center;
	background: none;
	border: 0;
	-moz-appearance: textfield;
}

.haminart-qty .quantity input.qty::-webkit-inner-spin-button,
.haminart-qty .quantity input.qty::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.haminart-atc .haminart-step {
	flex: 1;
	width: auto;
	height: 26px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: #424242;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 50%;
}

.haminart-atc .single_add_to_cart_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 151px;
	min-height: 44px;
	padding: 0 18px 0 16px !important;
	line-height: 29.59px !important;
	letter-spacing: -0.06em;
	font-family: inherit;
	font-size: 12.68px !important;
	font-weight: 900 !important;
	color: #fff !important;
	background: #e5097f !important;
	border: 0;
	border-radius: 23px !important;
	box-shadow: 0 4.4px 24.6px rgba(128, 128, 128, 0.29);
	transition: filter 0.2s;
}

.haminart-atc .single_add_to_cart_button:hover {
	filter: brightness(1.08);
}

.haminart-atc .single_add_to_cart_button.disabled {
	opacity: 0.5;
}

.haminart-atc__icon {
	display: inline-flex;
	order: 2;
}

.haminart-atc__icon svg,
.haminart-atc__icon i {
	width: 17px;
	height: 17px;
	font-size: 17px;
}

@media (max-width: 767px) {
	.haminart-atc__price {
		width: 100%;
	}

	.haminart-qty {
		flex: 1;
		justify-content: space-between;
	}

	.haminart-atc .single_add_to_cart_button {
		justify-content: center;
		width: 100%;
	}

	.haminart-specs-pill__list {
		gap: 8px 20px;
		padding: 14px 18px;
		border-radius: 24px;
	}
}

/* Mobile buy bar (single-product-responsive.svg): [$ | price | qty] in one 44px bar, pink button below. */
@media (max-width: 767px) {
	.haminart-atc .woocommerce-variation-add-to-cart,
	.haminart-atc form.cart:not(.variations_form) {
		position: relative;
		isolation: isolate;
		flex-wrap: wrap;
		gap: 0 8px;
		min-height: 0;
		padding: 0;
		background: none;
	}

	.haminart-atc .woocommerce-variation-add-to-cart::before,
	.haminart-atc form.cart:not(.variations_form)::before {
		content: "";
		position: absolute;
		inset: 0 0 auto 0;
		z-index: -1;
		height: 44px;
		background: #f9f9f9;
		border-radius: 15px;
	}

	.haminart-atc__price {
		flex: 1 1 auto;
		width: auto;
		height: 44px;
		margin: 0;
		gap: 10px;
	}

	.haminart-atc__price-icon {
		width: 33px;
		height: 44px;
		font-size: 18px;
		border-radius: 15px 15px 15px 0;
	}

	.haminart-atc__price-sign {
		font-size: 18px;
	}

	.haminart-atc__price-value del,
	.haminart-atc__price-value del .woocommerce-Price-amount,
	.haminart-atc__price-value del bdi {
		font-size: 8.5px;
	}

	.haminart-atc__price-value ins,
	.haminart-atc__price-value > .woocommerce-Price-amount {
		font-size: 11px;
	}

	.haminart-qty {
		flex: 0 0 auto;
		gap: 5px;
		min-height: 32px;
		margin-inline-end: 8px;
		padding: 0 8px;
		font-size: 9.5px;
		justify-content: flex-start;
	}

	.haminart-qty .quantity {
		width: 58px;
		height: 22px;
	}

	.haminart-qty .quantity input.qty {
		height: 22px;
		font-size: 12px;
	}

	.haminart-atc .haminart-step {
		height: 22px;
		font-size: 12px;
	}

	.haminart-atc .single_add_to_cart_button {
		flex: 0 0 100%;
		order: 3;
		width: 100%;
		margin-top: 14px;
	}

	.haminart-qty,
	.haminart-atc__price {
		order: 1;
	}
}

/* Mobile: installment pill spans the card; badges row sits above the gallery. */
@media (max-width: 767px) {
	.e-con.haminart-fit {
		--width: 100%;
		width: 100% !important;
		flex: 1 1 100%;
	}

	.haminart-installment,
	.haminart-installment * {
		font-size: 11px;
	}

	.haminart-badges-top {
		align-self: stretch;
	}
}

/* Add-to-cart loading state */
.haminart-atc .single_add_to_cart_button{position:relative}
.haminart-atc .single_add_to_cart_button.is-loading,
.haminart-atc .single_add_to_cart_button.loading{pointer-events:none;opacity:.85}
.haminart-atc .single_add_to_cart_button.is-loading .haminart-atc__icon,
.haminart-atc .single_add_to_cart_button.loading .haminart-atc__icon{display:none}
.haminart-atc .single_add_to_cart_button.is-loading::before,
.haminart-atc .single_add_to_cart_button.loading::before{content:"";flex:none;width:18px;height:18px;margin-inline-end:8px;border:2.5px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:haminart-atc-spin .7s linear infinite}
@keyframes haminart-atc-spin{to{transform:rotate(360deg)}}

/* Out of stock + «خبرم کن» */
.haminart-oos {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 18px;
	background: #f7f7f8;
	border: 1px solid #ececec;
	border-radius: 20px;
}

.haminart-oos__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.haminart-oos__icon {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #9a9a9a;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.haminart-oos__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.haminart-oos__text strong {
	font-size: 15px;
	font-weight: 800;
	color: #4c4c4c;
}

.haminart-oos__text span {
	font-size: 12px;
	color: #828081;
}

.haminart-oos__badge {
	flex: none;
	padding: 0 12px;
	font-size: 12px;
	font-weight: 700;
	line-height: 26px;
	color: #7f7f7f;
	background: #e9e9ea;
	border-radius: 31px;
}

.haminart-oos__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px dashed #dcdcdc;
}

.haminart-oos__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: #4c4c4c;
}

.haminart-oos__label svg {
	color: var(--haminart-pink, #e5097f);
}

.haminart-oos__row {
	display: flex;
	gap: 8px;
}

.haminart-oos .haminart-oos__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	font-size: 15px;
	text-align: left;
	color: #4c4c4c;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 14px;
	outline: 0;
	transition: border-color .2s, box-shadow .2s;
}

.haminart-oos .haminart-oos__input::placeholder {
	color: #b5b5b5;
}

.haminart-oos .haminart-oos__input:focus {
	border-color: var(--haminart-pink, #e5097f);
	box-shadow: 0 0 0 3px rgba(229, 9, 127, .12);
}

.haminart-oos .haminart-oos__btn {
	position: relative;
	flex: none;
	height: 48px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 800;
	color: #fff;
	background: var(--haminart-pink, #e5097f);
	border: 0;
	border-radius: 14px;
	cursor: pointer;
	transition: opacity .2s, transform .15s;
}

.haminart-oos .haminart-oos__btn:hover {
	opacity: .9;
}

.haminart-oos .haminart-oos__btn:active {
	transform: scale(.97);
}

.haminart-oos .haminart-oos__btn.is-loading span {
	opacity: 0;
}

.haminart-oos .haminart-oos__btn.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 18px;
	height: 18px;
	margin: auto;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: haminart-oos-spin .7s linear infinite;
}

@keyframes haminart-oos-spin {
	to { transform: rotate(360deg); }
}

.haminart-oos__msg {
	min-height: 0;
	margin: 0;
	font-size: 12.5px;
	line-height: 1.7;
}

.haminart-oos__msg:empty {
	display: none;
}

.haminart-oos__msg.is-ok {
	color: #12803c;
}

.haminart-oos__msg.is-error {
	color: #d4183d;
}

.haminart-oos.is-done .haminart-oos__row {
	display: none;
}

.haminart-oos__admin {
	margin: 0;
	padding: 10px 12px;
	font-size: 12px;
	line-height: 1.8;
	color: #8a6d00;
	background: #fff8dc;
	border-radius: 10px;
}

@media (max-width: 480px) {
	.haminart-oos {
		padding: 14px;
	}

	.haminart-oos__badge {
		display: none;
	}
}

/* stock = 1: Woo marks the wrapper .hidden; keep it visible but locked */
.haminart-qty .quantity.hidden{display:flex!important}
.haminart-qty .quantity.is-locked .haminart-step{opacity:.35;cursor:not-allowed;pointer-events:none}
.haminart-qty .quantity.is-locked input.qty{pointer-events:none}

.haminart-qty .quantity .haminart-qty-fixed{width:20px;height:26px;line-height:26px;text-align:center;font-size:14px;font-weight:600;color:#424242}
.haminart-qty .quantity.is-locked input[type=hidden]{display:none}

/* express shipping flag */
.haminart-badge--express{font-weight:700;color:#0a6fe0;background:#e3f0ff}
.haminart-badge--express svg{width:12px;height:12px}

/* equal-height badges */
.haminart-badges .haminart-badge{box-sizing:border-box;height:26px;min-height:26px;padding:0 10px;gap:5px;line-height:1;font-size:11px}
.haminart-badges .haminart-badge--sale{font-size:12px;padding:0 11px}
.haminart-badges .haminart-badge--rating{font-size:12px}
.haminart-badges .haminart-badge svg{width:14px;height:14px;flex:none}

/* price icon flush to the right edge of the buy box (top, right, bottom: no space) */
.haminart-atc__price{padding-inline-start:0!important;margin-inline-start:0!important}
.haminart-atc__price-icon{margin:0!important;align-self:stretch;height:auto!important;min-height:100%}
