/**
 * Red Stone — Configuratore (nuovo, RWP). Stili base RESPONSIVE da subito.
 * Le classi usano il prefisso rwp- per non collidere col configuratore legacy.
 */
:root {
	--rwp-primary: #C0182A;
	--rwp-dark: #820000;
	--rwp-ink: #1a1a1a;
	--rwp-border: #e4e0dc;
}

.rwp-cfg {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
	font-family: "DM Sans", sans-serif;
	margin: 1.5rem 0;
}
.rwp-cfg * { box-sizing: border-box; }

/* Colonna step (sinistra) e anteprima (destra) */
.rwp-cfg-steps { flex: 1 1 58%; min-width: 0; }
.rwp-cfg-preview { flex: 1 1 36%; min-width: 280px; position: sticky; top: 80px; }

/* Step accordion */
.rwp-step {
	background: #fff;
	border: 1px solid var(--rwp-border);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: -1px;
}
.rwp-step.is-open { box-shadow: 0 2px 16px rgba(0, 0, 0, .06); border-color: var(--rwp-primary); }
.rwp-step-hd {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	cursor: pointer;
	user-select: none;
}
.rwp-step-hd:hover { background: #faf8f6; }
.rwp-step-n {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--rwp-border);
	color: #777;
	display: flex; align-items: center; justify-content: center;
	font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
.rwp-step.is-open .rwp-step-n { background: var(--rwp-primary); color: #fff; }
.rwp-step-t { font-weight: 600; font-size: .9rem; }
.rwp-step-bd { max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .25s ease; }
.rwp-step.is-open .rwp-step-bd { max-height: 3000px; padding: 0 18px 18px; }

/* Opzioni in griglia (responsive) */
.rwp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.rwp-opt {
	border: 2px solid var(--rwp-border);
	border-radius: 10px;
	padding: 12px;
	cursor: pointer;
	text-align: center;
	transition: border-color .15s, background .15s;
}
.rwp-opt:hover { border-color: #C8A84B; }
.rwp-opt.is-sel { border-color: var(--rwp-primary); background: #fdf5f5; }

.rwp-field { margin-bottom: 12px; }
.rwp-field label { display: block; font-size: .78rem; font-weight: 600; color: #555; margin-bottom: 6px; }
.rwp-input {
	width: 100%;
	padding: 10px;
	border: 1.5px solid var(--rwp-border);
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
}

/* Anteprima */
.rwp-pv-card { background: #fff; border: 1px solid var(--rwp-border); border-radius: 12px; padding: 16px; box-shadow: 0 2px 16px rgba(0, 0, 0, .06); }
.rwp-pv-title { text-align: center; font-size: .72rem; letter-spacing: 1px; text-transform: uppercase; color: #999; margin-bottom: 10px; }
.rwp-pv-wrap { background: #f8f7f5; border-radius: 8px; padding: 12px; display: flex; align-items: center; justify-content: center; }
.rwp-pv-canvas { max-width: 100%; height: auto; display: block; }

.rwp-cfg-bottom { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.rwp-cfg-riepilogo { flex: 1 1 100%; min-width: 160px; padding: 10px 12px; background: #fff; border: 1px solid var(--rwp-border); border-radius: 10px; font-size: .82rem; }
.rwp-cfg-prezzo { flex: 1 1 100%; padding: 10px 14px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 10px; text-align: center; font-weight: 700; }

/* ── Fase B: componenti UI ──────────────────────────────────────────── */
.rwp-cfg [hidden] { display: none !important; }

.rwp-step-hd { justify-content: flex-start; }
.rwp-step-s { margin-left: auto; font-size: .72rem; color: var(--rwp-primary); font-weight: 600; text-align: right; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rwp-sub { font-size: .78rem; color: #777; font-weight: 600; margin: 14px 0 8px; }
.rwp-hint { font-size: .72rem; color: #777; margin-top: 8px; }
.rwp-empty { color: #666; font-size: .82rem; grid-column: 1 / -1; }

/* Dimensioni */
.rwp-dim-row { display: flex; gap: 12px; align-items: flex-end; }
.rwp-dim-row .rwp-field { flex: 1; margin-bottom: 0; }
.rwp-dim { text-align: center; font-weight: 600; }
.rwp-dim-x { font-size: 1.2rem; font-weight: 600; color: #777; padding-bottom: 10px; }
.rwp-input.rwp-req { border-color: var(--rwp-primary); }
.rwp-cmq { background: #f0f4ff; border: 1px solid #c0cfe8; border-radius: 8px; padding: 8px 14px; font-size: .82rem; margin-top: 12px; text-align: center; }
.rwp-cmq strong { color: #2d5a27; }

/* Materiali */
.rwp-mat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rwp-swatch { width: 100%; height: 26px; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); }
.rwp-mat-name { font-weight: 600; font-size: .82rem; }
.rwp-mat-price { font-size: .75rem; color: #777; }
.rwp-mat-price strong { color: #2d5a27; }

/* Plexi colori */
.rwp-plexi { margin-top: 14px; border-top: 1px solid #f0eeeb; padding-top: 12px; }
.rwp-plexi-row { display: flex; gap: 16px; flex-wrap: wrap; }
.rwp-plexi-row .rwp-field { flex: 1; min-width: 120px; }
.rwp-color-pick { display: flex; gap: 8px; align-items: center; }
.rwp-color-pick input[type="color"] { width: 40px; height: 32px; border: 1.5px solid var(--rwp-border); border-radius: 6px; cursor: pointer; padding: 2px; }
.rwp-hex { width: 90px; font-family: monospace; font-size: .78rem; padding: 6px 8px; }

/* Forme / angoli */
.rwp-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rwp-angoli { grid-template-columns: repeat(4, 1fr); }
.rwp-shape { border: 2px solid var(--rwp-border); border-radius: 10px; padding: 8px 4px; cursor: pointer; text-align: center; color: #555; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: border-color .15s, background .15s; }
.rwp-shape:hover { border-color: #C8A84B; }
.rwp-shape.is-sel { border-color: var(--rwp-primary); background: #fdf5f5; color: var(--rwp-primary); }
.rwp-shape span { font-size: .62rem; font-weight: 600; }
.rwp-shape em { font-size: .6rem; color: var(--rwp-primary); font-style: normal; }

.rwp-slider-wrap { margin-top: 10px; }
.rwp-sg { display: flex; align-items: center; gap: 8px; }
.rwp-sg label { min-width: 40px; font-size: .72rem; color: #555; font-weight: 600; margin: 0; }
.rwp-sg input[type="range"] { flex: 1; min-width: 60px; }

/* Bordo */
.rwp-bords { display: flex; gap: 8px; }
.rwp-brd { flex: 1; border: 2px solid var(--rwp-border); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; font-size: .82rem; font-weight: 600; }
.rwp-brd:hover { border-color: #C8A84B; }
.rwp-brd.is-sel { border-color: var(--rwp-primary); background: #fdf5f5; color: var(--rwp-primary); }

/* Righe testo */
.rwp-trow { margin-bottom: 10px; }
.rwp-tctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 8px; background: #faf8f6; border-radius: 8px; }
.rwp-tctrls[hidden] { display: none !important; }
.rwp-fbtn { width: 30px; height: 30px; border: 1.5px solid var(--rwp-border); background: #fff; border-radius: 6px; cursor: pointer; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; }
.rwp-fbtn.rwp-reset-all { width: auto; padding: 0 8px; font-size: .65rem; color: #888; }
.rwp-fbtn.on { border-color: var(--rwp-primary); background: #fdf5f5; color: var(--rwp-primary); }
.rwp-font-sel { font-size: .7rem; border: 1.5px solid var(--rwp-border); border-radius: 6px; padding: 4px; cursor: pointer; max-width: 110px; }
.rwp-sep { width: 1px; height: 22px; background: var(--rwp-border); }
.rwp-sg-rst { border: none; background: none; cursor: pointer; color: #999; font-size: .9rem; padding: 0 2px; }
.rwp-tctrls .rwp-sg { flex: 1 1 100%; }

/* File grafico */
.rwp-fdrop { border: 2px dashed var(--rwp-border); border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; }
.rwp-fdrop:hover { border-color: #C8A84B; background: #faf8f6; }
.rwp-fdrop p { font-size: .82rem; color: #777; margin: 4px 0 0; }
.rwp-fdrop strong { color: #333; }
.rwp-fdrop small { font-size: .75rem; }
.rwp-plus { color: #2d5a27; font-style: normal; font-weight: 700; }
.rwp-file-info { font-size: .82rem; margin: 8px 0; color: #888; }
.rwp-file-info.ok { color: #2a7a2a; }
.rwp-file-info.err { color: #c00; }
.rwp-img-sliders { margin-bottom: 10px; }
.rwp-optchk { display: flex; align-items: center; gap: 10px; margin-top: 10px; cursor: pointer; }
.rwp-optchk span { font-size: .82rem; }
.rwp-optchk small { color: #777; font-size: .78rem; }
.rwp-optchk em { margin-left: auto; white-space: nowrap; }

/* Anteprima extra */
.rwp-pv-hint { font-size: .7rem; color: #777; text-align: center; margin-top: 10px; }
.rwp-pos-rst { display: flex; justify-content: center; margin-top: 6px; }
.rwp-prezzo-lbl { font-size: .72rem; color: #777; text-transform: uppercase; }
.rwp-prezzo-val { font-family: "Playfair Display", serif; font-size: 1.6rem; font-weight: 700; color: #1a3a5c; }
.rwp-prezzo-tot { font-size: .75rem; color: #2d5a27; font-weight: 600; margin-top: 2px; }

/* Bottone disabilitato */
.rwp-btn-disabled { opacity: .5; cursor: not-allowed !important; }

/* Override difensivo: i temi WooCommerce stilano `button` (rosso pieno) e
   sovrascriverebbero i pulsanti di controllo. Forziamo l'aspetto neutro,
   con lo stato attivo (.on) in rosso. Scope .rwp-cfg per non toccare altro. */
.rwp-cfg button.rwp-fbtn,
.rwp-cfg button.rwp-sg-rst {
	background: #fff !important;
	color: #777 !important;
	border-radius: 6px !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	font-weight: 600 !important;
}
.rwp-cfg button.rwp-fbtn { border: 1.5px solid var(--rwp-border) !important; }
.rwp-cfg button.rwp-sg-rst { border: none !important; }
.rwp-cfg button.rwp-fbtn.on {
	background: #fdf5f5 !important;
	border-color: var(--rwp-primary) !important;
	color: var(--rwp-primary) !important;
}

/* ── Medagliette (Fase D) ───────────────────────────────────────────── */
.rwp-shapes-med { grid-template-columns: repeat(4, 1fr); }
.rwp-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.rwp-sz { border: 2px solid var(--rwp-border); border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: .85rem; }
.rwp-sz:hover { border-color: #C8A84B; }
.rwp-sz.is-sel { border-color: var(--rwp-primary); background: #fdf5f5; color: var(--rwp-primary); }

/* Tab fronte/retro (pannello personalizzazione) */
.rwp-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.rwp-tab { flex: 1; text-align: center; padding: 8px; border: 1.5px solid var(--rwp-border); border-radius: 8px; cursor: pointer; font-size: .8rem; font-weight: 600; color: #777; }
.rwp-tab.is-act { border-color: var(--rwp-primary); background: #fdf5f5; color: var(--rwp-primary); }

/* Tab anteprima fronte/retro */
.rwp-pvtabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.rwp-pvtab { padding: 4px 14px; border: 1.5px solid var(--rwp-border); border-radius: 999px; cursor: pointer; font-size: .75rem; font-weight: 600; color: #777; }
.rwp-pvtab.is-act { border-color: var(--rwp-primary); background: var(--rwp-primary); color: #fff; }

@media (max-width: 430px) {
	.rwp-shapes-med { grid-template-columns: repeat(3, 1fr); }
}

/* ── Targhe Bagno / fisse (Fase D2) ─────────────────────────────────── */
.rwp-cfg-rstf .rwp-pv-canvas { background: #f9f8f6; }
.rwp-rstf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
/* Specificità alta + !important per battere lo stile generico `button` del tema. */
.rwp-cfg-rstf button.rwp-pill {
	padding: 7px 14px !important;
	border: 1.5px solid var(--rwp-border) !important;
	border-radius: 20px !important;
	background: #fff !important;
	font-size: .8rem !important;
	font-weight: 500 !important;
	color: #555 !important;
	cursor: pointer;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.2 !important;
	box-shadow: none !important;
	transition: all .15s ease;
}
.rwp-cfg-rstf button.rwp-pill:hover { border-color: var(--rwp-dark) !important; color: var(--rwp-dark) !important; background: #fff !important; }
.rwp-cfg-rstf button.rwp-pill.is-act { background: var(--rwp-dark) !important; border-color: var(--rwp-dark) !important; color: #fff !important; font-weight: 600 !important; }
.rwp-rstf-unavail { margin-top: 12px; padding: 10px 14px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 6px; font-size: .85rem; color: #856404; }

/* ── Mobile: anteprima in cima, una colonna ─────────────────────────── */
@media (max-width: 768px) {
	.rwp-cfg { flex-direction: column; gap: 0; }
	.rwp-cfg-steps, .rwp-cfg-preview { flex: 1 1 100%; max-width: 100%; min-width: 0; }
	.rwp-cfg-preview { position: static; order: -1; margin-bottom: 16px; }
	.rwp-pv-wrap { max-height: 220px; }
	.rwp-options { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
	.rwp-shapes { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 430px) {
	.rwp-options { grid-template-columns: repeat(2, 1fr); }
	.rwp-shapes, .rwp-angoli { grid-template-columns: repeat(3, 1fr); }
	.rwp-tctrls .rwp-sg { flex: 1 1 100%; }
}

/* Host pulsante "Salva in preventivo" (iniettato da redstone-suite-b2b per rivenditori in listino B2C). */
.rwp-pv-cart:empty { display: none; }
.rwp-pv-cart { display: flex; justify-content: center; margin-top: 10px; }
.rwp-pv-cart .rs-save-to-preventivo { width: 100%; margin-left: 0 !important; text-align: center; }

/* ════════════════════════════════════════════════════════════════════════
   MEDAGLIETTE — layout nuovo (v2), impostato come targhettacane.it
   Riga materiali, quattro pannelli affiancati e numerati con la spunta,
   sotto incisione fronte/retro e anteprima. Nessun controllo di posizione.
   ════════════════════════════════════════════════════════════════════════ */

.rwp-cfg-med2 {
	display: block;
	width: 100%;
	--rwp-ok: #2e9e4f;
	--rwp-pnl-bg: #faf9f8;
}

/* Numerazione dei passi con un contatore: un pannello nascosto non consuma
   un numero, perché gli elementi display:none non incrementano i contatori. */
.rwp-cfg-med2 { counter-reset: rwp-passo; }
.rwp-m2-pnl   { counter-increment: rwp-passo; }
.rwp-m2-num::before { content: counter(rwp-passo); }

/* Spunta di selezione: c'è sempre nel markup, si vede solo sulla scelta attiva. */
.rwp-m2-check {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--rwp-ok);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .15s, transform .15s;
	pointer-events: none;
}

.rwp-m2-check svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: #fff;
	stroke-width: 3.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.is-sel > .rwp-m2-check { opacity: 1; transform: scale(1); }

/* ── Riga materiali ────────────────────────────────────────────────────── */

.rwp-m2-famiglie {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin-bottom: 18px;
}

/* I temi WooCommerce colorano i <button> di rosso pieno: qui servono schede
   chiare, quindi gli override sono volutamente forti. */
.rwp-m2-fam {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 12px 14px;
	background: var(--rwp-pnl-bg) !important;
	border: 2px solid var(--rwp-border) !important;
	border-radius: 16px;
	cursor: pointer;
	color: var(--rwp-ink) !important;
	font: inherit;
	text-transform: none;
	line-height: 1.25;
	transition: border-color .15s, box-shadow .15s;
}

.rwp-m2-fam:hover { border-color: #bdb8b4 !important; }

.rwp-m2-fam.is-sel {
	border-color: var(--rwp-ok) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(46, 158, 79, .12);
}

.rwp-m2-fam-prezzo {
	position: absolute;
	top: -9px;
	left: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--rwp-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

/* Pastiglia materiale: un cerchio con la TEXTURE, non la medaglietta intera.
   Si ingrandisce la foto e se ne guarda il centro, così del prodotto resta solo
   la superficie — ottone, acciaio, legno — e la riga in alto diventa un menu per
   scegliere il materiale invece di un secondo elenco di sagome. */
.rwp-m2-fam-img {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff center/260% no-repeat;
	border: 1px solid var(--rwp-border);
}

.rwp-m2-fam-img.is-vuota {
	background-image: repeating-linear-gradient(45deg, #eee, #eee 5px, #f7f7f7 5px, #f7f7f7 10px);
}

.rwp-m2-fam-nome { font-size: 13px; font-weight: 600; text-align: center; }

/* ── I quattro pannelli ────────────────────────────────────────────────── */

.rwp-m2-pannelli {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	align-items: start;
	margin-bottom: 22px;
}

.rwp-m2-pnl {
	background: var(--rwp-pnl-bg);
	border: 1px solid var(--rwp-border);
	border-radius: 16px;
	padding: 10px;
	min-width: 0;
}

.rwp-m2-pnl-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 12px;
	padding: 9px 12px;
	background: #fff;
	border-radius: 11px;
	font-size: 15px;
	font-weight: 700;
	color: var(--rwp-ink);
}

.rwp-m2-num {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--rwp-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.rwp-m2-pnl-body { padding: 0 2px 2px; }

.rwp-m2-nota {
	margin: 10px 0 0;
	font-size: 11px;
	line-height: 1.35;
	color: #7a7a7a;
}

/* ── Sagome ────────────────────────────────────────────────────────────── */

.rwp-m2-shapes {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.rwp-m2-shape {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 4px 8px;
	background: #fff !important;
	border: 2px solid transparent !important;
	border-radius: 12px;
	cursor: pointer;
	color: var(--rwp-ink) !important;
	font: inherit;
	text-transform: none;
	transition: border-color .15s;
}

.rwp-m2-shape img,
.rwp-m2-shape-ph { width: 52px; height: 52px; object-fit: contain; }

.rwp-m2-shape-ph {
	border-radius: 50%;
	background: repeating-linear-gradient(45deg, #eee, #eee 5px, #f7f7f7 5px, #f7f7f7 10px);
}

/* Per questa combinazione la foto manca. Si mostra la sagoma vuota invece
   della foto di un ALTRO materiale — che era quello che succedeva, e faceva
   ordinare la cosa sbagliata. Il tratteggio dice «manca la foto» invece di
   far sembrare che il pezzo sia grigio. */
.rwp-m2-shape--senza-foto .rwp-m2-shape-ph {
	border: 1px dashed #cfc9c4;
}

.rwp-m2-shape-name {
	font-size: 11px;
	line-height: 1.2;
	text-align: center;
	word-break: break-word;
}

.rwp-m2-shape:hover  { border-color: #dcd7d3 !important; }
.rwp-m2-shape.is-sel { border-color: var(--rwp-ok) !important; }

/* ── Dimensioni ────────────────────────────────────────────────────────── */

.rwp-m2-sizes { display: flex; flex-direction: column; gap: 8px; }

.rwp-m2-size {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 10px 6px;
	background: #fff !important;
	border: 2px solid transparent !important;
	border-radius: 12px;
	cursor: pointer;
	color: var(--rwp-ink) !important;
	font: inherit;
	text-transform: none;
}

.rwp-m2-size:hover  { border-color: #dcd7d3 !important; }
.rwp-m2-size.is-sel { border-color: var(--rwp-ok) !important; }

/* L'icona mostra il prodotto scelto, in scala crescente con la taglia. */
.rwp-m2-size-icona {
	display: flex;
	align-items: center;
	justify-content: center;
	background: center/contain no-repeat;
}

.rwp-m2-size-1 .rwp-m2-size-icona { width: 40px; height: 40px; }
.rwp-m2-size-2 .rwp-m2-size-icona { width: 50px; height: 50px; }
.rwp-m2-size-3 .rwp-m2-size-icona { width: 60px; height: 60px; }

.rwp-m2-size-icona.is-vuota {
	border: 1px dashed #d8d3cf;
	border-radius: 10px;
}

/* La lettera sta sopra la foto del prodotto, che puo' essere scura: serve un
   fondo suo, non un semplice alone. */
.rwp-m2-size-lab {
	padding: 1px 8px;
	border-radius: 7px;
	background: rgba(255, 255, 255, .93);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
	font-size: 14px;
	font-weight: 700;
	color: var(--rwp-ink);
}

.rwp-m2-size-mm { font-size: 11px; color: #7a7a7a; white-space: nowrap; }

/* ── Colori ────────────────────────────────────────────────────────────── */

.rwp-m2-colors {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	justify-items: center;
}

.rwp-m2-color {
	position: relative;
	display: block !important;
	padding: 4px !important;
	background: transparent !important;
	border: 2px solid transparent !important;
	border-radius: 50%;
	cursor: pointer;
	line-height: 0;
}

.rwp-m2-color-dot {
	display: block;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .15);
}

.rwp-m2-color:hover  { border-color: #dcd7d3 !important; }
.rwp-m2-color.is-sel { border-color: var(--rwp-ok) !important; }

.rwp-m2-color .rwp-m2-check { top: -2px; right: -2px; width: 18px; height: 18px; }
.rwp-m2-color .rwp-m2-check svg { width: 11px; height: 11px; }

/* ── Design ────────────────────────────────────────────────────────────── */

.rwp-m2-design-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.rwp-m2-freccia {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	background: #fff !important;
	border: 1px solid var(--rwp-border) !important;
	border-radius: 50%;
	cursor: pointer;
	color: var(--rwp-ink) !important;
	font-size: 14px;
	line-height: 1;
}

.rwp-m2-freccia:hover { border-color: var(--rwp-primary) !important; }

.rwp-m2-designs {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	min-width: 0;
}

.rwp-m2-design {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 8px 4px;
	/* SOLO il colore, non la scorciatoia `background`: quella, essendo
	   !important, cancellava anche l'immagine della medaglietta che il
	   configuratore mette sul riquadro, e il pannello restava bianco. */
	background-color: #fff !important;
	border: 2px solid transparent !important;
	border-radius: 12px;
	cursor: pointer;
	color: var(--rwp-ink) !important;
	font: inherit;
	text-transform: none;
}

.rwp-m2-design img { width: 46px; height: 46px; object-fit: contain; }

.rwp-m2-design-none {
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: #c4c0bc;
}

.rwp-m2-design-name { font-size: 11px; line-height: 1.2; text-align: center; }

.rwp-m2-design:hover  { border-color: #dcd7d3 !important; }
.rwp-m2-design.is-sel { border-color: var(--rwp-ok) !important; }

/* ── Parte bassa: incisione + anteprima ────────────────────────────────── */

.rwp-m2-basso {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
	gap: 22px;
	align-items: start;
}

.rwp-m2-incisione { min-width: 0; }

.rwp-m2-lato { margin-bottom: 14px; }

/* Il lato mostrato nell'anteprima è evidenziato, ma si scrive su entrambi
   senza cambiare scheda. */
.rwp-m2-lato.is-attivo { border-color: var(--rwp-primary); }

.rwp-m2-vedi {
	margin-left: auto;
	padding: 3px 12px !important;
	background: #fff !important;
	border: 1px solid var(--rwp-border) !important;
	border-radius: 999px;
	cursor: pointer;
	color: #7a7a7a !important;
	font-size: 11px;
	font-weight: 600;
	text-transform: none;
}

.rwp-m2-lato.is-attivo .rwp-m2-vedi {
	background: var(--rwp-primary) !important;
	border-color: var(--rwp-primary) !important;
	color: #fff !important;
}

.rwp-m2-field { display: block; margin-bottom: 10px; }

.rwp-m2-field > span {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 600;
	color: #6a6a6a;
}

.rwp-m2-tin,
.rwp-m2-font {
	width: 100%;
	margin-bottom: 8px;
	padding: 10px 12px;
	border: 1px solid var(--rwp-border);
	border-radius: 9px;
	font-size: 15px;
	background: #fff;
}

.rwp-m2-tin[hidden] { display: none; }

.rwp-m2-tin:focus,
.rwp-m2-font:focus {
	outline: none;
	border-color: var(--rwp-primary);
	box-shadow: 0 0 0 3px rgba(192, 24, 42, .1);
}
.rwp-cfg-med2 .rwp-optchk {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 14px;
	cursor: pointer;
}

/* ── Anteprima e acquisto ──────────────────────────────────────────────── */

.rwp-m2-sticky { position: sticky; top: 80px; }

.rwp-m2-canvas-card {
	background: #fff;
	border: 1px solid var(--rwp-border);
	border-radius: 16px;
	padding: 12px;
	text-align: center;
}

.rwp-m2-canvas {
	width: 100%;
	max-width: 340px;
	height: auto;
	aspect-ratio: 1 / 1;
	display: block;
	margin: 0 auto;
}

.rwp-m2-hint {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #7a7a7a;
}

.rwp-m2-buy {
	background: #fff;
	border: 1px solid var(--rwp-border);
	border-radius: 16px;
	padding: 16px;
	margin-top: 14px;
}

.rwp-m2-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.rwp-m2-price-val {
	font-size: 30px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--rwp-ink);
}

.rwp-m2-price-un { font-size: 13px; color: #7a7a7a; }

.rwp-m2-cart { margin-top: 14px; }
.rwp-m2-cart .quantity { margin: 0 0 10px; display: block; }
.rwp-m2-cart .single_add_to_cart_button { width: 100%; display: block; }

.rwp-m2-cart .single_add_to_cart_button[disabled],
.rwp-m2-cart .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; }

.rwp-pv-cart:empty { display: none; }
.rwp-pv-cart { margin-top: 10px; }
.rwp-pv-cart button { width: 100%; }

/* ── Schede anteprima e bordi ──────────────────────────────────────────── */

.rwp-cfg-med2 .rwp-pvtabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }

.rwp-cfg-med2 .rwp-pvtab {
	padding: 6px 16px !important;
	background: #f2f0ee !important;
	border: 0 !important;
	border-radius: 999px;
	cursor: pointer;
	color: #6a6a6a !important;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
}

.rwp-cfg-med2 .rwp-pvtab.is-act { background: var(--rwp-primary) !important; color: #fff !important; }
.rwp-cfg-med2 .rwp-pvtab[disabled] { opacity: .4; cursor: not-allowed; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
	.rwp-m2-pannelli { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.rwp-m2-basso { grid-template-columns: 1fr; }

	/* L'anteprima sale in cima e resta in vista mentre si scorre: è il punto
	   in cui si legge l'effetto di ogni scelta. */
	.rwp-m2-side      { grid-row: 1; }
	.rwp-m2-incisione { grid-row: 2; }

	.rwp-m2-sticky {
		position: sticky;
		top: 0;
		z-index: 20;
		background: #fff;
		padding-bottom: 8px;
	}

	.rwp-m2-canvas { max-width: 200px; }
	.rwp-m2-canvas-card { padding: 8px; }
	.rwp-m2-hint { display: none; }
}

@media (max-width: 560px) {
	.rwp-m2-pannelli { grid-template-columns: 1fr; gap: 10px; }
	.rwp-m2-famiglie { grid-template-columns: repeat(2, 1fr); }
	.rwp-m2-sizes { flex-direction: row; flex-wrap: wrap; }
	.rwp-m2-sizes .rwp-m2-size { flex: 1 1 90px; }
	.rwp-m2-canvas { max-width: 170px; }
	.rwp-m2-price-val { font-size: 24px; }
}

/* ── Fronte e Retro affiancati ─────────────────────────────────────────────
   I due lati stanno uno accanto all'altro, ognuno con la sua anteprima a
   sinistra e i suoi campi a destra: si vede subito cosa si incide su quale
   faccia, senza passare da una linguetta all'altra. */
.rwp-m2-incisione {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	align-items: start;
}

/* La spunta del controllo grafica sta sotto, larga quanto tutte e due. */
.rwp-m2-incisione > .rwp-optchk { grid-column: 1 / -1; }

.rwp-m2-lato { margin-bottom: 0; }

.rwp-m2-lato-grid {
	display: grid;
	grid-template-columns: minmax(120px, 44%) minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.rwp-m2-lato-pv {
	background: #fff;
	border: 1px solid var(--rwp-border);
	border-radius: 14px;
	padding: 8px;
}

.rwp-m2-lato-pv .rwp-m2-canvas { max-width: 100%; }

.rwp-m2-lato-campi {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

/* ── Pannello Design: la medaglietta scelta col disegno sopra ────────────── */
.rwp-m2-design.ha-medaglietta {
	/* !important anche qui: la scorciatoia `background` di un tema
	   azzererebbe posizione e dimensione insieme all'immagine. */
	background-position: center !important;
	background-size: contain !important;
	background-repeat: no-repeat !important;
	background-color: #fff !important;
	min-height: 84px;
	justify-content: center;
}

/* Col fondo della medaglietta la crocetta del «senza disegno» non serve: la
   medaglietta nuda si spiega da sola. */
.rwp-m2-design.ha-medaglietta .rwp-m2-design-none { display: none; }

/* Il disegno sta SOPRA la medaglietta, non accanto: si vede l'effetto finale.
   La misura è quella vera dell'incisione — quanto DUE RIGHE di testo su
   quattro — non un'icona che copre tutta la faccia del pezzo. Deve dire la
   stessa cosa dell'anteprima incisa, altrimenti il riquadro promette un
   disegno grande e poi ne arriva uno piccolo. */
.rwp-m2-design.ha-medaglietta img {
	width: 26px;
	height: 26px;
	opacity: .8;
	filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .55));
}

.rwp-m2-design.ha-medaglietta .rwp-m2-design-name {
	position: absolute;
	bottom: 2px;
	left: 0;
	right: 0;
	font-size: 10px;
	text-shadow: 0 1px 2px #fff, 0 -1px 2px #fff;
}

@media (max-width: 900px) {
	/* Sotto i 900px i due lati tornano incolonnati, altrimenti l'anteprima e i
	   campi diventano illeggibili entrambi. */
	.rwp-m2-incisione { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
	.rwp-m2-lato-grid { grid-template-columns: 1fr; }
}

/* ── I quattro riquadri alla stessa altezza ────────────────────────────────
   Prima ognuno era alto quanto il suo contenuto: con tredici sagome il primo
   diventava il doppio degli altri e la riga sembrava sbilenca. */
.rwp-m2-pannelli { align-items: stretch; }

.rwp-m2-pnl {
	display: flex;
	flex-direction: column;
}

/* Il corpo si allunga fino in fondo al riquadro, così le frecce delle sagome
   restano appoggiate in basso invece di stare a mezz'aria. */
.rwp-m2-pannelli > .rwp-m2-pnl > .rwp-m2-pnl-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}

.rwp-m2-pannelli > .rwp-m2-pnl > .rwp-m2-pnl-body > .rwp-m2-shapes,
.rwp-m2-pannelli > .rwp-m2-pnl > .rwp-m2-pnl-body > .rwp-m2-sizes,
.rwp-m2-pannelli > .rwp-m2-pnl > .rwp-m2-pnl-body > .rwp-m2-colors {
	flex: 1 1 auto;
	align-content: start;
}

/* Frecce delle sagome: sotto la griglia, al centro. */
.rwp-m2-shapes-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}

.rwp-m2-pag {
	font-size: 12px;
	color: #777;
	min-width: 34px;
	text-align: center;
}

/* Incisione chiara (alluminio anodizzato): il disegno del riquadro si mostra
   BIANCO come verrà sul pezzo. Gli SVG della libreria sono neri, quindi si
   ribaltano. */
.rwp-m2-design.ha-medaglietta.incisione-chiara img {
	filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}

/* Colori plexiglass: pastiglie, non tavolozza. Sono i colori che ci sono
   davvero in magazzino. */
.rwp-colori { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rwp-colore {
	width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
	border: 2px solid var(--rwp-border); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
	transition: transform .12s ease, border-color .12s ease;
	/* Sfondo neutro di partenza: sono pulsanti, e i pulsanti del tema sono
	   rossi. Senza questo, una pastiglia che non riceve il suo colore si
	   presenta rossa come se quello fosse il colore scelto. */
	background: #fff;
}
.rwp-colore:hover { transform: scale(1.08); }
.rwp-colore.is-sel { border-color: var(--rwp-rosso, #9b1b1b); transform: scale(1.12); }
.rwp-colore-nome { margin: 6px 0 0; font-size: .78rem; color: #6b6b6b; min-height: 1em; }

/* Incisione: le due lavorazioni, quando c'è da scegliere. */
.rwp-lav { margin-top: 14px; border-top: 1px solid #f0eeeb; padding-top: 12px; }
.rwp-lavs { display: flex; flex-wrap: wrap; gap: 10px; }
.rwp-lav-opt { display: flex; align-items: center; gap: 10px; }
.rwp-lav-opt { flex-direction: column; align-items: flex-start; gap: 4px; max-width: 320px; }
.rwp-lav-testa { display: flex; align-items: center; gap: 10px; }
.rwp-lav-nota { font-size: .78rem; line-height: 1.35; color: #6b6b6b; }

/* «al massimo per questa larghezza»: si accende quando il testo è già stato
   ridotto per starci, e alzare la grandezza non può fare più niente. */
.rwp-tmax { font-size: .72rem; color: #8a6100; background: #fff6e0; border-radius: 4px; padding: 2px 6px; }

/* ── Ordini SOLO dall'app (04/11/2026) ─────────────────────────────────── */
/* La pagina prodotto manda all'app; carrello e cassa non si vedono più. */

body.rwp-solo-app #site-header-cart,
body.rwp-solo-app .site-header-cart,
body.rwp-solo-app .cart-contents,
body.rwp-solo-app .widget_shopping_cart,
body.rwp-solo-app li.cart,
body.rwp-solo-app .footer-cart-contents,
body.rwp-solo-app #rs-cart-sidebar,
body.rwp-solo-app .rs-pv-cart,
body.rwp-solo-app form.cart,
body.rwp-solo-app .single_add_to_cart_button,
body.rwp-solo-app .add_to_cart_button,
body.rwp-solo-app .added_to_cart,
body.rwp-solo-app ul.products li.product .button,
body.rwp-solo-app ul.products li.product .price,
body.rwp-solo-app .summary .price,
body.rwp-solo-app .woocommerce-result-count,
body.rwp-solo-app .woocommerce-ordering,
body.rwp-solo-app:not(.rwp-catalogo) #rs-shop-sidebar,
body.rwp-solo-app:not(.rwp-catalogo) .rs-shop-sidebar { display: none !important; }

/* Il CATALOGO: vetrina senza prezzi, con le descrizioni (05/11/2026). */
.rwp-catalogo-intro {
	margin: 0 0 22px;
	padding: 18px 22px;
	border-left: 4px solid #b11226;
	background: #faf7f6;
	font-size: 16px;
	line-height: 1.55;
	color: #333;
}
.rwp-catalogo-intro p:last-child { margin-bottom: 0; }
body.rwp-solo-app ul.products li.product .rwp-cat-desc {
	margin: 6px 0 4px;
	font-size: 13.5px;
	line-height: 1.45;
	color: #555;
	text-align: left;
}
body.rwp-solo-app ul.products li.product .rwp-cat-desc p { margin: 0 0 4px; }

/* La testata, UGUALE a quella dell'app (Irene, 05/11/2026): bianca, il logo
   a sinistra, a destra tre pulsanti — HOME e IL MIO ACCOUNT bordati,
   CONFIGURATORE pieno — e un filo grigio sotto. Il tema (header.js del tema
   figlio) ricostruisce la riga in `.rs-header-row`: qui si lavora su quella.
   Via la ricerca, il riquadro account col badge del listino (il listino si
   sceglie dentro il configuratore), il carrello, il menu a cassetto delle
   categorie. */
body.rwp-solo-app .site-header,
body.rwp-solo-app #masthead {
	background: #fff !important;
	border-bottom: 1px solid #e6e6e6 !important;
	box-shadow: none !important;
}
body.rwp-solo-app .rs-header-row {
	align-items: center !important;
	padding: 12px 30px !important;
	min-height: 72px;
}
body.rwp-solo-app .rs-header-row .site-branding { padding: 0 !important; margin-right: 24px !important; }
body.rwp-solo-app .rs-header-row .site-branding img { max-height: 48px !important; }
body.rwp-solo-app .rs-header-row .site-search,
body.rwp-solo-app .rs-header-row .rs-account-icon,
body.rwp-solo-app .rs-header-row ul.site-header-cart,
body.rwp-solo-app .rs-hamburger,
body.rwp-solo-app #rs-drawer { display: none !important; }
body.rwp-solo-app .rs-header-row > ul.menu,
body.rwp-solo-app .rs-header-row > ul.nav-menu {
	order: 5 !important;
	margin-left: auto !important;
	gap: 10px !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	justify-content: flex-end !important;
}
body.rwp-solo-app .rs-header-row > ul.menu > li > a {
	display: inline-block !important;
	padding: 12px 20px !important;
	margin: 0 !important;
	border: 2px solid #b11226 !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: #b11226 !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
	line-height: 1.2 !important;
}
body.rwp-solo-app .rs-header-row > ul.menu > li > a:hover,
body.rwp-solo-app .rs-header-row > ul.menu > li.rs-hover > a,
body.rwp-solo-app .rs-header-row > ul.menu > li.rs-active-tab > a {
	background: #fdeef0 !important;
	color: #b11226 !important;
	border-color: #b11226 !important;
}
body.rwp-solo-app .rs-header-row > ul.menu > li.rwp-menu-configuratore > a,
body.rwp-solo-app .rs-header-row > ul.menu > li.rwp-menu-configuratore.rs-active-tab > a {
	background: #b11226 !important;
	color: #fff !important;
}
body.rwp-solo-app .rs-header-row > ul.menu > li.rwp-menu-configuratore > a:hover { background: #8e0e1e !important; }
@media ( max-width: 768px ) {
	body.rwp-solo-app .rs-header-row { flex-wrap: wrap !important; padding: 10px 14px !important; }
	body.rwp-solo-app .rs-header-row > ul.menu,
	body.rwp-solo-app .rs-header-row > ul.nav-menu {
		display: flex !important;
		order: 7 !important;
		width: 100% !important;
		margin: 8px 0 0 !important;
		justify-content: center !important;
	}
	body.rwp-solo-app .rs-header-row > ul.menu > li > a { padding: 10px 14px !important; font-size: 13px !important; }
}

.rwp-app-lancio {
	margin: 18px 0 24px;
	padding: 22px 24px;
	border: 2px solid #b11226;
	border-radius: 16px;
	background: #fff;
	text-align: center;
}
.rwp-app-lancio-titolo { margin: 0 0 8px; font-size: 22px; color: #b11226; }
.rwp-app-lancio-testo { margin: 0 auto 16px; max-width: 560px; font-size: 15px; line-height: 1.5; color: #444; }
.rwp-app-lancio-btn, .rwp-app-lancio-btn:hover, .rwp-app-lancio-btn:focus {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 12px;
	background: #b11226;
	color: #fff !important;
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}
.rwp-app-lancio-btn:hover { background: #8e0e1e; }
.rwp-app-lancio-nota { margin: 10px 0 0; font-size: 13px; color: #7a7a7a; }
.rwp-app-avviso {
	margin: 0 auto 12px;
	max-width: 520px;
	padding: 12px 16px;
	border-radius: 10px;
	background: #fff3e0;
	color: #8a5a00;
}
