/*
 * ============================================================
 *  Configuratore Tende Pro — GLOBAL.CSS
 *  Contiene: variabili, reset, progress bar, layout split,
 *            pannello dettaglio, card generiche, bottoni,
 *            tipografia condivisa.
 *  NON contiene nulla di specifico a un singolo step.
 *  Ogni step ha il proprio file css/step-N.css
 * ============================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────────────
   VARIABILI
───────────────────────────────────────────── */
/*
 * --ctp-header-h : altezza dell'header sticky del tema.
 * Il plugin la usa come offset per position:sticky.
 * Sovrascrivila nel CSS del tema se il tuo header non è zero:
 *   #bontempo-configuratore { --ctp-header-h: 80px; }
 */
#bontempo-configuratore {
    /* Palette */
    --ctp-brown:          #8B6914;
    --ctp-brown-dark:     #5C4008;
    --ctp-brown-deeper:   #3d2800;
    --ctp-brown-light:    #D4A853;
    --ctp-bg:             #A08060;
    --ctp-white:          #FFFFFF;
    --ctp-offwhite:       #FAF8F5;
    --ctp-text:           #d88e22;
    --ctp-text-light:     #6B5540;
    --ctp-border:         rgba(255,255,255,0.18);

    --body-color:         #8F7B6B;
    --dark-brown:         #3B2A1A;
    --soft-brown:         #A07850;
    --brown-text-color:   #8A7565;

    /* Tipografia */
    --font-serif:         'Lora', Georgia, serif;
    --font-ui:            'Montserrat', Arial, sans-serif;

    /* Geometrie */
    --ctp-radius:         12px;
    --ctp-radius-sm:      8px;
    --ctp-radius-xs:      5px;
    --ctp-shadow:         0 4px 24px rgba(0,0,0,0.13);
    --ctp-transition:     0.22s ease;

    /* Pannello dettaglio */
    --panel-w-collapsed:  560px;
    --panel-w-expanded:   60vw;
    --panel-transition:   width 0.48s cubic-bezier(0.4,0,0.2,1),
                          box-shadow 0.48s cubic-bezier(0.4,0,0.2,1);

    /* Progress bar height */
    --progress-h:         72px;

    /* Offset header sticky del tema — sovrascrivibile dall'esterno */
    --ctp-header-h:       0px;
}
body.admin-bar{
    #bontempo-configuratore{
        --ctp-header-h: 32px;
    }
}

/* ─────────────────────────────────────────────
   RESET / BASE
───────────────────────────────────────────── */
#bontempo-configuratore,
#bontempo-configuratore * {
    box-sizing: border-box;
}
#bontempo-configuratore {
    font-family: var(--font-serif);
    background: var(--body-color);
    color: var(--brown-text-color);
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - var(--ctp-header-h));
    position: relative;
}
#bontempo-configuratore img   { max-width: 100%; display: block; }
#bontempo-configuratore p     { line-height: 1.65; }
#bontempo-configuratore a     { color: inherit; }
#bontempo-configuratore button { font-family: var(--font-ui); cursor: pointer; }

/* ─────────────────────────────────────────────
   PROGRESS BAR  —  sticky in cima
───────────────────────────────────────────── */
.ctp-progress {
    position: sticky;
    top: var(--ctp-header-h);
    z-index: 200;
    height: var(--progress-h);
    /* Sfondo bianco/chiaro come da design — visibile sempre, step 0 incluso */
    background: #F9F9F9;
    border-bottom: 1px solid #D9D9D9;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    .ctp-progress__inner {
        display: flex;
        align-items: stretch;
        height: 100%;
        width: 100%;
        max-width: 1320px;
        margin: 0 auto;
        padding: 0 20px;
    }
}

