/* ==========================================================================
   ALO Print – جدول تعرفه پرینت  (front-end)
   White-first, ALO Print palette: dark warm ink + red accent + green "save".
   Every colour/size is a custom property on .aptt so the Elementor widget
   can override it per-instance via {{WRAPPER}} .aptt { --aptt-*: … }.
   ========================================================================== */

.aptt {
	--aptt-font: inherit;

	--aptt-primary: #df1820;
	--aptt-primary-dark: #b3131a;
	--aptt-primary-light: #f24a4f;
	--aptt-primary-soft: #fdecec;

	--aptt-ink: #2d2727;
	--aptt-heading: #211a1a;
	--aptt-muted: #8a8080;
	--aptt-faint: #a8a1a1;

	--aptt-card-bg: #ffffff;
	--aptt-surface: #ffffff;
	--aptt-border: #ececec;
	--aptt-border-strong: #e0e0e0;
	--aptt-track: #f4f4f5;

	--aptt-radius-lg: 24px;
	--aptt-radius-md: 16px;
	--aptt-radius-sm: 12px;
	--aptt-radius-pill: 999px;

	--aptt-shadow: 0 20px 46px -22px rgba(45, 39, 39, .18), 0 4px 12px -6px rgba(45, 39, 39, .06);
	--aptt-shadow-sm: 0 10px 24px -16px rgba(45, 39, 39, .18), 0 2px 6px -4px rgba(45, 39, 39, .05);
	--aptt-shadow-hover: 0 26px 54px -20px rgba(45, 39, 39, .24);
	--aptt-shadow-red: 0 10px 22px -10px rgba(223, 24, 32, .4);

	--aptt-strike: #e2464b;
	--aptt-final: var(--aptt-primary);
	--aptt-union-color: var(--aptt-faint);

	--aptt-save-bg: #eaf7ef;
	--aptt-save-color: #12915a;
	--aptt-save-strong: #0f7d4d;

	--aptt-gap: 18px;
	--aptt-ease: cubic-bezier(.22, .61, .36, 1);

	box-sizing: border-box;
	direction: rtl;
	text-align: right;
	font-family: var(--aptt-font);
	color: var(--aptt-ink);
	container-type: inline-size;
	container-name: aptt;
	-webkit-tap-highlight-color: transparent;
}

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

/* `[hidden]` must always win — .aptt__cards has its own display, which would
   otherwise beat the UA `[hidden]{display:none}` rule by source order. */
.aptt [hidden] {
	display: none !important;
}

/* ---------- Card shell ---------- */
.aptt__card {
	position: relative;
	padding: 22px 18px 24px;
	border: 1px solid var(--aptt-border);
	border-radius: var(--aptt-radius-lg);
	background: var(--aptt-card-bg);
	box-shadow: var(--aptt-shadow);
	overflow: visible;
}

/* ---------- Header ---------- */
.aptt__header {
	display: flex;
	align-items: center;
	gap: 13px;
	margin-bottom: 18px;
}

.aptt__header-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--aptt-radius-pill);
	color: #fff;
	background: linear-gradient(135deg, var(--aptt-primary-light), var(--aptt-primary));
	box-shadow: 0 8px 18px -8px rgba(223, 24, 32, .55);
}

.aptt__heading-wrap {
	min-width: 0;
}

.aptt__title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.35;
	color: var(--aptt-heading);
	letter-spacing: -.3px;
}

.aptt__subtitle {
	margin: 5px 0 0;
	font-size: 12.5px;
	line-height: 1.7;
	color: var(--aptt-muted);
}

/* ---------- Body ---------- */
.aptt__body {
	display: flex;
	flex-direction: column;
	gap: var(--aptt-gap);
}

/* ---------- Size tabs ---------- */
.aptt__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aptt__size-btn {
	flex: 1 1 116px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	border-radius: var(--aptt-radius-pill);
	-webkit-appearance: none;
	appearance: none;
	transition: transform .18s var(--aptt-ease), color .18s, border-color .18s, box-shadow .18s;
}

/* Doubled class + explicit :hover/:focus beat theme / Elementor `button{}` resets.
   `background-image` fill sits on top of `background-color`, defeating even
   aggressive `button{background-color:… !important}` rules. */
.aptt__size-btn.aptt__size-btn,
.aptt__size-btn.aptt__size-btn:hover,
.aptt__size-btn.aptt__size-btn:focus {
	color: var(--aptt-heading);
	background-color: var(--aptt-card-bg);
	background-image: linear-gradient(var(--aptt-card-bg), var(--aptt-card-bg));
	border: 1.5px solid var(--aptt-border-strong);
}

.aptt__size-btn.aptt__size-btn:hover {
	transform: translateY(-1px);
	border-color: var(--aptt-muted);
	box-shadow: var(--aptt-shadow-sm);
}

.aptt__size-btn.aptt__size-btn.is-active,
.aptt__size-btn.aptt__size-btn.is-active:hover,
.aptt__size-btn.aptt__size-btn.is-active:focus {
	color: #fff;
	background-color: var(--aptt-primary);
	background-image: linear-gradient(var(--aptt-primary), var(--aptt-primary));
	border-color: transparent;
	box-shadow: var(--aptt-shadow-red);
}

