/* [CHANGE][2026-12-01] Gift-card product page (DicardoFront giftcard-standalone giftpage), scoped to .single-product--gift
 * Loaded after single-product.css on gift-card products only (Traits/main/GiftCardProduct).
 * Markup: views/main/product_page/giftcard.php, _giftcard_preview.php, _giftcard_regions.php.
 * Brand colours: data-theme-brand = Main\GiftCardPage\GiftCardTheme keys. */

.single-product--gift {
	--g1: #ec4899;
	--g2: #8b5cf6;
	--g3: #3b82f6;
	--g-rgb: 236, 72, 153;
}

/* ── Hero: preview card + title / rating / buy box ── */
.single-product--gift .gp-hero {
	display: grid;
	grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin-bottom: 26px;
}
.single-product--gift .gp-hero__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.single-product--gift .gp-hero__info .sp__header {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}
/* The logo already sits on the preview card */
.single-product--gift .gp-hero__info .sp__header-icon {
	display: none;
}
.single-product--gift .gp-hero__info .sp__checkout {
	margin: 0;
}

/* ── Preview card ── */
.single-product--gift .gp-card {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 12px;
	aspect-ratio: 1.6 / 1;
	padding: 22px 24px;
	border-radius: 22px;
	color: #fff;
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(135deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 100%);
	box-shadow: 0 22px 44px -14px rgba(var(--g-rgb), 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
}
.single-product--gift .gp-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 45%), radial-gradient(circle at 80% 85%, rgba(0, 0, 0, 0.22) 0%, transparent 55%);
	pointer-events: none;
}
.single-product--gift .gp-card::after {
	content: "";
	position: absolute;
	top: 0;
	left: -60%;
	z-index: 1;
	width: 50%;
	height: 100%;
	background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
	transform: skewX(-20deg);
	animation: gp-card-shine 6s ease-in-out infinite;
	pointer-events: none;
}
@keyframes gp-card-shine {
	0%,
	60% {
		left: -60%;
	}
	100% {
		left: 130%;
	}
}
@media (prefers-reduced-motion: reduce) {
	.single-product--gift .gp-card::after {
		animation: none;
		display: none;
	}
}
.single-product--gift .gp-card__top,
.single-product--gift .gp-card__mid,
.single-product--gift .gp-card__foot {
	position: relative;
	z-index: 2;
}
.single-product--gift .gp-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.single-product--gift .gp-card__logo {
	width: 58px;
	height: 58px;
	margin: 0;
	padding: 5px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}
.single-product--gift .gp-card__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 9px;
}
.single-product--gift .gp-card__region {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border-radius: 20px;
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(8px);
	font-size: var(--space-12);
	font-weight: 800;
}
.single-product--gift .gp-card__mid {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 4px;
	min-width: 0;
}
.single-product--gift .gp-card__mid small {
	direction: ltr;
	font-size: var(--space-10);
	font-weight: 800;
	letter-spacing: 0.4em;
	color: rgba(255, 255, 255, 0.8);
}
.single-product--gift .gp-card__mid strong {
	max-width: 100%;
	font-size: var(--space-22);
	font-weight: 900;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.single-product--gift .gp-card__amount {
	margin-top: 4px;
	padding: 5px 14px;
	max-width: 100%;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.25);
	color: #1a1a2e;
	font-size: var(--space-16);
	font-weight: 900;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.single-product--gift .gp-card__amount:empty {
	display: none;
}
.single-product--gift .gp-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-top: 10px;
	border-top: 1px dashed rgba(255, 255, 255, 0.3);
	font-family: "Courier New", monospace;
	font-size: var(--space-11);
	font-weight: 700;
	color: rgba(255, 255, 255, 0.8);
}
.single-product--gift .gp-card__brand {
	font-family: inherit;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* The site's dark theme colours every span inside .single-product; the card keeps its own colours */
.single-product.single-product--gift .gp-card span {
	color: #fff;
}
.single-product.single-product--gift .gp-card .gp-card__amount {
	color: #1a1a2e;
}
.single-product.single-product--gift .gp-card .gp-card__foot > span:first-child {
	color: rgba(255, 255, 255, 0.8);
}

/* ── Step headings (regions = 1, amounts = 2) ── */
.single-product--gift .gp-step {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}
.single-product--gift .gp-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--g1), var(--g2));
	box-shadow: 0 6px 14px -6px rgba(var(--g-rgb), 0.6);
	color: #fff;
	font-weight: 900;
}
.single-product--gift .gp-step h2 {
	margin: 0;
	font-size: var(--space-16);
	font-weight: 900;
}
.single-product--gift .gp-step small {
	color: var(--text-muted);
	font-size: var(--space-12);
	font-weight: 600;
}
.single-product--gift .gp-step small a {
	color: var(--violet-600);
	font-weight: 800;
	text-decoration: none;
}