.ctp-progress__step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 6px;
    cursor: default;
    transition: opacity 0.25s ease;
    position: relative;
}
/* linea connettore tra step */
.ctp-progress__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(-50% + 22px);
    left: calc(50% + 22px);
    height: 1px;
    background: #d8cfc4;
    transform: translateY(-9px);
}
.ctp-progress__step.is-done::after,
.ctp-progress__step.is-active::after {
    background: var(--ctp-brown-light);
}

/* step 0 — tutti i pallini neutri (nessuna classe aggiunta) */
.ctp-progress__step                { opacity: 0.4; }
.ctp-progress__step.is-done        { opacity: 0.7; cursor: pointer; }
.ctp-progress__step.is-done:hover  { opacity: 1; }
.ctp-progress__step.is-active      { opacity: 1; }

.ctp-progress__circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1.5px solid #c8bfb4;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-ui);
    font-size: 12px; font-weight: 600;
    color: #8a7a6a;
    background: #fff;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
    position: relative; z-index: 1;
}
/* step attivo — pallino pieno marrone scuro */
.ctp-progress__step.is-active .ctp-progress__circle {
    background: var(--ctp-brown-deeper);
    border-color: var(--ctp-brown-deeper);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(61,40,0,0.10);
    span{
        color: #fff!important;
    }
}
/* step completato — bordo oro, testo oro */
.ctp-progress__step.is-done .ctp-progress__circle {
    background: #fff;
    border-color: var(--ctp-brown-light);
    color: var(--ctp-brown);
}

.ctp-progress__label {
    font-family: var(--font-ui);
    font-size: 10px; font-weight: 400;
    letter-spacing: 0.06em;
    color: #9a8a7a;
    font-style: italic;
}
.ctp-progress__step.is-active .ctp-progress__label {
    color: var(--ctp-brown-deeper);
    font-weight: 600;
    font-style: italic;
}
.ctp-progress__step.is-done .ctp-progress__label {
    color: var(--ctp-brown);
}

/* ─────────────────────────────────────────────
   AREA CONTENUTO  —  scrollabile
───────────────────────────────────────────── */
#bontempo-content {
    flex: 1;
    transition: opacity 0.15s ease;
    padding: 30px;
    justify-content: center;
    display: flex;
    @media (max-width: 768px) {
        padding: 15px;
    }
}
/* Quando il contenuto è un layout split, azzera il padding del wrapper */
#bontempo-content:has(.ctp-split) {
    padding: 0;
    overflow: visible;
    align-items: flex-start;
}
#bontempo-content.is-loading               { opacity: 0.4; pointer-events: none; }

/* ─────────────────────────────────────────────
   LAYOUT SPLIT  (usato in step 1, 3, 4)
   sinistra: griglia card scrollabile  |  destra: pannello fisso viewport
───────────────────────────────────────────── */
.ctp-split {
    display: flex;
    align-items: flex-start;
    width: 100%;
    /* Non limitare l'altezza — la sinistra può crescere liberamente */
    min-height: calc(100vh - var(--progress-h) - var(--ctp-header-h));
    @media (min-width: 768px) {
        padding: 20px;
    }
}

/* colonna sinistra — cresce liberamente, nessun overflow nascosto */
.ctp-split__cards {
    flex: 1;
    min-width: 0;
    padding: 40px 36px;
    /* Niente overflow/height: la colonna sinistra è normale flow */
}

