/* ─── Shell ────────────────────────────────────────── */
.merch-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ─── Theme switch: align with locale button ──────── */
/* main.css sets top: 55px for index.html's tall hero;
   on this page both controls should sit at the same level */
#theme-switch {
	top: 5px;
}
@media screen and (max-width: 992px) {
	#theme-switch { top: 5px; transform-origin: top right; }
}
@media screen and (max-width: 600px) {
	#theme-switch { top: 5px; transform-origin: top right; }
}

/* ─── Hero ─────────────────────────────────────────── */
/* Using section, not header — main.css adds 900px height to <header> tag */
.merch-hero {
	padding: clamp(36px, 7vw, 72px) 24px clamp(28px, 5vw, 52px);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.merch-hero-logo-link {
	display: inline-block;
	margin-bottom: 32px;
	border-radius: 10px;
	box-shadow: 3px 5px 15px var(--button-shadow);
	line-height: 0;
	transition: var(--default-transition);
}
.merch-hero-logo-link:hover {
	transform: translateY(-2px);
	box-shadow: 3px 8px 24px var(--button-shadow);
}
.merch-hero-logo-link svg { border-radius: 10px; }

/* Override main.css h1 (clamp 60–96px, weight 100) */
.merch-hero h1 {
	font-size: clamp(28px, calc(var(--index) * 2.1), 52px);
	font-weight: 300;
	line-height: 1.15;
	padding: 0 0 14px;
	max-width: 600px;
}
.merch-hero h1 strong {
	color: var(--button-red);
	font-weight: 700;
}
.merch-hero-sub {
	font-size: clamp(15px, calc(var(--index) * 0.9), 18px);
	line-height: 1.65;
	max-width: 520px;
	margin: 0 auto;
	opacity: 0.7;
}

/* ─── Product section ──────────────────────────────── */
.product-section {
	flex: 1;
	padding: clamp(24px, 5vw, 60px) 20px;
}
.product-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(24px, 4vw, 56px);
	max-width: 900px;
	margin: 0 auto;
	align-items: start;
}
@media (max-width: 640px) {
	.product-grid {
		grid-template-columns: 1fr;
		max-width: 440px;
	}
}

/* ─── Image panel ──────────────────────────────────── */
.product-image-wrap {
	border-radius: 24px;
	overflow: hidden;
	background-color: var(--button-bg);
	box-shadow: 3px 4px 20px var(--button-shadow);
	aspect-ratio: 400 / 600;
	display: flex;
	align-items: center;
	justify-content: center;
}
.product-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: opacity 0.25s ease;
}
.product-image-wrap img.is-loading {
	opacity: 0;
}

/* ─── Controls panel ───────────────────────────────── */
.product-controls {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.control-group {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.control-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--button-red);
	line-height: 1;
}

