/**
 * NONO Made — Kreator Świec
 * Dopasowany do palety Blocksy: #844925, League Spartan, ostre narożniki.
 */

.nmcc {
	--nmcc-brown: #844925;
	--nmcc-brown-hover: #6f3c1e;
	--nmcc-ink: #0e0d12;
	--nmcc-muted: rgba(52, 58, 62, 0.82);
	--nmcc-line: #e4e2dc;
	--nmcc-paper: #fbfbf8;
	--nmcc-chosen: rgba(132, 73, 37, 0.07);
	--nmcc-heading: "League Spartan", system-ui, sans-serif;

	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 4rem) 16px clamp(3rem, 6vw, 5rem);
	color: var(--nmcc-ink);
	line-height: 1.6;
}

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

/* —— Wstęp —— */
.nmcc__intro {
	max-width: 36rem;
	margin: 0 auto clamp(2rem, 4vw, 3rem);
	text-align: center;
}

.nmcc__brand {
	margin: 0 0 0.5rem;
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	letter-spacing: 0.04em;
	line-height: 1.1;
	color: var(--nmcc-brown);
}

.nmcc__title {
	margin: 0 0 0.6rem;
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: clamp(1.3rem, 2.8vw, 1.7rem);
	line-height: 1.2;
}

.nmcc__lead,
.nmcc__empty {
	margin: 0;
	color: var(--nmcc-muted);
}

.nmcc__empty {
	text-align: center;
}

/* —— Rodzaj świecy —— */
.nmcc__kinds {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	max-width: 44rem;
	margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
}

.nmcc__kind {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--nmcc-line);
	color: var(--nmcc-ink);
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.nmcc__kind:hover {
	border-color: color-mix(in srgb, var(--nmcc-brown) 45%, var(--nmcc-line));
}

.nmcc__kind.is-active {
	border-color: var(--nmcc-brown);
	background: var(--nmcc-chosen);
}

.nmcc__kind:focus-visible {
	outline: 2px solid var(--nmcc-brown);
	outline-offset: 2px;
}

.nmcc__kind-name {
	font-family: var(--nmcc-heading);
	font-weight: 700;
}

.nmcc__kind-description {
	font-size: 0.8rem;
	color: var(--nmcc-muted);
}