/* colonna destra — sticky al viewport, altezza fissa 100vh meno header e progress */
.ctp-split__panel {
    flex-shrink: 0;
    width: var(--panel-w-collapsed);
    background: var(--ctp-white);
    color: var(--ctp-text);
    /* Sticky come default; il JS sostituisce con fixed se sticky è rotto (es. Elementor) */
    position: sticky;
    top: calc(var(--ctp-header-h) + var(--progress-h) + 12px);
    /*height: calc(100vh - var(--ctp-header-h) - var(--progress-h) - 24px);*/
    height: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    transition: var(--panel-transition);
    will-change: width;
    box-shadow: -4px 0 28px rgba(0,0,0,0.10);
    scrollbar-width: thin;
    scrollbar-color: rgba(139,105,20,0.2) transparent;
    border-radius: 15px;
    margin: 12px 12px 12px 0;
}
/* Quando JS rileva che sticky non funziona (Elementor), applica fixed */
.ctp-split__panel.is-fixed {
    position: fixed !important;
    margin: 0 !important;
    /* top / left / width / height vengono impostati inline dal JS */
}
/* Placeholder nel flow che mantiene lo spazio quando il pannello è fixed */
.ctp-split__panel-placeholder {
    flex-shrink: 0;
    width: var(--panel-w-collapsed);
    margin: 12px 12px 12px 0;
    display: none;
}
.ctp-split__panel-placeholder.is-active {
    display: block;
}
.ctp-split__panel::-webkit-scrollbar       { width: 4px; }
.ctp-split__panel::-webkit-scrollbar-thumb { background: rgba(139,105,20,0.18); border-radius: 2px; }
.ctp-split__panel.is-expanded {
    width: var(--panel-w-expanded);
    box-shadow: -6px 0 48px rgba(0,0,0,0.18);
}

/* ─────────────────────────────────────────────
   PANNELLO DETTAGLIO  —  stato vuoto
───────────────────────────────────────────── */
.ctp-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 420px;
    padding: 40px 28px;
    text-align: center;
    color: var(--ctp-text-light);
}
.ctp-panel-empty__icon {
    width: 64px; height: 64px;
    background: #f0ebe2;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 18px;
}
.ctp-panel-empty__title {
    font-family: var(--font-serif);
    font-size: 18px; font-weight: 500;
    color: var(--ctp-text);
    margin-bottom: 10px;
    line-height: 1.35;
}
.ctp-panel-empty__text {
    font-family: var(--font-ui);
    font-size: 12px; font-weight: 300;
    line-height: 1.65;
    max-width: 210px;
}

/* ─────────────────────────────────────────────
   PANNELLO DETTAGLIO  —  stato popolato
   L'HTML è nel template PHP panel-detail.php,
   il JS aggiorna i singoli elementi via data-attr
───────────────────────────────────────────── */
.ctp-detail {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    animation: ctpDetailIn 0.38s ease forwards;
}
@keyframes ctpDetailIn {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* immagine hero — sborda a sinistra/destra/su */
.ctp-detail__hero {
    position: relative;
    overflow: hidden;
    background: #e8e0d4;
}
.ctp-detail__hero img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.55s ease;
    display: block;
}
.ctp-detail:hover .ctp-detail__hero img { transform: scale(1.03); }

/* badge colore selezionato sovrapposto all'hero */
.ctp-detail__color-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    padding: 5px 10px;
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 500;
    color: var(--ctp-text);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.ctp-detail__color-badge.is-visible { opacity: 1; }
.ctp-detail__color-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
}

/* corpo del dettaglio */
.ctp-detail__body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.ctp-detail__title {
    font-family: var(--font-serif);
    font-size: 22px; font-weight: 700;
    color: var(--dark-brown);
    line-height: 1.2;
}
.ctp-detail__desc {
    font-family: var(--font-ui);
    font-size: 12.5px; font-weight: 300;
    line-height: 1.72;
    color: var(--ctp-text-light);
}

/* prezzo */
.ctp-detail__price-wrap { display: flex; flex-direction: column; gap: 2px; }
.ctp-detail__price {
    font-family: var(--font-serif);
    font-size: 30px; font-weight: 700;
    color: var(--ctp-text);
    letter-spacing: -0.02em;
    line-height: 1;
}
.ctp-detail__price-note {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 300;
    color: var(--ctp-text-light);
    font-style: italic;
}
.ctp-detail__dims {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--ctp-text-light);
    letter-spacing: 0.06em;
}

