/* Phrase products (T-shirt, totebag, mug): configurator on the product page. Mobile first. Colours from brand.css. */
.cb-crea { --cb-sand: #F0EAE4; --cb-photo: #F2F2F2; max-width: 1320px; margin: 0 auto; padding: 24px 16px 64px; color: var(--cb-ink); font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; }
.cb-crea *, .cb-crea *::before, .cb-crea *::after { box-sizing: border-box; }
.cb-crea .woocommerce-message, .cb-crea .woocommerce-error, .cb-crea .woocommerce-info { margin: 0 0 16px; }

.cb-crea__head { margin-bottom: 16px; }
.cb-crea__title { margin: 0 0 6px; font-size: 28px; font-weight: 300; line-height: 1.1; text-transform: uppercase; color: var(--cb-ink); }
.cb-crea__intro { margin: 0; font-size: 16px; }

/* Preview: sticky at the top of the screen on phones, beside the form on desktop. */
.cb-crea__preview { position: sticky; top: 0; z-index: 5; margin: 0 -16px 8px; padding: 6px 16px; background: #EDEDED; box-shadow: 0 6px 12px -10px rgba(0, 0, 0, 0.3); }
.cb-crea__shirt { position: relative; width: min(100%, 24vh); margin: 0 auto; background: #EDEDED; }
.cb-crea__shirt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; }
.cb-crea__shirt[data-colore="bianca"] .cb-crea__shirt-img[data-colore="bianca"],
.cb-crea__shirt[data-colore="nera"] .cb-crea__shirt-img[data-colore="nera"],
.cb-crea__shirt[data-colore="naturale"] .cb-crea__shirt-img[data-colore="naturale"] { opacity: 1; }
/* Sleeve: long-sleeve blanks only when chosen (until they exist, the short ones show). */
.cb-crea__shirt[data-manica="lunga"]:has(.cb-crea__shirt-img[data-manica="lunga"]) .cb-crea__shirt-img[data-manica="corta"],
.cb-crea__shirt:not([data-manica="lunga"]) .cb-crea__shirt-img[data-manica="lunga"] { opacity: 0 !important; }
/* Print area: position and ink come from the product (inline style); the SVG is cropped to its content by crea.js. */
.cb-crea__print { position: absolute; pointer-events: none; }
.cb-crea__print svg { display: block; width: 100%; height: auto; }
/* With a max height (retro, totebag): the phrase fits the box, centred at the top. */
.cb-crea__print--box svg { height: 100%; }

/* Product cards (only when more than one product is ready). */
.cb-crea__prodotti { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 16px; }
.cb-crea__prodotto { display: block; padding: 12px; border: 1px solid var(--cb-navy); background: #FFFFFF; color: var(--cb-navy); text-decoration: none; }
.cb-crea__prodotto strong { display: block; font-size: 15px; text-transform: uppercase; }
.cb-crea__prodotto span { display: block; margin-top: 2px; font-size: 13px; color: var(--cb-muted); }
.cb-crea__prodotto:hover { background: var(--cb-sand); }
.cb-crea__prodotto[aria-current="page"] { background: var(--cb-navy); color: #FFFFFF; }
.cb-crea__prodotto[aria-current="page"] span { color: #F0EAE4; }

/* Steps */
.cb-crea__step { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.cb-crea__step legend { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0; font-size: 15px; font-weight: 600; text-transform: uppercase; }
.cb-crea__step legend span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cb-navy); color: #FFFFFF; font-size: 14px; }
.cb-crea__group { margin: 4px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--cb-muted); }

.cb-crea input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb-crea__options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cb-crea__options--taglie { grid-template-columns: repeat(3, 1fr); }
.cb-crea__opt { position: relative; display: block; cursor: pointer; }
.cb-crea__opt span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 12px; border: 1px solid var(--cb-navy); background: #FFFFFF; font-size: 16px; font-weight: 600; text-transform: uppercase; }
.cb-crea__opt--bianca span::before, .cb-crea__opt--nera span::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--cb-navy); background: #FFFFFF; }
.cb-crea__opt--nera span::before { background: #111111; }
.cb-crea__opt:hover span { background: var(--cb-sand); }
.cb-crea__opt input:checked + span { background: var(--cb-navy); color: #FFFFFF; }
.cb-crea__opt input:focus-visible + span, .cb-crea__frase input:focus-visible + .cb-crea__frase-svg { outline: 3px solid var(--cb-sea); outline-offset: 2px; }

.cb-crea__frasi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.cb-crea__frase { position: relative; display: block; cursor: pointer; }
.cb-crea__frase-svg { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 14%; border: 1px solid #D9D2CB; background: #FFFFFF; color: #1B1B1B; transition: background-color 0.2s, color 0.2s; }
.cb-crea__frase-svg svg { display: block; width: 100%; height: 100%; }
.cb-crea__frasi--tshirt-retro .cb-crea__frase-svg, .cb-crea__frasi--tshirt-cuore .cb-crea__frase-svg, .cb-crea__frasi--totebag .cb-crea__frase-svg { padding: 12%; }
.cb-crea[data-colore="nera"] .cb-crea__frase-svg { background: #1B1B1B; border-color: #1B1B1B; color: #FFFFFF; }
.cb-crea__frase:hover .cb-crea__frase-svg { border-color: var(--cb-navy); }
.cb-crea__frase input:checked + .cb-crea__frase-svg { border: 3px solid var(--cb-sea); box-shadow: 0 0 0 2px #FFFFFF inset; }

.cb-crea__buy { padding: 16px; background: var(--cb-sand); }
.cb-crea__summary { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.cb-crea__price { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.cb-crea__add { display: block; width: 100%; min-height: 56px; border: 0; border-radius: 0; background: var(--cb-navy); color: #FFFFFF; font: inherit; font-size: 16px; font-weight: 600; text-transform: uppercase; cursor: pointer; }
.cb-crea__add:hover, .cb-crea__add:focus-visible { background: var(--cb-sea); }
.cb-crea__note { margin: 10px 0 0; font-size: 13px; color: var(--cb-muted); }

@media (min-width: 768px) {
	.cb-crea { padding: 40px 24px 80px; }
	.cb-crea__title { font-size: 40px; }
	.cb-crea__frasi { grid-template-columns: repeat(3, 1fr); }
	.cb-crea__prodotti { grid-template-columns: repeat(4, 1fr); }
	.cb-crea__options--taglie { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1024px) {
	.cb-crea { padding: 48px 110px 96px; }
	.cb-crea__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
	.cb-crea__preview { top: 24px; margin: 0; padding: 0; box-shadow: none; }
	.cb-crea__shirt { width: 100%; }
	.cb-crea__frasi { grid-template-columns: repeat(4, 1fr); }
}
.cb-crea a.cb-crea__prodotto, .cb-crea a.cb-crea__prodotto * { text-decoration: none !important; }
.cb-crea__steplabel { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 600; text-transform: uppercase; }
.cb-crea__steplabel span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cb-navy); color: #FFFFFF; font-size: 14px; }

/* Product page: animated cover until a phrase is chosen, then the live preview. */
.cb-crea__cover { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.cb-crea.has-frase .cb-crea__cover:not(.cb-crea__cover--fisso) { opacity: 0; pointer-events: none; }
.cb-crea__head .cb-crea__price { margin: 4px 0 8px; }
.cb-crea__desc { margin-top: 24px; font-size: 15px; line-height: 1.6; }
.cb-crea-page { padding: 0; }

/* Full-colour prints (Burraco): one-ink version on dark T-shirts, colour version on the white one. */
.cb-v { display: block; width: 100%; height: 100%; }
.cb-crea__frase-svg { position: relative; }
.cb-crea__frase-svg .cb-v--col, .cb-crea[data-originali~="bianca"][data-colore="bianca"] .cb-crea__frase-svg .cb-v--mono { position: absolute; inset: 14%; width: auto; height: auto; opacity: 0; }
.cb-crea[data-originali~="bianca"][data-colore="bianca"] .cb-crea__frase-svg .cb-v--col { position: static; opacity: 1; }
.cb-crea__print .cb-v--col, .cb-crea[data-originali~="bianca"][data-colore="bianca"] .cb-crea__print .cb-v--mono { display: none; }
.cb-crea[data-originali~="bianca"][data-colore="bianca"] .cb-crea__print .cb-v--col { display: block; }
.cb-crea__print .cb-v svg { display: block; width: 100%; height: auto; }
.cb-crea__print--box .cb-v, .cb-crea__print--box .cb-v svg { height: 100%; }
/* Front / back. */
.cb-crea__shirt--retro { display: none; }
.cb-crea[data-lato="retro"] .cb-crea__shirt--fronte { display: none; }
.cb-crea[data-lato="retro"] .cb-crea__shirt--retro { display: block; }
.cb-crea__lati { display: flex; justify-content: center; gap: 8px; margin: 8px 0 0; }
.cb-crea__lati button { min-height: 40px; padding: 0 16px; border: 1px solid var(--cb-navy); border-radius: 0; background: #fff; color: var(--cb-ink); font: inherit; font-size: 14px; font-weight: 600; text-transform: uppercase; cursor: pointer; }
.cb-crea__lati button[aria-pressed="true"] { background: var(--cb-navy); color: #fff; }

/* Live preview = mockup: small caption, same style as the product photo captions (Luca, 24/11/2026). */
.cb-crea.has-frase .cb-crea__shirt::after { content: "La stampa reale può variare"; position: absolute; left: 6px; bottom: 6px; z-index: 3; padding: 2px 6px; background: rgba(255,255,255,0.85); color: #5E5E5C; font: 11px/1.4 "Inter", sans-serif; pointer-events: none; }
