/* ============================================================
   ARTISTI — CSS
   Incluso via wp_enqueue_style in functions.php
   Coerente con dashboard.css / single-post.css / deposit-styles.css
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   1. CATALOGO ARTISTI — griglia + filtri
   ──────────────────────────────────────────────────────────── */
.catalogo-artisti-container {
    max-width: 100%;
    box-sizing: border-box;
}

/* -- Filtri categoria (pillole) -- */
.artisti-filtri {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.artisti-filtro-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.artisti-filtro-btn:hover {
    background: #ececec;
    color: #333;
}

.artisti-filtro-btn.attivo {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* -- Griglia catalogo -- */
.artisti-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.artista-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.artista-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

.artista-card.non-disponibile {
    opacity: 0.6;
}

.artista-card-foto {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f0f0f0;
}

.artista-card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.artista-card:hover .artista-card-foto img {
    transform: scale(1.05);
}

.artista-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff3cd;
    color: #856404;
}

.artista-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.artista-card-nome {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.artista-card-categoria {
    font-size: 13px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.artista-card-prezzo {
    font-size: 15px;
    color: #333;
    margin-bottom: 15px;
}

.artista-card-prezzo strong {
    color: #2c3e50;
}

.artista-card-cta {
    margin-top: auto;
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.artista-card-cta:hover {
    background: #2980b9;
    color: #fff;
}

.artisti-nessun-risultato {
    text-align: center;
    padding: 50px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    grid-column: 1 / -1;
}

/* ────────────────────────────────────────────────────────────
   2. PAGINA SINGOLA ARTISTA
   ──────────────────────────────────────────────────────────── */
.artista-single-header {
    margin-bottom: 30px;
}

.artista-single-nome {
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
    margin: 0 0 8px;
}

.artista-single-categoria {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f0f9f0;
    color: #155724;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.artista-single-categoria.non-disponibile {
    background: #fff3cd;
    color: #856404;
}

/* -- Video -- */
.artista-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 25px 0;
    background: #000;
}

.artista-video-wrap iframe,
.artista-video-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* -- Audio (file caricati nel campo "video_upload" quando non sono video) -- */
.artista-audio-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    margin: 25px 0;
    background: #1e293b;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.artista-audio-icona {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.artista-audio-wrap audio {
    flex: 1;
    min-width: 0;
    height: 40px;
}

/* -- Bio -- */
.artista-bio {
    margin: 25px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}
/* -- Galleria immagini artista: griglia + lightbox --
   NOTA (2026-07-15, punto B del TODO): la griglia (.artista-galleria-griglia,
   .artista-galleria-item) NON è più definita qui — era duplicata, con valori
   diversi, anche in style.css del child theme (auto-fill, foto 4:3). Per
   evitare che le due regole confliggano a seconda dell'ordine di enqueue,
   si è scelto style.css come unica fonte di verità per queste due classi.
   Qui restano solo le regole del lightbox, che non dipendono dalla forma
   delle celle della griglia. */
.artista-galleria {
    margin: 25px 0;
}

/* -- Galleria a pila (carte impilate) --
   Attiva solo quando .artista-galleria-griglia ha anche la classe
   .artista-galleria-pila (aggiunta da genera_html_galleria_artista()).
   Non modifica in alcun modo .artista-galleria-griglia/.artista-galleria-item
   di base (definite in style.css, punto B del TODO) — le regole qui sotto
   si applicano solo dentro il wrapper .artista-galleria-pila, quindi non
   toccano nessun'altra pagina o markup che non lo includa. */
.artista-galleria-pila {
    position: relative;
    display: block;
    width: 100%;
    max-width: 320px;
    height: 380px;
    margin: 0 auto;
}

.artista-galleria-carta {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.artista-galleria-pila .artista-galleria-item {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    box-sizing: border-box;
    border: 12px solid #FAF6EE;
    border-bottom-width: 40px;
    border-radius: 2px;
    background: #333;
    box-shadow:
        0 1px 0 #e9e2d2,
        0 2px 0 #ddd4bd,
        0 3px 0 #d0c6a9,
        0 4px 0 #c3b895,
        0 14px 30px rgba(15, 10, 40, 0.45);
}

.artista-galleria-pila .artista-galleria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artista-galleria-carta:not(.artista-galleria-carta-fronte) .artista-galleria-item {
    pointer-events: none;
}

.artista-galleria-zoom {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.artista-galleria-zoom:hover {
    background: #fff;
    transform: scale(1.08);
}

.artista-galleria-carta-fronte .artista-galleria-zoom {
    display: flex;
}

/* -- Lightbox -- */
.artista-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
}

.artista-lightbox.attivo {
    display: flex;
}

.artista-lightbox-img {
    max-width: 88vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.artista-lightbox-chiudi,
.artista-lightbox-prev,
.artista-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.artista-lightbox-chiudi:hover,
.artista-lightbox-prev:hover,
.artista-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.22);
}

.artista-lightbox-chiudi {
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
}

.artista-lightbox-prev,
.artista-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.artista-lightbox-prev {
    left: 20px;
}

.artista-lightbox-next {
    right: 20px;
}

.artista-lightbox-contatore {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* -- Prezzo indicativo (stesso stile del box "Deposito cauzionale" degli strumenti) -- */
.deposito-importo {
    background: #1e293b;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
    border: none;
}

.deposito-importo .label {
    display: block;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.deposito-importo .importo {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    font-family: Arial, sans-serif;
}

/* ────────────────────────────────────────────────────────────
   3. FORM RICHIESTA INFO
   ──────────────────────────────────────────────────────────── */
.artista-form-richiesta {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin: 40px 0;
}

.artista-form-titolo {
    margin: 0 0 20px;
    font-size: 22px;
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.artista-form-griglia {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.artista-form-campo {
    margin-bottom: 20px;
}

.artista-form-campo label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.artista-form-campo input,
.artista-form-campo select,
.artista-form-campo textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fff;
    font-family: inherit;
}

.artista-form-campo textarea {
    resize: vertical;
    min-height: 100px;
}

.artista-form-nota {
    font-size: 13px;
    color: #999;
    margin-top: -12px;
    margin-bottom: 20px;
}

/* -- Scelta canale invio -- */
.artista-form-azioni {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.artista-btn-email {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-decoration: none;
    text-align: center;
}

.artista-btn-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: #fff;
}

.artista-btn-whatsapp {
    flex: 1;
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    text-align: center;
}

.artista-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.artista-btn-email:disabled,
.artista-btn-whatsapp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* -- Messaggi esito -- */
.artista-form-messaggio {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.artista-form-messaggio.successo {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.artista-form-messaggio.errore {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ────────────────────────────────────────────────────────────
   4. RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .artisti-griglia {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .artista-single-nome {
        font-size: 26px;
    }

    .artista-form-richiesta {
        padding: 20px;
    }

    .artista-form-griglia {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .artista-form-azioni {
        flex-direction: column;
    }

    .artista-btn-email,
    .artista-btn-whatsapp {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .artisti-griglia {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .artista-card-body {
        padding: 14px;
    }

    .artista-card-nome {
        font-size: 16px;
    }

    .artista-form-richiesta {
        padding: 16px;
    }
    .artista-galleria-griglia {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .artista-lightbox-prev,
    .artista-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

/* ────────────────────────────────────────────────────────────
   5. OVERRIDE LAYOUT THE7 — pagina singolo artista
   ──────────────────────────────────────────────────────────── */

/* Azzera padding top/bottom pagina (desktop + mobile) */
body.single-artista #main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.single-artista .vc_row,
body.single-artista .wpb_row,
body.single-artista .vc_section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Nascondi immagine in evidenza automatica The7 */
body.single-artista .post-thumbnail {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Nascondi titolo e breadcrumb automatici The7 */
body.single-artista .page-title {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}