/* ---------- Colour selector ---------- */
.aptt__color-wrap {
	background: var(--aptt-track);
	border: 1px solid var(--aptt-border);
	border-radius: var(--aptt-radius-md);
	padding: 7px;
}

.aptt__colors {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
	gap: 7px;
}

.aptt__color-cell {
	position: relative;
	min-width: 0;
}

.aptt__color-btn {
	position: relative;
	width: 100%;
	min-height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px 32px 10px 14px; /* corner room for check + tip */
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	cursor: pointer;
	border-radius: var(--aptt-radius-sm);
	-webkit-appearance: none;
	appearance: none;
	transition: transform .18s var(--aptt-ease), color .18s, border-color .18s, box-shadow .18s;
}

.aptt__color-btn.aptt__color-btn,
.aptt__color-btn.aptt__color-btn:hover,
.aptt__color-btn.aptt__color-btn:focus {
	color: var(--aptt-heading);
	background-color: var(--aptt-surface);
	background-image: linear-gradient(var(--aptt-surface), var(--aptt-surface));
	border: 1.5px solid var(--aptt-border);
}

.aptt__color-btn.aptt__color-btn:hover {
	transform: translateY(-1px);
	border-color: var(--aptt-muted);
	box-shadow: var(--aptt-shadow-sm);
}

.aptt__color-label {
	white-space: normal;
	word-break: break-word;
}

.aptt__color-btn.aptt__color-btn.is-active,
.aptt__color-btn.aptt__color-btn.is-active:hover,
.aptt__color-btn.aptt__color-btn.is-active:focus {
	color: #fff;
	background-color: var(--aptt-primary);
	background-image: linear-gradient(var(--aptt-primary), var(--aptt-primary));
	border-color: transparent;
	box-shadow: var(--aptt-shadow-red);
}

.aptt__color-check {
	position: absolute;
	inset-inline-start: 8px;
	top: 50%;
	transform: translateY(-50%) scale(0) rotate(-25deg);
	transition: transform .26s var(--aptt-ease);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: var(--aptt-radius-pill);
	background: #fff;
	color: var(--aptt-primary);
	box-shadow: 0 2px 7px rgba(0, 0, 0, .16);
}

.aptt__color-btn.is-active .aptt__color-check {
	transform: translateY(-50%) scale(1) rotate(0);
}

/* Tooltip trigger */
.aptt__tip-trigger {
	position: absolute;
	inset-inline-end: 5px;
	top: 5px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: var(--aptt-radius-pill);
	color: var(--aptt-faint);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: color .15s, transform .15s var(--aptt-ease);
}

.aptt__tip-trigger.aptt__tip-trigger,
.aptt__tip-trigger.aptt__tip-trigger:focus {
	background-color: transparent;
	background-image: linear-gradient(var(--aptt-surface), var(--aptt-surface));
	border: 0;
}

.aptt__color-btn.is-active ~ .aptt__tip-trigger.aptt__tip-trigger {
	background-image: none;
	color: rgba(255, 255, 255, .92);
}

.aptt__tip-trigger::before {
	content: "";
	position: absolute;
	inset: -10px;
}

.aptt__tip-trigger.aptt__tip-trigger:hover,
.aptt__tip-trigger.aptt__tip-trigger[aria-expanded="true"] {
	color: var(--aptt-primary);
	background-image: linear-gradient(var(--aptt-primary-soft), var(--aptt-primary-soft));
	transform: scale(1.08);
}

.aptt__color-btn.is-active ~ .aptt__tip-trigger:hover,
.aptt__color-btn.is-active ~ .aptt__tip-trigger[aria-expanded="true"] {
	color: #fff;
	background-image: none;
}

.aptt__tip {
	position: absolute;
	top: calc(100% + 9px);
	inset-inline-start: 0;
	z-index: 30;
	width: max-content;
	max-width: min(280px, calc(100vw - 32px));
	padding: 11px 13px;
	border-radius: 13px;
	background: #2d2727;
	color: #fff;
	box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .38);
	text-align: right;
	animation: aptt-pop .18s var(--aptt-ease) both;
}

.aptt__tip::after {
	content: "";
	position: absolute;
	bottom: 100%;
	inset-inline-start: 18px;
	border: 7px solid transparent;
	border-bottom-color: #2d2727;
}

.aptt__tip-title {
	display: block;
	font-size: 12.5px;
	font-weight: 800;
	margin-bottom: 4px;
}

.aptt__tip-body {
	display: block;
	font-size: 12px;
	line-height: 1.8;
	color: rgba(255, 255, 255, .8);
}

/* ---------- Info line ---------- */
.aptt__info {
	margin: 0;
	padding: 11px 13px;
	font-size: 12.5px;
	line-height: 1.8;
	color: var(--aptt-muted);
	background: var(--aptt-track);
	border: 1px solid var(--aptt-border);
	border-radius: var(--aptt-radius-sm);
}

