/* GachaPop Configurator. Everything is scoped under .gpc so the store theme is left alone. */
.gpc {
	--gpc-ink: #23202b;
	--gpc-muted: #6d6878;
	--gpc-paper: #fff8ee;
	--gpc-card: #ffffff;
	--gpc-line: #eadfce;
	--gpc-accent: #ff4d6d;
	--gpc-accent-ink: #ffffff;
	--gpc-pop: #ffd23f;
	--gpc-mint: #3ccfa0;
	--gpc-radius: 18px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	color: var(--gpc-ink);
	font-family: ui-rounded, "Nunito", "Quicksand", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.45;
	clear: both;
	margin: 0 0 32px;
}
.gpc *, .gpc *::before, .gpc *::after { box-sizing: border-box; }
.gpc [hidden] { display: none !important; }
.gpc .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 900px) {
	.gpc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: start; }
	.gpc-stage { position: sticky; top: 24px; }
}

/* ---------- preview ---------- */
.gpc-stage-card {
	background:
		radial-gradient(circle at 18% 12%, rgba(255, 210, 63, .35) 0 90px, transparent 91px),
		radial-gradient(circle at 88% 82%, rgba(60, 207, 160, .28) 0 120px, transparent 121px),
		var(--gpc-paper);
	border: 2px solid var(--gpc-ink);
	border-radius: calc(var(--gpc-radius) + 6px);
	box-shadow: 6px 6px 0 var(--gpc-ink);
	padding: 12px 12px 10px;
	overflow: hidden;
}
.gpc-canvas-wrap { position: relative; max-width: 560px; margin: 0 auto; }
.gpc-canvas {
	display: block; width: 100%; height: auto;
	cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
	outline-offset: 4px;
}
.gpc-canvas.is-dragging { cursor: grabbing; }
.gpc-loading {
	position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
	background: var(--gpc-ink); color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 99px;
	opacity: 0; transition: opacity .15s; pointer-events: none;
}
.gpc-canvas-wrap.is-loading .gpc-loading { opacity: .9; }
.gpc-rotate { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.gpc .gpc-rot {
	appearance: none; width: 44px; height: 44px; border-radius: 50%; padding: 0;
	border: 2px solid var(--gpc-ink); background: var(--gpc-card); color: var(--gpc-ink);
	font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 2px 2px 0 var(--gpc-ink);
	transition: transform .08s, box-shadow .08s;
}
.gpc .gpc-rot:hover { background: var(--gpc-pop); }
.gpc .gpc-rot:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--gpc-ink); }
.gpc-rot-label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gpc-muted); }
.gpc-note { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--gpc-muted); }
.gpc-badge {
	display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 14px 18px;
	background: var(--gpc-card); border: 2px solid var(--gpc-ink); border-radius: var(--gpc-radius); box-shadow: 4px 4px 0 var(--gpc-pop);
}
.gpc-badge img { width: 104px; height: 104px; object-fit: contain; flex: none; }
.gpc-badge-text { display: block; min-width: 0; }
.gpc-badge-text strong { display: block; font-size: 19px; line-height: 1.2; font-weight: 800; color: var(--gpc-ink); }
.gpc-badge-text small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--gpc-muted); }
@media (max-width: 480px) { .gpc-badge img { width: 84px; height: 84px; } .gpc-badge-text strong { font-size: 17px; } }