/* Color swatches */
.color-swatches {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}
.color-swatch {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2.5px solid transparent;
	cursor: pointer;
	transition: var(--default-transition);
	outline: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
}
.color-swatch:focus-visible {
	outline: 2px solid var(--button-red);
	outline-offset: 3px;
}
.color-swatch[aria-pressed="true"] {
	border-color: var(--button-red);
	box-shadow: 0 0 0 3px rgba(237, 50, 55, 0.22);
}
.color-swatch--white { background-color: #f0ede8; }
.color-swatch--black { background-color: #1f1c23; }
.color-swatch--green { background-color: #4a7055; }

/* Prevent swatches from blending into matching theme backgrounds */
:root[data-theme="light"] .color-swatch--white { border-color: rgba(0,0,0,0.18); }
:root[data-theme="dark"]  .color-swatch--black { border-color: rgba(255,255,255,0.22); }
/* Keep the red selection ring when active */
:root[data-theme="light"] .color-swatch--white[aria-pressed="true"],
:root[data-theme="dark"]  .color-swatch--black[aria-pressed="true"] { border-color: var(--button-red); }

.color-name-display {
	font-size: 14px;
	font-weight: 500;
	opacity: 0.7;
	margin: 0;
	line-height: 1;
}

/* Fit toggle */
.fit-toggle {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.fit-btn {
	padding: 10px 20px;
	border-radius: 20px;
	border: none;
	cursor: pointer;
	font-family: 'Inter', sans-serif;
	font-size: clamp(13px, calc(var(--index) * 0.72), 15px);
	font-weight: 700;
	background-color: var(--button-bg);
	color: var(--button-font);
	box-shadow: 3px 4px 4px var(--button-shadow);
	transition: var(--default-transition);
}
.fit-btn:hover {
	background-color: var(--button-red);
	color: #fff;
}
.fit-btn[aria-pressed="true"] {
	background-color: var(--button-red);
	color: #fff;
}
.fit-btn:focus-visible {
	outline: 2px solid var(--button-red);
	outline-offset: 2px;
}

/* Size grid */
.sizes-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.sizes-group[hidden] { display: none; }

.size-chip {
	min-width: 52px;
	padding: 8px 16px;
	border-radius: 14px;
	background-color: var(--button-bg);
	color: var(--button-font);
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	box-shadow: 2px 3px 4px var(--button-shadow);
	line-height: 1.4;
	border: 2px solid transparent;
	cursor: pointer;
	transition: var(--default-transition);
}
.size-chip:hover {
	border-color: var(--button-red);
}
.size-chip[aria-pressed="true"] {
	background-color: var(--button-red);
	color: #fff;
	border-color: var(--button-red);
	box-shadow: 0 0 0 3px rgba(237, 50, 55, 0.22);
}
.size-chip:focus-visible {
	outline: 2px solid var(--button-red);
	outline-offset: 2px;
}

/* ─── CTA section ──────────────────────────────────── */
/* Using section, not footer — main.css sets <footer> to 690px + bg image */
.merch-cta-section {
	padding: clamp(20px, 4vw, 44px) 20px clamp(40px, 7vw, 72px);
	background-color: var(--button-bg);
	border-top: 1px solid rgba(128, 128, 128, 0.12);
}
.merch-cta-inner {
	max-width: 680px;
	margin: 0 auto;
}
.merch-cta-card {
	background-color: var(--body-bg);
	border-radius: 30px;
	padding: clamp(28px, 5vw, 44px) clamp(24px, 4vw, 40px);
	box-shadow: 3px 4px 4px var(--button-shadow);
	border-top: 3px solid var(--button-red);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.merch-cta-icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background-color: var(--button-red);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.merch-cta-icon svg { width: 28px; height: 28px; }

.merch-cta-tag {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--button-red);
	line-height: 1;
}

/* Override main.css h2 (line-height 48px, weight 300) */
.merch-cta-title {
	font-size: clamp(20px, calc(var(--index) * 1.4), 32px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--font-color);
	margin: 0;
	padding: 0;
}
.merch-cta-desc {
	font-size: 15px;
	line-height: 1.65;
	opacity: 0.68;
	margin: 0;
	flex: 1;
}
.merch-cta-note {
	font-size: 13px;
	line-height: 1.6;
	opacity: 0.5;
	margin: 0;
}

/* ─── Order form ─────────────────────────────────────── */
.cwmp-form {
	display: grid;
	gap: 18px;
	margin-top: 8px;
}
.form-field {
	display: grid;
	gap: 7px;
}
.form-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--font-color);
}
.form-input,
.form-textarea {
	width: 100%;
	padding: 11px 14px;
	border-radius: 12px;
	border: 1.5px solid rgba(128,128,128,0.2);
	background-color: rgba(128,128,128,0.06);
	color: var(--font-color);
	font-family: 'Inter', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	transition: border-color .2s ease;
	box-sizing: border-box;
}
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea {
	background-color: rgba(255,255,255,0.05);
	border-color: rgba(255,255,255,0.12);
}
.form-input:focus,
.form-textarea:focus {
	border-color: var(--button-red);
	outline: none;
}
.form-textarea { min-height: 90px; resize: vertical; }

.form-checks { display: grid; gap: 8px; }
.form-check-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 15px;
	font-weight: 400;
	cursor: pointer;
}
.form-check-label input {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	accent-color: var(--button-red);
	cursor: pointer;
}

/* Submit button */
.formbutton { margin-top: 4px; }
.formbutton .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	width: 100%;
	background-color: var(--button-red);
	color: #fff;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: clamp(14px, calc(var(--index) * 0.78), 16px);
	border-radius: 20px;
	border: none;
	padding: 14px 22px;
	box-shadow: 3px 4px 10px rgba(237, 50, 55, 0.38);
	transition: var(--default-transition);
	cursor: pointer;
}
.formbutton .button:hover {
	box-shadow: 3px 4px 22px rgba(237, 50, 55, 0.58);
	filter: brightness(1.07);
}
.formbutton .button:active { transform: scale(0.97); }
.formbutton .button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	filter: none;
}

