/* ═══════════════════════════════════════════════════════════════════
   Paralumi Configuratore — configuratore.css v1.0
   ═══════════════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────────────── */
.rfpc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #003B7E;
    z-index: 999999;
    color: #fff;
    font-family: inherit;
}
.rfpc-overlay.rfpc-visible {
    display: flex;
    flex-direction: column;
}
.rfpc-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    padding: 4px 8px;
    transition: color 0.2s;
}
.rfpc-close:hover { color: #fff; }

.rfpc-inner {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: 100%;
}

/* ── Preview panel (sinistra) ────────────────────────────────────── */
.rfpc-preview {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.18);
    padding: 40px 28px;
    gap: 22px;
}
#rfpc-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 10px 28px rgba(0,0,0,0.45));
}
.rfpc-price-display {
    font-size: 34px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: #F7FF00;
    text-align: center;
    line-height: 1;
}
.rfpc-price-display small {
    font-size: 11px;
    letter-spacing: 0.18em;
    display: block;
    color: rgba(247,255,0,0.6);
    margin-top: 6px;
    text-transform: uppercase;
}

/* ── Wizard panel (destra) ───────────────────────────────────────── */
.rfpc-wizard {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 52px 64px 36px;
}

/* Progress */
.rfpc-progress { margin-bottom: 40px; }
.rfpc-progress-bar {
    height: 2px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}
.rfpc-progress-fill {
    height: 100%;
    background: #F7FF00;
    transition: width 0.4s ease;
}
.rfpc-step-label {
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
}

/* Content area */
.rfpc-wizard-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}
.rfpc-wizard-content::-webkit-scrollbar { width: 3px; }
.rfpc-wizard-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); }
.rfpc-wizard-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 2px; }

.rfpc-step-title {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 0.09em;
    margin: 0 0 32px;
    color: #fff;
}

/* Option groups */
.rfpc-option-group { margin-bottom: 28px; }
.rfpc-option-label {
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 12px;
}
.rfpc-options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.rfpc-option-btn {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,0.22);
    background: transparent;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.08em;
    border-radius: 4px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: inherit;
}
.rfpc-option-btn:hover {
    border-color: rgba(255,255,255,0.55);
    color: #fff;
}
.rfpc-option-btn.selected {
    background: #F7FF00;
    border-color: #F7FF00;
    color: #003B7E;
    font-weight: 700;
}