/* ---------- Price cards ---------- */
.aptt__cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	align-items: stretch;
}

.aptt__price-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 15px 15px 16px;
	background: var(--aptt-surface);
	border: 1px solid var(--aptt-border);
	border-radius: var(--aptt-radius-md);
	box-shadow: var(--aptt-shadow-sm);
	transition: transform .2s var(--aptt-ease), box-shadow .2s var(--aptt-ease), border-color .2s var(--aptt-ease);
}

.aptt__price-card:hover {
	transform: translateY(-3px);
	border-color: var(--aptt-border-strong);
	box-shadow: var(--aptt-shadow-hover);
}

.aptt__pc-top {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aptt__pc-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--aptt-radius-pill);
	color: var(--aptt-primary);
	background: var(--aptt-primary-soft);
}

.aptt__pc-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	min-width: 0;
}

.aptt__pc-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--aptt-heading);
}

.aptt__pc-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 700;
	border-radius: var(--aptt-radius-pill);
	color: #6f6a6a;
	background: var(--aptt-track);
}

.aptt__pc-block {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 3px;
}

.aptt__pc-label {
	margin: 0;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--aptt-muted);
	white-space: nowrap;
}

.aptt__pc-label--brand {
	color: color-mix(in srgb, var(--aptt-primary) 68%, var(--aptt-muted));
	font-weight: 700;
}

/* union: label on the start edge, struck price pushed to the end (fills width) */
.aptt__pc-block--union {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 3px 12px;
}

.aptt__pc-union {
	position: relative;
	margin: 0;
	margin-inline-start: auto;
	width: fit-content;
	max-width: 100%;
	direction: ltr;
	unicode-bidi: isolate;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--aptt-union-color);
}

.aptt__pc-union::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 54%;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: var(--aptt-strike);
	opacity: .9;
	transform-origin: inline-start;
}

.aptt__pc-unit {
	font-size: .82em;
	font-weight: 600;
}

/* final: label on the start edge, big price pushed to the end */
.aptt__pc-block--final {
	gap: 7px;
}

.aptt__pc-final-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 14px;
	width: 100%;
}

.aptt__pc-final {
	display: flex;
	align-items: baseline;
	gap: 5px;
	margin: 0;
	margin-inline-start: auto;
}

.aptt__pc-final-value {
	font-size: 27px;
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: var(--aptt-final);
}

.aptt__pc-final-unit {
	font-size: 13px;
	font-weight: 700;
	color: var(--aptt-primary);
}

.aptt__pc-savings {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px 4px 7px;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	border-radius: var(--aptt-radius-pill);
	color: var(--aptt-save-color);
	background: var(--aptt-save-bg);
}

.aptt__pc-savings-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: var(--aptt-radius-pill);
	color: #fff;
	background: var(--aptt-save-strong);
}

.aptt__pc-note {
	margin: 2px 0 0;
	font-size: 11.5px;
	line-height: 1.6;
	color: var(--aptt-muted);
}

/* ---------- Note under card ---------- */
.aptt__note {
	margin: 16px 0 0;
	font-size: 12px;
	line-height: 1.8;
	color: var(--aptt-muted);
}

/* ---------- Focus ---------- */
.aptt button:focus-visible,
.aptt [tabindex]:focus-visible {
	outline: 2px solid var(--aptt-primary);
	outline-offset: 2px;
}

/* ---------- Entrance / swap animations ---------- */
@keyframes aptt-swap-in {
	from { opacity: 0; transform: translateY(7px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes aptt-strike {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

@keyframes aptt-pop {
	from { opacity: 0; transform: translateY(-4px) scale(.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.aptt__panel.is-swap > .aptt__color-wrap,
.aptt__panel.is-swap .aptt__cards:not([hidden]),
.aptt__cards.is-swap {
	animation: aptt-swap-in .3s var(--aptt-ease) both;
}

.aptt__pc-union::after {
	animation: aptt-strike .5s var(--aptt-ease) .15s both;
}

.aptt__cards.is-swap .aptt__pc-union::after,
.aptt__panel.is-swap .aptt__pc-union::after {
	animation: aptt-strike .5s var(--aptt-ease) .2s both;
}

/* ---------- Container-query layout ---------- */
@container aptt (min-width: 560px) {
	.aptt__card {
		padding: 28px 26px 30px;
	}

	.aptt__title {
		font-size: 21px;
	}

	.aptt__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 15px;
	}

	.aptt__cards--binding {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.aptt__price-card {
		padding: 18px 18px 19px;
	}

	.aptt__pc-final-value {
		font-size: 30px;
	}
}

/* Fallback where container queries are unsupported */
@supports not (container-type: inline-size) {
	@media (min-width: 700px) {
		.aptt__cards {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
		.aptt__cards--binding {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.aptt *,
	.aptt *::before,
	.aptt *::after {
		animation-duration: .001ms !important;
		animation-delay: 0ms !important;
		transition-duration: .001ms !important;
	}

	.aptt__pc-union::after {
		transform: scaleX(1);
	}
}