/* —— Układ: na komputerze podgląd i opis po lewej, wybór po prawej; na telefonie opis na końcu —— */
.nmcc__stage {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
	grid-template-areas:
		"preview controls"
		"description controls";
	grid-template-rows: auto 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

.nmcc__preview-pane {
	grid-area: preview;
}

.nmcc__controls {
	grid-area: controls;
}

.nmcc__description {
	grid-area: description;
}

@media (max-width: 900px) {
	.nmcc__stage {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"preview"
			"controls"
			"description";
		grid-template-rows: none;
	}
}

.nmcc__preview-frame {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(320px, 48vw, 520px);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px solid var(--nmcc-line);
	/* Kolor tła dobiera skrypt do koloru wosku (--nmcc-stage), poświata za świecą zostaje ta sama. */
	background-color: var(--nmcc-stage, #f4f1ea);
	background-image: radial-gradient(ellipse 75% 60% at 50% 42%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
	transition: background-color 0.4s ease;
}

.nmcc__preview {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: clamp(280px, 44vw, 460px);
	filter: drop-shadow(0 18px 24px rgba(20, 16, 12, 0.18));
}

.nmcc__preview.is-turnable {
	cursor: grab;
	touch-action: pan-y;
}

.nmcc__preview.is-turnable:active {
	cursor: grabbing;
}

.nmcc__turn {
	margin-top: 0.75rem;
	text-align: center;
}

.nmcc__turn[hidden] {
	display: none;
}

.nmcc__turn input {
	width: 100%;
	accent-color: var(--nmcc-brown);
}

.nmcc__turn-hint {
	margin: 0.25rem 0 0;
	font-size: 0.8rem;
	color: var(--nmcc-muted);
}

.nmcc__controls,
.nmcc__model-options {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	min-width: 0;
}

.nmcc__model-options[hidden] {
	display: none;
}

/* —— Sekcje —— */
.nmcc__section {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.nmcc__section-title {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin: 0 0 0.9rem;
	padding: 0;
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
}

.nmcc__step {
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	color: var(--nmcc-brown);
}

/* Wspólne dla kafelków wyboru: pole wyboru leży niewidoczne na całym kafelku. */
.nmcc__model,
.nmcc__swatch,
.nmcc__choice {
	position: relative;
	cursor: pointer;
}

.nmcc__model input,
.nmcc__swatch input,
.nmcc__choice input {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

/* —— Modele —— */
.nmcc__models {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.65rem;
}

.nmcc__model {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	padding: 0.85rem 0.75rem;
	border: 1px solid var(--nmcc-line);
	text-align: center;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.nmcc__model:hover {
	border-color: color-mix(in srgb, var(--nmcc-brown) 45%, var(--nmcc-line));
}

.nmcc__model:has(input:checked) {
	border-color: var(--nmcc-brown);
	background: var(--nmcc-chosen);
}

.nmcc__model:has(input:focus-visible),
.nmcc__choice:has(input:focus-visible) {
	outline: 2px solid var(--nmcc-brown);
	outline-offset: 2px;
}

.nmcc__model-thumb {
	display: block;
	width: auto;
	height: 72px;
	max-width: 100%;
	margin-bottom: 0.35rem;
}

.nmcc__model-name {
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	line-height: 1.3;
}

.nmcc__model-price {
	font-size: 0.8rem;
	color: var(--nmcc-muted);
}

/* —— Kolory —— */
.nmcc__swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	gap: 0.75rem 0.55rem;
}

.nmcc__swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	text-align: center;
}

.nmcc__swatch-sample {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	border: 1px solid color-mix(in srgb, var(--swatch) 70%, #888);
	background: var(--swatch);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nmcc__swatch:hover .nmcc__swatch-sample {
	transform: translateY(-2px);
}

.nmcc__swatch:has(input:checked) .nmcc__swatch-sample {
	box-shadow: 0 0 0 2px var(--nmcc-paper), 0 0 0 4px var(--nmcc-brown);
}

.nmcc__swatch:has(input:focus-visible) .nmcc__swatch-sample {
	outline: 2px solid var(--nmcc-brown);
	outline-offset: 5px;
}

.nmcc__swatch-name {
	max-width: 100%;
	font-size: 0.75rem;
	line-height: 1.3;
	color: var(--nmcc-muted);
	/* Długie nazwy barwników (np. „Brzoskwiniowy”) dzielą się z łącznikiem zamiast wchodzić na sąsiedni kolor. */
	overflow-wrap: anywhere;
	hyphens: auto;
}

.nmcc__swatch:has(input:checked) .nmcc__swatch-name {
	color: var(--nmcc-ink);
	font-weight: 600;
}

/* —— Wosk i zapach —— */
.nmcc__choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.55rem;
}

.nmcc__choice {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid var(--nmcc-line);
	transition: border-color 0.2s ease, background 0.2s ease;
}

.nmcc__choice:hover {
	border-color: color-mix(in srgb, var(--nmcc-brown) 45%, var(--nmcc-line));
}

.nmcc__choice:has(input:checked) {
	border-color: var(--nmcc-brown);
	background: var(--nmcc-chosen);
}

.nmcc__choice-name {
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
}

.nmcc__choice-extra {
	font-size: 0.8rem;
	color: var(--nmcc-brown);
}

/* Pole do zaznaczenia kilku pozycji: kwadrat z haczykiem w rogu. */
.nmcc__choice--many {
	padding-right: 2.2rem;
}

.nmcc__choice--many::after {
	content: "";
	position: absolute;
	top: 0.8rem;
	right: 0.8rem;
	width: 0.9rem;
	height: 0.9rem;
	border: 1px solid var(--nmcc-line);
	background: #fff;
}

.nmcc__choice--many:has(input:checked)::after {
	content: "✓";
	border-color: var(--nmcc-brown);
	background: var(--nmcc-brown);
	color: #fff;
	font-size: 0.7rem;
	line-height: 0.9rem;
	text-align: center;
}

.nmcc__section-note {
	font-weight: 400;
	font-size: 0.8rem;
	letter-spacing: 0;
	text-transform: none;
	color: var(--nmcc-muted);
}

.nmcc__choice-description {
	font-size: 0.75rem;
	line-height: 1.35;
	color: var(--nmcc-muted);
}

/* —— Opis świecy —— */
.nmcc__description {
	padding: 1.25rem;
	border: 1px solid var(--nmcc-line);
	background: var(--nmcc-paper);
	font-size: 0.9rem;
}

.nmcc__description-title {
	margin: 0 0 0.6rem;
	font-family: var(--nmcc-heading);
	font-weight: 700;
}

.nmcc__facts {
	margin: 0 0 0.9rem;
	padding: 0;
	list-style: none;
}

.nmcc__facts li {
	padding: 0.3rem 0;
	border-bottom: 1px solid var(--nmcc-line);
}

.nmcc__facts strong {
	font-weight: 700;
}

.nmcc__allergens {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.9rem;
	padding: 0.6rem 0.75rem;
	border-left: 3px solid #c0392b;
	background: #fff;
}

.nmcc__allergens p {
	flex: 1 1 60%;
	margin: 0;
}

.nmcc__pictogram {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.2rem;
	height: 2.2rem;
	color: #111;
	font-weight: 700;
}

/* Romb piktogramu CLP — obrócona ramka pod znakiem, żeby sam znak stał prosto. */
.nmcc__pictogram::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0.32rem;
	border: 2px solid #c0392b;
	background: #fff;
	transform: rotate(45deg);
}

.nmcc__more {
	margin-bottom: 0.4rem;
}

.nmcc__more summary {
	cursor: pointer;
	font-weight: 600;
}

.nmcc__more ul {
	margin: 0.4rem 0 0.4rem 1.1rem;
	padding: 0;
}

.nmcc__producer,
.nmcc__handmade {
	margin: 0.6rem 0 0;
	font-size: 0.8rem;
	color: var(--nmcc-muted);
}

/* —— Cena i przycisk —— */
.nmcc__checkout-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--nmcc-line);
}

.nmcc__price-block {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.nmcc__price-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--nmcc-muted);
}

.nmcc__price {
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: 1.65rem;
	line-height: 1.1;
}

.nmcc__cta {
	min-height: 55px;
	padding: 0 2rem;
	border: 0;
	border-radius: 0;
	background: var(--nmcc-brown);
	color: #fff;
	font-family: var(--nmcc-heading);
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.nmcc__return-note {
	flex: 1 0 100%;
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.5;
	color: var(--nmcc-muted);
}

.nmcc__return-note a {
	color: var(--nmcc-brown);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nmcc__cta:hover {
	background: var(--nmcc-brown-hover);
}

.nmcc__cta:focus-visible {
	outline: 2px solid var(--nmcc-brown);
	outline-offset: 3px;
}

@media (max-width: 520px) {
	.nmcc__cta {
		width: 100%;
	}
}

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