/* galleria 3 miniature */
.ctp-detail__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    border-radius: var(--ctp-radius-sm);
    overflow: hidden;
    padding: 5px;
}
.ctp-detail__gallery img {
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    height: 150px;
    width: 100%;
}
.ctp-detail__gallery img:hover { transform: scale(1.07); }

/* sotto-modelli */
.ctp-detail__sotto { display: flex; flex-direction: column; gap: 6px; }
.ctp-detail__sotto-title {
    font-family: var(--font-ui);
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ctp-text);
}
.ctp-sotto-btn {
    display: block; width: 100%;
    padding: 12px 14px;
    background: var(--ctp-offwhite);
    border: 2px solid #e2d8c8;
    border-radius: var(--ctp-radius-sm);
    cursor: pointer; text-align: left;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.ctp-sotto-btn:hover      { border-color: var(--ctp-brown-light); transform: translateX(2px); }
.ctp-sotto-btn.is-active  { border-color: var(--ctp-brown); background: #fdf5e0; }
.ctp-sotto-btn__name {
    display: block;
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 600;
    color: var(--ctp-text);
    margin-bottom: 3px;
}
.ctp-sotto-btn__desc {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 300;
    color: var(--ctp-text-light);
    line-height: 1.5;
}

/* colori */
.ctp-detail__colori { display: flex; flex-direction: column; gap: 8px; }
.ctp-detail__colori-title {
    font-family: var(--font-ui);
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ctp-text);
}
.ctp-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ctp-swatch {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
/* tooltip nome colore */
.ctp-swatch::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    background: rgba(44,26,0,0.88);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 10px; font-weight: 400;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s;
}
.ctp-swatch:hover        { transform: scale(1.22); }
.ctp-swatch:hover::after { opacity: 1; }
.ctp-swatch.is-active {
    border-color: var(--ctp-brown-deeper);
    box-shadow: 0 0 0 3px rgba(92,64,8,0.22);
    transform: scale(1.12);
}

/* blocco "ideale per" */
.ctp-detail__ideal {
    background: var(--ctp-offwhite);
    border-left: 3px solid var(--ctp-brown-light);
    border-radius: var(--ctp-radius-sm);
    padding: 12px 14px;
}
.ctp-detail__ideal-label {
    font-family: var(--font-ui);
    font-size: 9px; font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ctp-brown);
    display: block;
    margin-bottom: 8px;
}
.ctp-detail__ideal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.ctp-detail__ideal-grid span {
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 300;
    color: var(--ctp-text-light);
}

/* azioni nel pannello */
.ctp-detail__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

/* ─────────────────────────────────────────────
   CARD  —  componente condiviso (step 1, 3, 4)
───────────────────────────────────────────── */
.ctp-cards {
    display: grid;
    gap: 12px;
}
.ctp-cards--1col { grid-template-columns: 1fr; }
.ctp-cards--2col { grid-template-columns: repeat(2, 1fr); }
.ctp-cards--3col { grid-template-columns: repeat(3, 1fr); }
.ctp-cards--4col { grid-template-columns: repeat(4, 1fr); }