/* ─── Size guide ────────────────────────────────────── */
.size-guide-section {
	padding: clamp(16px, 3vw, 32px) 20px clamp(24px, 4vw, 48px);
}
.size-guide-inner {
	max-width: 680px;
	margin: 0 auto;
}
details.size-guide-details {
	border-radius: 20px;
	background-color: var(--button-bg);
	box-shadow: 3px 4px 4px var(--button-shadow);
	overflow: hidden;
}
details.size-guide-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	cursor: pointer;
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: clamp(15px, calc(var(--index) * 0.9), 18px);
	color: var(--font-color);
	list-style: none;
	user-select: none;
	transition: var(--default-transition);
}
details.size-guide-details summary::-webkit-details-marker { display: none; }
details.size-guide-details summary::after {
	content: '';
	width: 20px;
	height: 20px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ED3237' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	transition: transform 0.25s ease;
	flex-shrink: 0;
}
details.size-guide-details[open] summary::after {
	transform: rotate(180deg);
}
details.size-guide-details summary:hover { color: var(--button-red); }

.size-guide-content {
	padding: 4px 24px 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(16px, 3vw, 28px);
}
@media (max-width: 540px) {
	.size-guide-content { grid-template-columns: 1fr; }
}

.size-table-wrap h3 {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--button-red);
	margin: 0 0 12px;
	padding: 0;
	line-height: 1.2;
}
.size-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	color: var(--font-color);
}
.size-table th {
	text-align: left;
	font-weight: 600;
	padding: 6px 10px 8px;
	border-bottom: 2px solid var(--button-red);
	font-size: 12px;
	opacity: 0.7;
}
.size-table td {
	padding: 8px 10px;
	border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}
.size-table tr:last-child td { border-bottom: none; }
.size-table td:first-child { font-weight: 700; }

/* ─── Nova Poshta autocomplete ─────────────────────── */
.np-autocomplete {
	position: relative;
}
.np-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background-color: var(--body-bg);
	border: 1.5px solid var(--button-red);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.14);
	max-height: 240px;
	overflow-y: auto;
	z-index: 200;
}
.np-option {
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--font-color);
	border-bottom: 1px solid rgba(128,128,128,0.1);
	cursor: pointer;
	transition: background-color 0.1s;
}
.np-option:last-child { border-bottom: none; }
.np-option:hover { background-color: rgba(237,50,55,0.08); }
.np-option--empty,
.np-option--loading {
	cursor: default;
	font-style: italic;
	opacity: 0.6;
}

/* ─── Trust footer ──────────────────────────────────── */
/* Using section, not footer — main.css sets <footer> to 690px + bg image */
.merch-trust-section {
	background-color: var(--button-bg);
	padding: clamp(32px, 5vw, 52px) 24px;
	text-align: center;
	border-top: 1px solid rgba(128, 128, 128, 0.12);
}
.merch-trust-inner {
	max-width: 520px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.merch-trust-section p {
	font-size: 14px;
	line-height: 1.65;
	opacity: 0.58;
	margin: 0;
}
.merch-trust-section a { color: var(--button-red); text-decoration: none; }
.merch-trust-section a:hover { text-decoration: underline; }
.merch-trust-title {
	font-size: clamp(15px, calc(var(--index) * 0.95), 19px);
	font-weight: 600;
	opacity: 1 !important;
	color: var(--font-color);
}
.trust-divider {
	width: 36px;
	height: 3px;
	background-color: var(--button-red);
	border-radius: 2px;
	margin: 2px 0 4px;
}
