/* Sod Yarok Gift Card - everything is scoped under .sygc.
   The purchase section follows the site's product page: the card on one side,
   title, price, choices and the button on the other.
   "!important" appears only where a theme's page-content rules (headings, lists,
   paragraphs, inputs) would otherwise restyle the form. */

/* The form brings its own product-style title, so the theme's page title steps aside. */
body.sygc-page h1.page-title,
body.sygc-page h1.entry-title,
body.sygc-page .entry-header .entry-title,
body.sygc-page h1.wp-block-post-title {
	display: none !important;
}

.sygc {
	--gc-ink: #184828;
	--gc-text: #3a5f46;
	--gc-muted: #6f7b71;
	--gc-cream: #f7f2e9;
	--gc-paper: #fbf8f3;
	--gc-line: rgba(24, 72, 40, 0.14);
	--gc-line-strong: rgba(24, 72, 40, 0.32);
	--gc-accent: #c2622f;
	--gc-accent-dark: #a44f22;
	--gc-red: #a8232a;
	--gc-focus: #7fbf8f;
	box-sizing: border-box;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	color: var(--gc-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	text-align: right;
	container-type: inline-size;
	container-name: sygc;
}

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

.sygc [hidden] {
	display: none !important;
}

.sygc-notices {
	max-width: 1320px;
	margin: 0 auto;
}

.sygc .sygc-testbar {
	margin: 0 0 18px !important;
	padding: 9px 14px;
	border: 1px solid #e6c766;
	border-radius: 12px;
	background: #fff8dc;
	color: #5c4a10;
	font-size: 13.5px;
	line-height: 1.5;
}

.sygc .sygc-soon {
	margin: 40px 0 !important;
	font-size: 22px;
	text-align: center;
	color: var(--gc-ink);
}

/* ---------- product-page layout */
.sygc-pdp {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(28px, 4.5vw, 64px);
	align-items: start;
}

.sygc-gallery {
	position: sticky;
	top: 132px;
	min-width: 0;
}

/* The card stands directly on the page background - no box behind it. */
.sygc-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 0 26px;
	background: none;
}

.sygc .sygc-stage img {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	filter: drop-shadow(0 20px 24px rgba(24, 40, 30, 0.22));
}

/* Optional: a faint line drawing of wrapping tools (scissors, ribbons, tags) that fades out at the edges. */
.sygc-stage--pattern {
	padding: 24% 9% 26%;
}

.sygc-stage--pattern::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url(../img/wrap-pattern.svg) center / 240px 240px repeat;
	opacity: 0.24;
	pointer-events: none;
	-webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
	mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%);
}

.sygc-summary {
	min-width: 0;
}

.sygc .sygc-eyebrow {
	margin: 0 0 6px !important;
	padding: 0;
	color: var(--gc-ink);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.6;
}

.sygc .sygc-title {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--gc-ink) !important;
	font-family: inherit;
	font-size: clamp(30px, 3.6vw, 52px) !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em;
	line-height: 1.08 !important;
	text-align: right;
}

.sygc .sygc-price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin: 10px 0 0 !important;
	padding: 0;
	color: var(--gc-ink);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
}

.sygc .sygc-price small {
	font-size: 18px;
	font-weight: 600;
}

.sygc .sygc-price .sygc-price__from {
	color: var(--gc-muted);
	font-size: 14px;
	font-weight: 400;
}

.sygc .sygc-desc {
	max-width: 30em;
	margin: 14px 0 0 !important;
	padding: 0;
	color: var(--gc-text);
	font-size: 16px;
	line-height: 1.75;
}

/* ---------- the form card */
.sygc .sygc-form {
	margin: 24px 0 0;
	padding: 22px;
	border: 1px solid var(--gc-line);
	border-radius: 22px;
	background: var(--gc-paper);
}

.sygc .sygc-group {
	min-width: 0;
	margin: 0 0 22px !important;
	padding: 0 !important;
	border: 0 !important;
	background: none;
}

.sygc .sygc-group legend {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0 0 10px !important;
	padding: 0 !important;
	border: 0 !important;
	color: var(--gc-ink) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
}