/* Fabric list */
.rfpc-fabric-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rfpc-fabric-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.rfpc-fabric-item:hover { border-color: rgba(255,255,255,0.38); }
.rfpc-fabric-item.selected {
    border-color: #F7FF00;
    background: rgba(247,255,0,0.07);
}
.rfpc-fabric-swatch {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.rfpc-fabric-info { flex: 1; }
.rfpc-fabric-name { font-size: 14px; color: #fff; }
.rfpc-fabric-premium {
    font-size: 10px;
    color: #F7FF00;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

/* Color swatches */
.rfpc-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.rfpc-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    outline: 2px solid rgba(255,255,255,0.1);
    transition: outline-color 0.2s, transform 0.15s;
}
.rfpc-swatch:hover { transform: scale(1.18); outline-color: rgba(255,255,255,0.4); }
.rfpc-swatch.selected {
    outline-color: #F7FF00;
    transform: scale(1.12);
}
.rfpc-swatch-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.1em;
    min-height: 18px;
}

/* Summary box */
.rfpc-summary {
    background: rgba(0,0,0,0.18);
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 24px;
}
.rfpc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    padding: 5px 0;
    gap: 12px;
}
.rfpc-summary-row span:last-child { text-align: right; }
.rfpc-summary-row.total {
    color: #F7FF00;
    font-size: 20px;
    font-weight: 600;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Contact form */
.rfpc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rfpc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rfpc-field label {
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}
.rfpc-field input,
.rfpc-field textarea {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    padding: 11px 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    -webkit-appearance: none;
}
.rfpc-field input:focus,
.rfpc-field textarea:focus {
    border-color: rgba(255,255,255,0.55);
}
.rfpc-field input::placeholder,
.rfpc-field textarea::placeholder {
    color: rgba(255,255,255,0.22);
}
.rfpc-field textarea {
    resize: vertical;
    min-height: 72px;
}
.rfpc-field-row {
    display: flex;
    gap: 14px;
}
.rfpc-field-row .rfpc-field { flex: 1; }

/* Error */
.rfpc-error {
    color: #ff8080;
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* Navigation */
.rfpc-wizard-nav {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    margin-top: 12px;
    flex-shrink: 0;
}
.rfpc-btn {
    padding: 14px 26px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.rfpc-btn:active { transform: scale(0.98); }
.rfpc-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.55);
}
.rfpc-btn-secondary:hover {
    border-color: rgba(255,255,255,0.48);
    color: #fff;
}
.rfpc-btn-primary {
    background: transparent;
    color: #0020FF;
    border: none;
    flex: 1;
    font-size: 16px;
    font-weight: 300;
    border-radius: 30px;
    padding: 14px 26px;
    letter-spacing: 0.22em;
}
.rfpc-btn-primary:hover { background: #F7FF00; color: #0020FF; }
.rfpc-btn-primary:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

/* Success */
.rfpc-success {
    text-align: center;
    padding: 50px 20px;
}
.rfpc-success-icon {
    font-size: 56px;
    color: #F7FF00;
    margin-bottom: 20px;
    display: block;
}
.rfpc-success h3 {
    font-size: 26px;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}
.rfpc-success p {
    color: rgba(255,255,255,0.55);
    font-size: 15px;
    line-height: 1.7;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rfpc-inner { flex-direction: column; }
    .rfpc-preview {
        flex: 0 0 auto;
        flex-direction: row;
        padding: 18px 20px;
        gap: 18px;
        min-height: 120px;
    }
    #rfpc-svg { max-width: 90px; }
    .rfpc-price-display { font-size: 22px; }
    .rfpc-price-display small { display: none; }
    .rfpc-wizard {
        padding: 22px 18px 16px;
        flex: 1;
        overflow-y: auto;
    }
    .rfpc-wizard-content { overflow-y: visible; flex: none; }
    .rfpc-progress { margin-bottom: 20px; }
    .rfpc-step-title { font-size: 17px; margin-bottom: 20px; }
    .rfpc-field-row { flex-direction: column; }
}

/* ── Photo mode (L'Abbigliata) ───────────────────────────────────── */

/* Chain bar: barra in cima all'overlay, larghezza piena, come pagina madre */
#rfpc-chain-bar {
    display: none;
    flex-shrink: 0;
    text-align: center;
    padding: 52px 100px 20px;
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.29em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #0020FF;
}
.rfpc-layout-photo #rfpc-chain-bar { display: block; }

/* Photo e price pill nascosti di default */
#rfpc-product-photo { display: none; }
#rfpc-price-pill    { display: none; }

/* Layout abbigliata: wizard SINISTRA, foto DESTRA */
.rfpc-layout-photo .rfpc-inner {
    flex-direction: row;
}
.rfpc-layout-photo .rfpc-preview { order: 1; }
.rfpc-layout-photo .rfpc-wizard  { order: 2; }

/* Preview panel: centrato, immagine non ritagliata (come pagina madre) */
.rfpc-layout-photo .rfpc-preview {
    flex: 0 0 45%;
    padding: 32px 28px;
    background: transparent;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    overflow: hidden;
}

/* Nascondi SVG e prezzo standard */
.rfpc-layout-photo #rfpc-svg           { display: none; }
.rfpc-layout-photo #rfpc-price-display { display: none; }

/* Mostra photo e prezzo */
.rfpc-layout-photo #rfpc-product-photo { display: inline-flex; }
.rfpc-layout-photo #rfpc-price-pill    { display: block; }

/* Contenitore foto: si adatta alla dimensione naturale dell'immagine */
.rfpc-product-photo {
    position: relative;
    line-height: 0;
}
#rfpc-product-img {
    display: block;
    max-height: 62vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Tinta colore sovrapposta all'immagine */
.rfpc-img-tint {
    position: absolute;
    inset: 0;
    mix-blend-mode: multiply;
    opacity: 0;
    background-color: transparent;
    transition: background-color 0.5s ease, opacity 0.4s ease;
    pointer-events: none;
}

/* Prezzo sotto l'immagine */
.rfpc-price-pill {
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
}
.rfpc-price-pill small {
    font-size: 10px;
    letter-spacing: 0.16em;
    display: block;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
    text-transform: uppercase;
}

/* Mobile abbigliata */
@media (max-width: 768px) {
    .rfpc-layout-photo .rfpc-inner { flex-direction: column; }
    .rfpc-layout-photo .rfpc-preview { flex: 0 0 auto; padding: 20px 16px; gap: 12px; }
    #rfpc-chain-bar { padding: 14px 20px 12px; font-size: 8px; letter-spacing: 0.22em; }
    #rfpc-product-img { max-height: 32vh; }
    .rfpc-price-pill { font-size: 20px; }
}