/* ── Region links ── */
.single-product--gift .gp-regions {
	margin-bottom: 24px;
	padding-top: 22px;
	border-top: 1px solid var(--violet-125);
}
.single-product--gift .gp-regions__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.single-product--gift .gp-region {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--violet-150);
	border-radius: 14px;
	background: #faf9fd;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.single-product--gift .gp-region:hover {
	border-color: var(--violet-300);
	transform: translateY(-2px);
}
.single-product--gift .gp-region.is-active {
	border-color: transparent;
	background: linear-gradient(135deg, var(--g1), var(--g2));
	box-shadow: 0 10px 22px -10px rgba(var(--g-rgb), 0.7);
	color: #fff;
}
.single-product--gift .gp-region__ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: rgba(var(--g-rgb), 0.12);
	color: var(--g1);
}
.single-product--gift .gp-region.is-active .gp-region__ico {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}
.single-product--gift .gp-region__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.single-product--gift .gp-region__text strong {
	font-size: var(--space-13);
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.single-product--gift .gp-region__text small {
	font-size: var(--space-11);
	font-weight: 600;
	opacity: 0.8;
}

/* ── Amounts: the normal variant cards, tinted with the brand colours ── */
.single-product--gift .gp-amounts {
	padding-top: 22px;
	border-top: 1px solid var(--violet-125);
}
/* Compact amount tiles: one brand colour for every card, the name + price, details stay in «توضیحات» */
.single-product.single-product--gift .gp-amounts .spvm__list {
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}
.single-product.single-product--gift .gp-amounts .spvm__card {
	--c1: var(--g-rgb);
	--c2: var(--g-rgb);
	--c3: var(--g-rgb);
	--bg: linear-gradient(135deg, rgba(var(--g-rgb), 0.1), rgba(var(--g-rgb), 0.02)), #fff;
	--border: rgba(var(--g-rgb), 0.3);
	padding: 14px 16px;
	border-radius: 16px;
}
[data-theme=dark] .single-product.single-product--gift .gp-amounts .spvm__card {
	--bg: linear-gradient(135deg, rgba(var(--g-rgb), 0.16), rgba(var(--g-rgb), 0.04)), #0f0c2e;
}
.single-product.single-product--gift .gp-amounts .spvm__body {
	display: none;
}
/* [CHANGE][2026-12-01] Mobile tiles: full-width «توضیحات» with its text, title clear of the tick */
.single-product.single-product--gift .gp-amounts .spvm__head {
	padding-left: 26px;
}
.single-product.single-product--gift .gp-amounts .spvm__tools {
	display: flex;
	gap: 6px;
}
.single-product.single-product--gift .gp-amounts .spvm__tool {
	flex: 1 1 0;
	min-width: 0;
	padding: 6px 8px;
	font-size: var(--space-11);
}
.single-product.single-product--gift .gp-amounts .spvm__tool svg {
	width: 12px;
	height: 12px;
}
.single-product.single-product--gift .gp-amounts .sp__categories-btn.is-active {
	border-color: rgb(var(--g-rgb));
	box-shadow: 0 0 0 3px rgba(var(--g-rgb), 0.18);
}

/* The variants heading becomes step 2, after the regions */
.single-product--gift .gp-amounts .sp__variants-header h2 {
	display: flex;
	align-items: center;
	gap: 12px;
}
.single-product--gift .gp-amounts .sp__variants-header h2 > svg {
	display: none;
}
.single-product--gift .gp-amounts .sp__variants-header h2::before {
	content: "۲";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--g1), var(--g2));
	box-shadow: 0 6px 14px -6px rgba(var(--g-rgb), 0.6);
	color: #fff;
	font-weight: 900;
}
/* A product with one region shows no region step: number the amounts step 1 */
.single-product--gift .gp-hero + .gp-amounts .sp__variants-header h2::before {
	content: "۱";
}

