/* CityShirt Gruppo — configuratore una grafica per maglia */

.csg-form {
	--csg-bd: #e2e5ea;
	--csg-mut: #6b7280;
	--csg-acc: #d1141e;
	margin: 18px 0 0;
	font-size: 15px;
}

.csg-intro {
	background: #f6f8fa;
	border: 1px solid var(--csg-bd);
	border-radius: 10px;
	padding: 14px 16px;
	line-height: 1.6;
	margin-bottom: 20px;
}

.csg-step { margin-bottom: 24px; }

.csg-step h4 {
	font-size: 16px;
	margin: 0 0 10px;
	font-weight: 700;
}

.csg-hint {
	color: var(--csg-mut);
	font-size: 13px;
	line-height: 1.6;
	margin: 8px 0 0;
}

.csg-muted { color: var(--csg-mut); font-size: 12.5px; }

/* ── Chip (occasioni e modalità grafica) */
.csg-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.csg-chip {
	border: 1px solid var(--csg-bd);
	background: #fff;
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 13.5px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	line-height: 1.2;
}

.csg-chip:hover { border-color: #b9bec7; }

.csg-chip.is-active {
	background: #111;
	border-color: #111;
	color: #fff;
}

.csg-chip--sm { padding: 5px 10px; font-size: 12.5px; }

/* ── Colori */
.csg-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.csg-swatch {
	width: 30px; height: 30px;
	border-radius: 50%;
	border: 2px solid var(--csg-bd);
	cursor: pointer;
	padding: 0;
}

.csg-swatch.is-active { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }

/* ── Stepper quantità */
.csg-stepper { display: flex; align-items: center; gap: 0; }

.csg-stepper button {
	width: 42px; height: 42px;
	border: 1px solid var(--csg-bd);
	background: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
}

.csg-stepper button:first-of-type { border-radius: 8px 0 0 8px; }
.csg-stepper button:last-of-type  { border-radius: 0 8px 8px 0; }
.csg-stepper button:hover { background: #f3f4f6; }

.csg-stepper input {
	width: 70px; height: 42px;
	text-align: center;
	border: 1px solid var(--csg-bd);
	border-left: 0; border-right: 0;
	font-size: 16px; font-weight: 700;
	-moz-appearance: textfield;
}

.csg-stepper input::-webkit-outer-spin-button,
.csg-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Grafica comune */
.csg-check {
	display: flex; align-items: flex-start; gap: 8px;
	margin-top: 16px; cursor: pointer; line-height: 1.5;
}

.csg-check input { margin-top: 3px; }

.csg-comune { margin-top: 10px; }

.csg-file-btn {
	display: inline-block;
	border: 1px dashed #b9bec7;
	border-radius: 8px;
	padding: 10px 16px;
	cursor: pointer;
	font-size: 13.5px;
	background: #fafbfc;
}

.csg-file-btn:hover { border-color: #111; }
.csg-file-btn input { display: none; }
.csg-file-btn--sm { padding: 7px 12px; font-size: 12.5px; }

.csg-ok { color: #0a7c3a; font-size: 13px; margin-left: 10px; font-weight: 600; }

/* ── Righe maglia */
.csg-rows { list-style: none; margin: 12px 0 0; padding: 0; }

.csg-row {
	display: grid;
	grid-template-columns: 30px minmax(0, 1fr) 84px;
	gap: 8px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #f0f2f5;
}

.csg-row__n {
	width: 26px; height: 26px;
	border-radius: 50%;
	background: #111; color: #fff;
	font-size: 12px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}

.csg-input, .csg-taglia {
	border: 1px solid var(--csg-bd);
	border-radius: 8px;
	padding: 9px 10px;
	font: inherit;
	font-size: 14px;
	width: 100%;
	min-width: 0;
	background: #fff;
}

.csg-input:focus, .csg-taglia:focus { outline: 2px solid #111; outline-offset: -1px; }

.csg-graf {
	grid-column: 2 / -1;
	display: flex; flex-direction: column; gap: 8px;
}

.csg-graf__in:empty { display: none; }

/* ── Riepilogo */
.csg-summary {
	background: #f6f8fa;
	border: 1px solid var(--csg-bd);
	border-radius: 10px;
	padding: 16px;
	margin: 20px 0 14px;
}

.csg-sum-line {
	display: flex; justify-content: space-between;
	padding: 5px 0; font-size: 14.5px;
}

.csg-sum-total {
	display: flex; justify-content: space-between;
	border-top: 1px solid var(--csg-bd);
	margin-top: 10px; padding-top: 12px;
	font-size: 19px; font-weight: 700;
}

/* ── Problemi */
.csg-problemi {
	list-style: none;
	margin: 0 0 14px; padding: 12px 16px;
	background: #fff5f5;
	border: 1px solid #f5c2c2;
	border-radius: 10px;
	color: #9b1c1c;
	font-size: 13.5px;
	line-height: 1.8;
}

/* ── Pulsante */
.csg-submit {
	width: 100%;
	padding: 15px 20px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	border-radius: 10px !important;
}

.csg-submit:disabled { opacity: .6; cursor: wait; }

/*
 * La barra sticky di Porto ripropone un "aggiungi al carrello" che ignora il configuratore:
 * lasciarla visibile significa far comprare un gruppo senza nomi, taglie né file.
 */
.csg-product .sticky-product,
.csg-product .product-sticky-bar,
.csg-product .sticky-product-wrap { display: none !important; }

@media (max-width: 575px) {
	.csg-row { grid-template-columns: 26px minmax(0, 1fr) 72px; gap: 6px; }
	.csg-chip { padding: 7px 11px; font-size: 12.5px; }
	.csg-sum-total { font-size: 17px; }
}