/* ---------- form ---------- */
.gpc-form { margin: 0; min-width: 0; }
.gpc .gpc-heading { margin: 0 0 18px; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; font-weight: 800; color: var(--gpc-ink); }
.gpc .gpc-step { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.gpc .gpc-step > legend {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; margin: 0 0 12px;
	font-size: 18px; font-weight: 800; color: var(--gpc-ink); border: 0;
}
.gpc-num {
	display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
	border-radius: 50%; background: var(--gpc-ink); color: #fff; font-size: 14px; font-weight: 800;
}
.gpc .gpc-step > legend b { font-weight: 600; color: var(--gpc-muted); font-size: 15px; }
.gpc-themed-note, .gpc-help { margin: 0; font-size: 14px; color: var(--gpc-muted); }
.gpc-help { margin-top: 8px; }

.gpc-cards { display: grid; gap: 12px; }
.gpc-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gpc-cards--4 { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.gpc-card { position: relative; display: block; margin: 0; cursor: pointer; }
.gpc-card input, .gpc-swatch input, .gpc-cage input, .gpc-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gpc-card-body {
	display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%;
	padding: 10px 10px 12px; text-align: center;
	background: var(--gpc-card); border: 2px solid var(--gpc-line); border-radius: var(--gpc-radius);
	transition: border-color .12s, box-shadow .12s, transform .12s;
}
.gpc-card:hover .gpc-card-body { border-color: var(--gpc-ink); }
.gpc-card input:checked + .gpc-card-body { border-color: var(--gpc-ink); box-shadow: 4px 4px 0 var(--gpc-accent); transform: translate(-2px, -2px); }
.gpc-card input:focus-visible + .gpc-card-body, .gpc-swatch input:focus-visible + span, .gpc-cage input:focus-visible + .gpc-cage-body, .gpc-pill input:focus-visible + span { outline: 3px solid var(--gpc-accent); outline-offset: 2px; }
.gpc-card-body .gpc-thumb { width: 100%; max-width: 150px; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.gpc-card-body strong { font-size: 15px; line-height: 1.2; font-weight: 800; }
.gpc-card-body small { font-size: 12.5px; color: var(--gpc-muted); line-height: 1.3; }
.gpc-price-tag { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 800; font-size: 14px; color: var(--gpc-accent); }

/* colors */
.gpc-zones { display: grid; gap: 12px; }
.gpc-zone { display: grid; gap: 6px; }
@media (min-width: 560px) { .gpc-zone { grid-template-columns: 190px 1fr; align-items: center; } }
.gpc-zone-label { font-weight: 700; font-size: 15px; }
.gpc-zone-label b { display: block; font-weight: 500; font-size: 13px; color: var(--gpc-muted); }
.gpc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.gpc-swatch { position: relative; margin: 0; cursor: pointer; }
.gpc-swatch > span:not(.screen-reader-text) {
	display: block; width: 38px; height: 38px; border-radius: 50%;
	border: 2px solid rgba(35, 32, 43, .25); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12);
	transition: transform .1s;
}
.gpc-swatch:hover > span:not(.screen-reader-text) { transform: scale(1.08); }
.gpc-swatch input:checked + span { border-color: var(--gpc-ink); box-shadow: 0 0 0 3px var(--gpc-card), 0 0 0 5px var(--gpc-ink), inset 0 -4px 0 rgba(0, 0, 0, .12); }

/* cages */
.gpc-cages { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 330px; overflow: auto; padding: 4px 6px 6px 4px; border-radius: 12px; }
.gpc-cage { position: relative; margin: 0; cursor: pointer; }
.gpc-cage-body { display: block; padding: 5px; background: var(--gpc-card); border: 2px solid var(--gpc-line); border-radius: 12px; text-align: center; }
.gpc-cage-body .gpc-thumb { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 7px; background: var(--gpc-paper); }
.gpc-cage-body small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.2; color: var(--gpc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gpc-cage:hover .gpc-cage-body { border-color: var(--gpc-ink); }
.gpc-cage input:checked + .gpc-cage-body { border-color: var(--gpc-ink); box-shadow: 3px 3px 0 var(--gpc-accent); }

/* pills + stepper */
.gpc-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.gpc-pill { position: relative; margin: 0; cursor: pointer; }
.gpc-pill span { display: block; padding: 10px 18px; border-radius: 99px; background: var(--gpc-card); border: 2px solid var(--gpc-line); font-weight: 700; font-size: 15px; }
.gpc-pill:hover span { border-color: var(--gpc-ink); }
.gpc-pill input:checked + span { background: var(--gpc-ink); border-color: var(--gpc-ink); color: #fff; }
.gpc-stepper { display: inline-flex; align-items: center; border: 2px solid var(--gpc-ink); border-radius: 99px; overflow: hidden; background: var(--gpc-card); }
.gpc .gpc-step-btn { appearance: none; border: 0; background: transparent; color: var(--gpc-ink); width: 44px; height: 44px; font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.gpc .gpc-step-btn:hover { background: var(--gpc-pop); }
.gpc .gpc-stepper input[type="number"] { width: 64px; height: 44px; border: 0; background: transparent; text-align: center; font: inherit; font-weight: 800; font-size: 17px; color: var(--gpc-ink); -moz-appearance: textfield; padding: 0; margin: 0; box-shadow: none; }
.gpc .gpc-stepper input::-webkit-outer-spin-button, .gpc .gpc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* summary */
.gpc-summary { margin-top: 8px; padding: 18px; background: var(--gpc-paper); border: 2px solid var(--gpc-ink); border-radius: var(--gpc-radius); }
.gpc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; }
.gpc-total-value { font-size: 30px; font-weight: 800; line-height: 1; }
.gpc-lead { margin: 8px 0 0; font-size: 14px; color: var(--gpc-muted); }
.gpc-buy { display: flex; gap: 12px; align-items: stretch; margin-top: 14px; }
.gpc-qty { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; }
.gpc .gpc-qty input { width: 68px; height: 50px; border: 2px solid var(--gpc-ink); border-radius: 12px; text-align: center; font: inherit; font-weight: 700; background: var(--gpc-card); color: var(--gpc-ink); padding: 0 4px; margin: 0; }
.gpc .gpc-add, .gpc .gpc-add.button.alt {
	flex: 1; min-height: 50px; padding: 0 22px; border-radius: 12px; cursor: pointer;
	border: 2px solid var(--gpc-ink); background: var(--gpc-accent); color: var(--gpc-accent-ink);
	font: inherit; font-size: 17px; font-weight: 800; letter-spacing: .01em; box-shadow: 4px 4px 0 var(--gpc-ink);
	transition: transform .08s, box-shadow .08s; text-transform: none;
}
.gpc .gpc-add:hover { background: #ff3358; color: #fff; }
.gpc .gpc-add:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gpc-ink); }

.gpc-title { margin-bottom: 18px; }
.gpc-after { clear: both; }

@media (max-width: 480px) {
	.gpc-cards--2 { gap: 8px; }
	.gpc-card-body { padding: 8px 6px 10px; }
	.gpc-buy { flex-wrap: wrap; }
	.gpc-stage-card { box-shadow: 4px 4px 0 var(--gpc-ink); }
}
@media (prefers-reduced-motion: reduce) {
	.gpc * { transition: none !important; }
}
