/* ==========================================================================
   Photo gifts: fonts, product mockups, gift maker, gift cards, checkout offers
   ========================================================================== */

@font-face { font-family: "Styliize Clean"; src: url("../fonts/clean.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Styliize Script"; src: url("../fonts/script.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Styliize Classic"; src: url("../fonts/classic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Styliize Handwritten"; src: url("../fonts/handwritten.woff2") format("woff2"); font-display: swap; }

/* Mockups ----------------------------------------------------------------- */

.szg-mock {
	--img: none;
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	isolation: isolate;
}

/* Mug: the front of the mug (centre of the wrap), with the whole wrap laid flat underneath. */
.szg-mock--mug { flex-direction: column; gap: 9%; padding: 4% 0; }
.szg-mug {
	position: relative;
	width: 44%;
	aspect-ratio: 0.86;
	isolation: isolate;
	margin-right: 10%;
}
.szg-mug::after {
	content: "";
	position: absolute;
	left: 4%;
	right: 4%;
	bottom: -7%;
	height: 10%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(28, 40, 48, 0.32), transparent);
	z-index: -2;
}
.szg-mug__body {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 3% 3% 10% 10% / 2% 2% 7% 7%;
	background: var(--img) 50% 50% / 244% 89% no-repeat, #fbfbf9;
	overflow: hidden;
}
.szg-mug__body::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -5%;
	height: 10%;
	border-radius: 50%;
	background: radial-gradient(ellipse at 50% 70%, #d9d9d5 0%, #f4f4f1 60%, #fff 100%);
	box-shadow: 0 2px 3px rgba(28, 40, 48, 0.12);
}
.szg-mug__body::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(20, 24, 28, 0.26) 0%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.32) 30%, rgba(255, 255, 255, 0) 44%, rgba(0, 0, 0, 0) 68%, rgba(20, 24, 28, 0.3) 100%);
	pointer-events: none;
}
.szg-mug__handle {
	position: absolute;
	z-index: 0;
	right: -27%;
	top: 17%;
	width: 48%;
	height: 56%;
	border-radius: 50%;
	background: radial-gradient(farthest-side, transparent 56%, #d6d6d2 58%, #fbfbf9 70%, #e4e4e0 88%, #c9c9c5 97%, transparent 100%);
}
.szg-mug-flat {
	display: block;
	width: 78%;
	aspect-ratio: var(--flat-ar, 2.35);
	background: var(--img) center / 100% 100% no-repeat, #fbfbf9;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(28, 40, 48, 0.08), 0 6px 14px -8px rgba(28, 40, 48, 0.4);
}
/* Different photo on each side: two mugs, handle right (side 1) and handle left (side 2). */
.szg-mug-pair { display: flex; justify-content: center; width: 100%; gap: 14%; }
.szg-mug--back { display: none; }
.szg-mock--mug.is-split .szg-mug { width: 34%; margin-right: 0; }
.szg-mock--mug.is-split .szg-mug--back { display: block; }
.szg-mock--mug.is-split .szg-mug:not(.szg-mug--back) .szg-mug__body { background-position: 7.6% 50%; }
.szg-mock--mug.is-split .szg-mug--back .szg-mug__body { background-position: 92.4% 50%; }
.szg-mug--back .szg-mug__handle { right: auto; left: -27%; }
.szg-mock--mug.is-split .szg-mug-pair { padding-left: 7%; }
.szg-mock--mug.is-split .szg-mug:not(.szg-mug--back) { margin-left: -7%; }
.szg-card .szg-mug-flat, .szx .szg-mug-flat { display: none; }
.szg-card .szg-mug, .szx .szg-mug { width: 62%; }

/* Slates: rough natural edge around the printed face. */
.szg-slate {
	position: relative;
	width: min(80%, calc(80% * var(--ar, 1.42)));
	aspect-ratio: var(--ar, 1.42);
	background:
		radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
		repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.03) 0 3px, rgba(0, 0, 0, 0.04) 3px 7px),
		#33373b;
	clip-path: polygon(1% 4%, 9% 1%, 22% 2.5%, 38% 0.5%, 55% 2%, 71% 0%, 86% 2%, 99% 0.5%, 98% 14%, 100% 31%, 98.5% 49%, 100% 66%, 98% 83%, 99.5% 98%, 87% 99%, 70% 97.5%, 52% 100%, 35% 98%, 18% 99.5%, 2% 98%, 0.5% 84%, 2% 66%, 0% 48%, 1.5% 30%, 0% 15%);
	filter: drop-shadow(10px 14px 18px rgba(28, 40, 48, 0.35));
}
.szg-slate__face {
	position: absolute;
	inset: 3.2%;
	background: var(--img) center / cover no-repeat, #45494d;
	clip-path: polygon(0.5% 2%, 15% 0%, 33% 1.5%, 50% 0%, 68% 1.2%, 84% 0%, 99.5% 1.5%, 100% 18%, 98.8% 36%, 100% 54%, 99% 72%, 100% 99%, 82% 100%, 64% 98.8%, 46% 100%, 28% 99%, 10% 100%, 0% 98%, 1% 80%, 0% 62%, 1.2% 44%, 0% 26%);
}
.szg-slate__face::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, transparent 55%, rgba(25, 28, 31, 0.28) 100%),
		repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 3px, rgba(0, 0, 0, 0.035) 3px 7px);
	mix-blend-mode: multiply;
}
.szg-slate--heart {
	width: 80%;
	clip-path: none;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50 98C50 98 1 65 1 31C1 12 16 2 31 2C41 2 48 8 50 14C52 8 59 2 69 2C84 2 99 12 99 31C99 65 50 98 50 98Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50 98C50 98 1 65 1 31C1 12 16 2 31 2C41 2 48 8 50 14C52 8 59 2 69 2C84 2 99 12 99 31C99 65 50 98 50 98Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.szg-mock--slate_heart { filter: drop-shadow(10px 14px 18px rgba(28, 40, 48, 0.35)); }
.szg-slate--heart .szg-slate__face {
	inset: 0;
	clip-path: none;
	/* Same outline as the print guide in the maker (0.06–0.94 wide, 0.06–0.92 tall). */
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50 92C50 92 6 62 6 33C6 15 20 6 33 6C42 6 48 11 50 17C52 11 58 6 67 6C80 6 94 15 94 33C94 62 50 92 50 92Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M50 92C50 92 6 62 6 33C6 15 20 6 33 6C42 6 48 11 50 17C52 11 58 6 67 6C80 6 94 15 94 33C94 62 50 92 50 92Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* T-shirt and tote: garment drawn in SVG, the design placed on top at real scale. */
.szg-only-back { display: none; }
.szg-mock.is-back .szg-only-back { display: inline; }
.szg-mock.is-back .szg-only-front { display: none; }
.szg-print[hidden] { display: none; }
.szg-tee, .szg-tote { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(6px 10px 14px rgba(28, 40, 48, 0.22)); }
.szg-garment { fill: var(--garment, #fff); stroke: rgba(28, 40, 48, 0.16); stroke-width: 1.2; stroke-linejoin: round; }
.szg-garment-line { fill: none; stroke: rgba(28, 40, 48, 0.14); stroke-width: 1.2; }
.szg-handle { fill: none; stroke: var(--garment, #efe6d2); stroke-width: 9; stroke-linecap: round; filter: brightness(0.93); }
.szg-mock.is-dark .szg-garment-line { stroke: rgba(255, 255, 255, 0.12); }
.szg-print {
	position: absolute;
	left: 50%;
	height: auto;
	max-width: none;
	pointer-events: none;
	mix-blend-mode: multiply;
	object-fit: contain;
}
.szg-mock.is-dark .szg-print { mix-blend-mode: normal; }
.szg-print--tshirt { top: 21%; width: 27%; aspect-ratio: 1; transform: translateX(-50%); }
/* 22 cm on a 38 cm bag: 196/38 units per cm × 22 cm ÷ 300 units of preview width ≈ 38%. */
.szg-print--tote { top: 62%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%); }

/* Gift maker -------------------------------------------------------------- */

.szg-view--preview { align-items: center; justify-content: center; gap: 18px; }
.szg-view--preview[hidden] { display: none; }
.szg-preview { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.szg-preview .szg-mock { width: min(100%, 62vh, 640px); }
.szg-drop-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; text-align: center; }
.szg-drop-cta[hidden] { display: none; }
[data-szg-pick][hidden] { display: none; }
.szg-drop-cta .sz-btn { pointer-events: none; }
.szg-drop-cta:focus-within .sz-btn { outline: 3px solid var(--sz-accent); outline-offset: 2px; }
.szg-drop-cta__meta { font-size: var(--sz-t-xs); color: var(--sz-muted); max-width: 36ch; }
.is-dragover .szg-preview { outline: 2px dashed var(--sz-accent); outline-offset: 6px; border-radius: 16px; }
.szg-frame__overlay { position: absolute; inset: 0; pointer-events: none; }
.szg-maker .sz-stage__views button[hidden] { display: none; }

.szg-blurb { margin: 0 0 8px; }
.szg-blurb[hidden] { display: none; }
.szg-optional { font-weight: 400; color: var(--sz-muted); font-size: var(--sz-t-sm); }
.szg-maker .sz-step__title label { font: inherit; margin: 0; }

.szg-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.szg-type { position: relative; cursor: pointer; margin: 0; font-weight: 400; }
.szg-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.szg-type-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 10px 6px 9px;
	border: 1.5px solid var(--sz-line);
	border-radius: var(--sz-r-ui);
	text-align: center;
	color: var(--sz-ink);
}
.szg-type-body svg { color: var(--sz-muted); }
.szg-type input:checked + .szg-type-body { border-color: var(--sz-accent); box-shadow: inset 0 0 0 1px var(--sz-accent); background: color-mix(in srgb, var(--sz-accent) 5%, #fff); }
.szg-type input:checked + .szg-type-body svg { color: var(--sz-accent); }
.szg-type input:focus-visible + .szg-type-body { outline: 3px solid var(--sz-accent); outline-offset: 2px; }
.szg-type__name { font-size: var(--sz-t-sm); font-weight: 650; line-height: 1.25; }
.szg-type__price { font-size: var(--sz-t-xs); color: var(--sz-muted); font-variant-numeric: tabular-nums; }

.szg-options .szg-field:first-child, .szg-text-style .szg-field:first-child { margin-top: 0; }
.szg-field { margin-top: 16px; }
.szg-field__label { display: block; font-size: var(--sz-t-sm); font-weight: 600; margin: 0 0 8px; }
.szg-field__label strong { font-weight: 650; }
.szg-field--row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.szg-maker .sz-seg__opt.is-disabled { cursor: not-allowed; }
.szg-maker .sz-seg__opt.is-disabled span { opacity: 0.4; text-decoration: line-through; }
.szg-attr { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)) !important; }

.szg-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.szg-swatch-opt { position: relative; cursor: pointer; margin: 0; }
.szg-swatch-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.szg-swatch {
	display: block;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--sw, #ccc);
	box-shadow: inset 0 0 0 1px rgba(28, 40, 48, 0.2);
}
.szg-swatch-opt input:checked + span .szg-swatch { outline: 2px solid var(--sz-accent); outline-offset: 3px; }
.szg-swatch-opt input:focus-visible + span .szg-swatch { outline: 3px solid var(--sz-accent); outline-offset: 3px; }
.szg-swatch-opt.is-disabled { cursor: not-allowed; }
.szg-swatch-opt.is-disabled .szg-swatch { opacity: 0.35; background-image: linear-gradient(135deg, transparent 46%, #777 47%, #777 53%, transparent 54%); }

.szg-text { width: 100%; }
.szg-text-note { margin: 8px 0 0; font-size: var(--sz-t-xs); color: var(--sz-ok); }
.szg-text-note[hidden], .szg-text-style[hidden] { display: none; }
.szg-text-style { margin-top: 16px; }
.szg-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.szg-font { position: relative; cursor: pointer; margin: 0; font-weight: 400; }
.szg-font input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.szg-font-body {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 6px 8px;
	border: 1.5px solid var(--sz-line);
	border-radius: var(--sz-r-ui);
	font-size: 1.2rem;
	line-height: 1.1;
}
.szg-font input:checked + .szg-font-body { border-color: var(--sz-accent); box-shadow: inset 0 0 0 1px var(--sz-accent); }
.szg-font input:focus-visible + .szg-font-body { outline: 3px solid var(--sz-accent); outline-offset: 2px; }

@media (max-width: 960px) {
	.szg-preview .szg-mock { width: min(100%, 440px); }
	.szg-view--preview { min-height: 0; }
}

/* Print type, sides, notes */
.szg-tiers { display: grid; gap: 8px; }
.szg-tier { position: relative; cursor: pointer; margin: 0; font-weight: 400; display: block; }
.szg-tier input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.szg-tier-body { display: block; padding: 10px 14px; border: 1.5px solid var(--sz-line); border-radius: var(--sz-r-ui); }
.szg-tier input:checked + .szg-tier-body { border-color: var(--sz-accent); box-shadow: inset 0 0 0 1px var(--sz-accent); background: color-mix(in srgb, var(--sz-accent) 5%, #fff); }
.szg-tier input:focus-visible + .szg-tier-body { outline: 3px solid var(--sz-accent); outline-offset: 2px; }
.szg-tier__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.szg-tier__name { font-weight: 650; }
.szg-tier__price { font-size: var(--sz-t-sm); color: var(--sz-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.szg-tier__note { display: block; margin-top: 2px; font-size: var(--sz-t-xs); color: var(--sz-muted); line-height: 1.4; }
.szg-sidebar { margin: 0 0 16px; }
.szg-sidebar[hidden] { display: none; }
.szg-sides small, .szg-modes small { font-weight: 500; opacity: 0.8; }
.szg-side-done { color: var(--sz-good); font-weight: 700; margin-left: 2px; }
.szg-side-note, .szg-vinyl-note { margin: 10px 0 0; font-size: var(--sz-t-sm); }
.szg-side-note[hidden], .szg-vinyl-note[hidden], .szg-remove[hidden] { display: none; }
.szg-vinyl-note { color: var(--sz-ok); }
.szg-remove { margin-top: 8px; font-size: var(--sz-t-sm); }
.szg-for { font-weight: 400; color: var(--sz-muted); }
.szg-modes .sz-seg__opt > span { padding: 8px 6px; line-height: 1.25; }
.szg-maker [data-step][hidden] { display: none; }
.sz-loop-photo { white-space: nowrap; }

/* Gift cards -------------------------------------------------------------- */

.szg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.szg-card { display: block; text-decoration: none; color: var(--sz-ink); }
.szg-card__visual { display: block; border-radius: var(--sz-r-card); background: var(--sz-wall); padding: 8%; transition: background-color 0.2s; }
.szg-card:hover .szg-card__visual { background: color-mix(in srgb, var(--sz-ink) 7%, var(--sz-wall)); }
.szg-card__visual .szg-mock { transition: transform 0.3s; }
.szg-card:hover .szg-card__visual .szg-mock { transform: scale(1.04); }
.szg-card__body { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; }
.szg-card__name { font-weight: 650; }
.szg-card__price { font-size: var(--sz-t-sm); color: var(--sz-muted); white-space: nowrap; }
.szg-card__price .woocommerce-Price-amount { color: var(--sz-ink); font-weight: 600; }
.szg-more { border-top: 1px solid var(--sz-line); }
.szg-canvas-banner { margin-top: clamp(32px, 5vw, 56px); }

/* Checkout offers (inc/cross-sell.php) ------------------------------------ */

.szx { margin: 0 0 24px; padding: 18px; border-radius: var(--sz-r-card); background: color-mix(in srgb, var(--sz-accent) 6%, var(--sz-paper)); border: 1px solid color-mix(in srgb, var(--sz-accent) 22%, var(--sz-paper)); }
.szx__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.szx__photo { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 1px 3px rgba(28, 40, 48, 0.2); }
.szx__title { margin: 0; font-size: var(--sz-t-md); font-weight: 750; letter-spacing: -0.01em; line-height: 1.3; }
.szx__sub { margin: 2px 0 0; font-size: var(--sz-t-sm); color: var(--sz-muted); }
.szx__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.szx__item { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--sz-paper); border-radius: var(--sz-r-ui); box-shadow: 0 1px 2px rgba(28, 40, 48, 0.08); }
.szx__item.is-added { opacity: 0.6; }
.szx__visual { display: block; background: var(--sz-wall); border-radius: 8px; padding: 6%; }
.szx__name { font-size: var(--sz-t-sm); font-weight: 650; line-height: 1.3; }
.szx__price { font-size: var(--sz-t-sm); font-variant-numeric: tabular-nums; }
.szx__price del { color: var(--sz-muted); margin-right: 4px; }
.szx__price ins { text-decoration: none; font-weight: 700; color: var(--sz-sale, #bb3a22); }
.szx__item select { width: 100%; min-height: 38px; padding: 4px 8px; font-size: var(--sz-t-sm); }
.szx__item .sz-btn { width: 100%; }
.szx__msg { margin: 0; font-size: var(--sz-t-xs); color: var(--sz-bad); }
.szx__msg[hidden] { display: none; }
.szx__note { margin: 12px 0 0; font-size: var(--sz-t-xs); color: var(--sz-muted); }
.wc-block-checkout .szx, .wp-block-woocommerce-checkout + .szx { margin-top: 0; }