.ctp-card {
    cursor: pointer;
    border-radius: var(--ctp-radius);
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    position: relative;
}
.ctp-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,0.28); }
.ctp-card.is-selected {
    border-color: rgba(255,255,255,0.92);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.18), 0 10px 32px rgba(0,0,0,0.25);
    .ctp-card__overlay {
        background: linear-gradient(to top, rgb(119 100 86) 0%, rgb(0 0 0 / 4%) 55%, #34343400 100%);
    }
}
/* check sovrapposto */
.ctp-card.is-selected::before {
    content: '✓';
    position: absolute; top: 10px; right: 10px; z-index: 10;
    width: 26px; height: 26px;
    background: var(--ctp-white);
    color: var(--ctp-brown-deeper);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    font-family: var(--font-ui);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.ctp-card__media {
    position: relative;
    overflow: hidden;
    background: #c8b89a;
    height: 100%;
}

.ctp-card__media--portrait {
    aspect-ratio: 1 / 1;
}
.ctp-card__media--landscape {
    /*aspect-ratio: 4/3;*/
    @media (max-width: 768px) {
        aspect-ratio: auto;
    }
}
.ctp-card__media--square    { aspect-ratio: 1; }

.ctp-card__media img {
    width: 100%; height:100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.ctp-card:hover .ctp-card__media img { transform: scale(1.07); }

.ctp-card__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgb(0 0 0 / 92%) 0%, rgba(0, 0, 0, 0.04) 55%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 14px;
    transition: background 0.28s ease;
    padding-bottom: 20px;
}
/*.ctp-card:hover .ctp-card__overlay {*/
/*    background: linear-gradient(to top, rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.14) 60%, transparent 100%);*/
/*}*/
.ctp-card__tag {
    font-family: var(--font-ui);
    font-size: 9px; font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 3px;
}
.ctp-card__name {
    font-family: var(--font-ui);
    font-size: 13px; font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.ctp-card__cta {
    display: inline-block;
    padding: 5px 13px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.32);
    border-radius: 20px;
    font-family: var(--font-ui);
    font-size: 10px; font-weight: 500;
    color: #fff;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
    width: fit-content;
}
.ctp-card:hover .ctp-card__cta,
.ctp-card.is-selected .ctp-card__cta { background: rgba(255,255,255,0.24); }

/* ─────────────────────────────────────────────
   BOTTONI  —  tutti gli stili condivisi
───────────────────────────────────────────── */
.ctp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    font-family: var(--font-ui);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all var(--ctp-transition);
    line-height: 1;
    text-decoration: none;
}
.ctp-btn--primary {
    background: var(--ctp-brown-deeper);
    color: var(--ctp-white);
    justify-content: center;
    span{
       color: #fff;
    }
}
.ctp-btn--primary:hover:not(:disabled) {
    background: #2a1c00;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.ctp-btn--primary:disabled { opacity: 0.38; cursor: not-allowed; }

.ctp-btn--secondary {
    background: rgba(255,255,255,0.1);
    color: var(--ctp-white);
    border: 1px solid rgba(255,255,255,0.24);
}
.ctp-btn--secondary:hover { background: rgba(255,255,255,0.18); }

.ctp-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.18);
}
.ctp-btn--ghost:hover { color: var(--ctp-white); border-color: rgba(255,255,255,0.4); }

.ctp-btn--outline-brown {
    background: transparent;
    color: var(--ctp-brown);
    border: 1px solid var(--ctp-brown);
}
.ctp-btn--outline-brown:hover { background: rgba(139,105,20,0.07); }

.ctp-btn--full { width: 100%; justify-content: center; }
.ctp-btn--lg   { padding: 16px 32px; font-size: 12px; }

/* barra nav step (back + next) */
.ctp-step-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* ─────────────────────────────────────────────
   TIPOGRAFIA STEP (intestazioni condivise)
───────────────────────────────────────────── */
.ctp-eyebrow {
    display: block;
    font-family: var(--font-ui);
    font-size: 16px; font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 1;
    margin-bottom: 10px;
    color: var(--soft-brown);
}
.ctp-title {
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.8vw, 34px);
    font-weight: 600;
    line-height: 1.18;
    margin-bottom: 10px;
}
.ctp-subtitle {
    font-family: var(--font-ui);
    font-size: 18px; font-weight: 300;
    line-height: 1.68;
    opacity: 0.78;
    margin-bottom: 26px;
}

/* versioni su sfondo bianco (pannello dettaglio, misure destra) */
.ctp-on-white .ctp-eyebrow { opacity: 1; color: var(--soft-brown); }
.ctp-on-white .ctp-title   { color: var(--dark-brown); }
.ctp-on-white .ctp-subtitle { color: var(--ctp-text-light); opacity: 1; }