.sygc-legend-note {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	background: rgba(194, 98, 47, 0.13);
	color: #8a3f17;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

/* design picker */
.sygc-designs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.sygc .sygc-design {
	position: relative;
	display: block;
	margin: 0 !important;
	padding: 0;
	cursor: pointer;
	text-align: center;
}

.sygc .sygc-design input,
.sygc .sygc-amount input {
	position: absolute !important;
	width: 1px !important;
	min-width: 0 !important;
	height: 1px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	opacity: 0;
	pointer-events: none;
}

.sygc-design__img {
	display: block;
	padding: 4px;
	border: 2px solid transparent;
	border-radius: 14px;
	background: #fff;
	transition: border-color 0.15s ease;
}

.sygc .sygc-design__img img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.sygc-design__name {
	display: block;
	margin-top: 6px;
	color: var(--gc-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
}

.sygc-design:hover .sygc-design__img {
	border-color: var(--gc-line-strong);
}

.sygc-design input:checked + .sygc-design__img {
	border-color: var(--gc-ink);
}

.sygc-design input:checked ~ .sygc-design__name {
	color: var(--gc-ink);
	font-weight: 700;
}

.sygc-design input:focus-visible + .sygc-design__img,
.sygc-amount input:focus-visible + span {
	outline: 3px solid var(--gc-focus);
	outline-offset: 2px;
}

/* amounts */
.sygc-amounts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.sygc .sygc-amount {
	position: relative;
	display: block;
	margin: 0 !important;
	padding: 0;
	cursor: pointer;
}

.sygc-amount > span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 6px 8px;
	border: 1px solid var(--gc-line-strong);
	border-radius: 999px;
	background: #fff;
	color: var(--gc-ink);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sygc-amount:hover > span {
	border-color: var(--gc-ink);
}

.sygc-amount input:checked + span {
	border-color: var(--gc-ink);
	background: var(--gc-ink);
	color: #fff;
}

.sygc-amount--other {
	grid-column: 1 / -1;
}

.sygc-amount--other > span {
	font-size: 16px;
}

/* "another amount": the shekel sign sits beside the field, never inside it */
.sygc-other {
	margin-top: 14px;
	padding: 14px 16px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--gc-line);
}

.sygc-other__row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sygc .sygc-other input#sygc_amount_other {
	flex: 0 0 150px;
	width: 150px !important;
	max-width: 100%;
	min-height: 52px !important;
	margin: 0 !important;
	padding: 8px 12px !important;
	border: 1px solid var(--gc-line-strong) !important;
	border-radius: 14px !important;
	background: #fff !important;
	box-shadow: none;
	color: var(--gc-ink) !important;
	font-family: inherit;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	-moz-appearance: textfield;
	appearance: textfield;
}

.sygc-other__unit {
	color: var(--gc-ink);
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.sygc .sygc-other__hint {
	margin: 8px 0 0 !important;
	padding: 0;
	color: var(--gc-muted);
	font-size: 13.5px;
	line-height: 1.5;
}

.sygc .sygc-other__hint.is-warn {
	color: var(--gc-red);
	font-weight: 600;
}

/* fields */
.sygc-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 12px;
}

.sygc .sygc-field {
	margin: 0 0 12px !important;
	padding: 0 !important;
}

.sygc .sygc-group .sygc-field:last-child {
	margin-bottom: 0 !important;
}

.sygc .sygc-row .sygc-field {
	margin-bottom: 0 !important;
}

.sygc .sygc-field label,
.sygc .sygc-other label {
	display: block;
	margin: 0 0 6px !important;
	padding: 0;
	color: var(--gc-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.sygc-optional {
	color: var(--gc-muted);
	font-weight: 400;
}

.sygc .sygc-field input[type="text"],
.sygc .sygc-field input[type="email"],
.sygc .sygc-field textarea,
.sygc .sygc-balance__form input[type="text"] {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--gc-line-strong);
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	color: var(--gc-ink);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
}

.sygc .sygc-field textarea {
	min-height: 96px;
	resize: vertical;
}

.sygc .sygc-field input[dir="ltr"] {
	text-align: left;
}

.sygc .sygc-field input:focus,
.sygc .sygc-field textarea:focus,
.sygc .sygc-other input:focus,
.sygc .sygc-balance__form input:focus {
	border-color: var(--gc-ink) !important;
	outline: 3px solid rgba(127, 191, 143, 0.45);
	outline-offset: 0;
}

.sygc .sygc-field small {
	display: block;
	margin-top: 5px;
	color: var(--gc-muted);
	font-size: 13px;
}

.sygc .sygc-error {
	margin: 0 0 14px !important;
	padding: 11px 14px;
	border-right: 3px solid var(--gc-red);
	border-radius: 10px;
	background: #fff;
	color: #7c1a20;
	font-size: 15px;
	line-height: 1.5;
}

/* the button - same shape and colour as "add to cart" on the product pages */
.sygc button.sygc-submit {
	display: block;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--gc-accent);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	text-align: center;
	text-shadow: none;
	text-transform: none;
	transition: background-color 0.15s ease;
}

.sygc button.sygc-submit:hover,
.sygc button.sygc-submit:focus {
	background: var(--gc-accent-dark);
	color: #fff;
}