/* ── Dark site theme ── */
[data-theme=dark] .single-product--gift .gp-region {
	border-color: var(--navy-400);
	background: var(--navy-700);
}
[data-theme=dark] .single-product--gift .gp-region.is-active {
	background: linear-gradient(135deg, var(--g1), var(--g2));
}
.single-product.single-product--gift .gp-region.is-active span {
	color: #fff;
}
[data-theme=dark] .single-product--gift .gp-regions,
[data-theme=dark] .single-product--gift .gp-amounts {
	border-color: var(--navy-400);
}
[data-theme=dark] .single-product--gift .gp-step small {
	color: #b6b3d9;
}
[data-theme=dark] .single-product--gift .gp-step small a {
	color: var(--violet-300);
}

/* ── Brand themes ── */
.single-product--gift[data-theme-brand=googleplay] {
	--g1: #16a34a;
	--g2: #ca8a04;
	--g3: #dc2626;
	--g-rgb: 34, 197, 94;
}
.single-product--gift[data-theme-brand=apple] {
	--g1: #fb7185;
	--g2: #a855f7;
	--g3: #3b82f6;
	--g-rgb: 244, 63, 94;
}
.single-product--gift[data-theme-brand=steam] {
	--g1: #1e3a8a;
	--g2: #0ea5e9;
	--g3: #0f172a;
	--g-rgb: 30, 58, 138;
}
.single-product--gift[data-theme-brand=xbox] {
	--g1: #065f46;
	--g2: #10b981;
	--g3: #064e3b;
	--g-rgb: 16, 185, 129;
}
.single-product--gift[data-theme-brand=playstation] {
	--g1: #1e40af;
	--g2: #3b82f6;
	--g3: #312e81;
	--g-rgb: 59, 130, 246;
}
.single-product--gift[data-theme-brand=razer] {
	--g1: #15803d;
	--g2: #111827;
	--g3: #000;
	--g-rgb: 68, 214, 44;
}
.single-product--gift[data-theme-brand=amazon] {
	--g1: #f59e0b;
	--g2: #1f2937;
	--g3: #0f172a;
	--g-rgb: 245, 158, 11;
}
.single-product--gift[data-theme-brand=spotify] {
	--g1: #22c55e;
	--g2: #065f46;
	--g3: #111827;
	--g-rgb: 34, 197, 94;
}
.single-product--gift[data-theme-brand=netflix] {
	--g1: #e50914;
	--g2: #7f1d1d;
	--g3: #111827;
	--g-rgb: 229, 9, 20;
}
.single-product--gift[data-theme-brand=visa] {
	--g1: #1a1f71;
	--g2: #2563eb;
	--g3: #f7b600;
	--g-rgb: 37, 99, 235;
}
.single-product--gift[data-theme-brand=mastercard] {
	--g1: #eb001b;
	--g2: #f79e1b;
	--g3: #1f2937;
	--g-rgb: 235, 0, 27;
}
.single-product--gift[data-theme-brand=skype] {
	--g1: #0ea5e9;
	--g2: #0078d4;
	--g3: #1e3a8a;
	--g-rgb: 14, 165, 233;
}
.single-product--gift[data-theme-brand=gaming] {
	--g1: #f97316;
	--g2: #dc2626;
	--g3: #4c1d95;
	--g-rgb: 249, 115, 22;
}

/* ── Small screens ── */
@media (max-width: 992px) {
	.single-product--gift .gp-hero {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.single-product--gift .gp-card {
		max-width: 420px;
		width: 100%;
		margin: 0 auto;
	}
}
@media (max-width: 480px) {
	.single-product--gift .gp-card {
		padding: 16px 18px;
		border-radius: 18px;
	}
	.single-product--gift .gp-card__logo {
		width: 48px;
		height: 48px;
	}
	.single-product--gift .gp-card__mid strong {
		font-size: var(--space-18);
	}
	.single-product--gift .gp-regions__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.single-product.single-product--gift .gp-amounts .spvm__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.single-product.single-product--gift .gp-amounts .spvm__card {
		padding: 12px;
	}
	.single-product.single-product--gift .gp-amounts .spvm__title {
		font-size: var(--space-13);
	}
}