/* ─────────────────────────────────────────────
   SWATCH COLORE INLINE  (usato nel riepilogo)
───────────────────────────────────────────── */
.ctp-color-dot {
    display: inline-block;
    width: 13px; height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   RESPONSIVE  —  regole globali
───────────────────────────────────────────── */
@media (max-width: 900px) {
    #bontempo-configuratore {
        --panel-w-expanded: 100vw;
    }
    .ctp-split {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .ctp-split__cards {
        height: auto;
        overflow-y: visible;
    }

    /* ── Pannello mobile: off-canvas fullscreen da destra ── */
    .ctp-split__panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none;
        margin: 0;
        z-index: 9999;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1),
                    box-shadow 0.42s cubic-bezier(0.32, 0.72, 0, 1);
        will-change: transform;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ctp-split__panel.is-expanded {
        transform: translateX(0);
        box-shadow: -8px 0 60px rgba(0,0,0,0.35);
    }

    /* Overlay scuro dietro il pannello */
    .ctp-mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(0,0,0,0);
        transition: background 0.42s cubic-bezier(0.32, 0.72, 0, 1);
        -webkit-tap-highlight-color: transparent;
    }
    .ctp-mobile-overlay.is-visible {
        display: block;
        background: rgba(0,0,0,0.45);
    }

    /* Blocca scroll body quando pannello aperto — senza position:fixed */
    body.ctp-panel-open {
        overflow: hidden !important;
        scrollbar-gutter: stable;
    }

    .ctp-cards--4col { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .ctp-split__cards { padding: 24px 16px; }
    .ctp-cards--2col,
    .ctp-cards--3col,
    .ctp-cards--4col { grid-template-columns: repeat(2, 1fr); }
    .ctp-progress__label { display: none; }
}
@media (max-width: 400px) {
    .ctp-cards--2col { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   UTILITY
───────────────────────────────────────────── */
.is-hidden { display: none !important; }

/* ─────────────────────────────────────────────
   UTILITY INTERNE (sostituzione classi Bootstrap)
───────────────────────────────────────────── */

/* Visibilità responsive */
.ctp-btn--mobile-only { display: none; }
.ctp-hide-mobile      { display: inline; }
.ctp-hide-desktop     { display: none; }

@media (max-width: 767px) {
    .ctp-btn--mobile-only { display: inline-flex; }
    .ctp-hide-mobile      { display: none; }
    .ctp-hide-desktop     { display: inline; }
}

/* Spaziatura */
.ctp-mb-3 { margin-bottom: 1rem; }

/* Flex row con gap (gallery center in step-0) */
.ctp-flex-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Colonna prezzi nel riepilogo (era d-flex flex-column) */
.ctp-riepilogo__total-price {
    display: flex;
    flex-direction: column;
}

/* Padding/margin interno panel-detail body (era px-3 mt-2) */
.ctp-detail__body-inner {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 0.5rem;
}

/* Riga bottoni sotto-modello nel panel-detail (era d-flex align-items-center gap-2 mb-3) */
.ctp-sotto-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ─────────────────────────────────────────────
   PAGINAZIONE  —  griglia card (step 3 e 4)
───────────────────────────────────────────── */
.ctp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-bottom: 8px;
    font-family: var(--font-ui);
}
.ctp-pagination__btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--ctp-radius-xs);
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.75);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1;
}
.ctp-pagination__btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.ctp-pagination__btn.is-active {
    background: var(--ctp-white);
    color: var(--ctp-brown-deeper);
    border-color: var(--ctp-white);
    font-weight: 700;
}
.ctp-pagination__btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}
.ctp-pagination__info {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    padding: 0 6px;
}

/* loader inline sopra le card durante cambio pagina */
.ctp-cards-wrap {
    position: relative;
}
.ctp-cards-wrap.is-paging::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.18);
    border-radius: var(--ctp-radius);
    z-index: 5;
}