.sygc button.sygc-submit:focus-visible {
	outline: 3px solid var(--gc-focus);
	outline-offset: 2px;
}

.sygc button.sygc-submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.sygc .sygc-fine {
	margin: 10px 0 0 !important;
	padding: 0;
	color: var(--gc-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

/* facts under the form, like on the product pages */
.sygc ul.sygc-facts {
	display: grid;
	gap: 12px;
	margin: 22px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.sygc ul.sygc-facts li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	color: var(--gc-text);
	font-size: 14.5px;
	line-height: 1.5;
}

.sygc ul.sygc-facts li::before,
.sygc ul.sygc-facts li::marker {
	content: none;
}

.sygc ul.sygc-facts svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--gc-accent);
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sygc ul.sygc-facts b {
	color: var(--gc-ink);
	font-weight: 600;
}

/* ---------- balance check */
.sygc.sygc-balance {
	margin-top: 64px;
	margin-bottom: 40px;
}

.sygc-balance__inner {
	max-width: 620px;
	margin: 0 auto;
	padding: 30px 24px;
	border: 1px solid var(--gc-line);
	border-radius: 22px;
	background: var(--gc-paper);
	text-align: center;
}

.sygc .sygc-balance__inner h2 {
	margin: 0 0 6px !important;
	padding: 0;
	color: var(--gc-ink);
	font-family: inherit;
	font-size: 24px !important;
	font-weight: 700 !important;
	line-height: 1.3;
	text-align: center;
}

.sygc .sygc-balance__inner p {
	margin: 0 0 16px !important;
	color: var(--gc-text);
}

.sygc-balance__form {
	display: flex;
	gap: 10px;
	margin: 0;
}

.sygc .sygc-balance__form input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	font-family: "Courier New", Courier, monospace;
	font-weight: 700;
	letter-spacing: 1px;
	text-align: center;
	text-transform: uppercase;
}

.sygc .sygc-balance__form button {
	flex: 0 0 auto;
	min-height: 50px;
	margin: 0;
	padding: 10px 24px;
	border: 1.5px solid var(--gc-ink);
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--gc-ink);
	cursor: pointer;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-shadow: none;
}

.sygc .sygc-balance__form button:hover,
.sygc .sygc-balance__form button:focus {
	background: var(--gc-ink);
	color: #fff;
}

.sygc-balance__result {
	margin-top: 16px;
	padding: 14px 16px;
	border: 1px solid var(--gc-line);
	border-radius: 14px;
	background: #fff;
	font-size: 15px;
}

.sygc-balance__result strong {
	display: block;
	color: var(--gc-ink);
	font-size: 26px;
	line-height: 1.3;
}

.sygc-balance__result.is-error {
	border-color: #e3b9bb;
	color: #7c1a20;
}

/* ---------- narrow layouts: by the width of the page column, with a viewport fallback */
@container sygc (max-width: 860px) {
	.sygc-pdp {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.sygc-gallery {
		position: static;
	}

	.sygc-stage {
		padding-bottom: 14px;
	}

	/* On a narrow screen the card takes the full width; the drawing stays on wide screens only. */
	.sygc-stage--pattern {
		padding: 0 0 14px;
	}

	.sygc-stage--pattern::before {
		display: none;
	}
}

@container sygc (max-width: 540px) {
	.sygc .sygc-form {
		padding: 16px;
		border-radius: 18px;
	}

	.sygc-designs {
		gap: 6px;
	}

	.sygc-design__img {
		padding: 3px;
		border-radius: 11px;
	}

	.sygc-design__name {
		font-size: 13px;
	}

	.sygc-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px 0;
	}

	.sygc-balance__form {
		flex-direction: column;
	}

	.sygc-balance__inner {
		padding: 24px 16px;
	}
}

@media (max-width: 900px) {
	.sygc-pdp {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.sygc-gallery {
		position: static;
	}

	.sygc-stage {
		padding-bottom: 14px;
	}

	/* On a narrow screen the card takes the full width; the drawing stays on wide screens only. */
	.sygc-stage--pattern {
		padding: 0 0 14px;
	}

	.sygc-stage--pattern::before {
		display: none;
	}
}

@media (max-width: 560px) {
	.sygc .sygc-form {
		padding: 16px;
		border-radius: 18px;
	}

	.sygc-designs {
		gap: 6px;
	}

	.sygc-design__img {
		padding: 3px;
		border-radius: 11px;
	}

	.sygc-design__name {
		font-size: 13px;
	}

	.sygc-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px 0;
	}

	.sygc-balance__form {
		flex-direction: column;
	}

	.sygc-balance__inner {
		padding: 24px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sygc * {
		transition: none !important;
	}
}
