/* Adobe Fonts kit "skf1ljf" is loaded in the layouts via <link>. */

@font-face {
    font-family: "six-caps";
    src: local("SixCaps Regular"),
         local("SixCaps-Regular"),
         url("../fonts/SixCaps-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "anton", sans-serif;
    font-weight: 400;
}

:root {
    --color-bg: #0a0a0a;
    --color-yellow: #ddce33;
    --color-purple: #9751ff;
    --color-white: #ffffff;
    --font-yellow-title: "source-sans-pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.prodotto-titolo,
.cliente-titolo,
.cliente-header h1,
.blocco-titolo,
.altro-occhio-titolo,
.altro-occhio-slide-titolo {
    font-family: var(--font-yellow-title);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "source-sans-pro", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #fff;
    background: var(--color-bg);
}

.site-body { background: var(--color-bg); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========================================
   ADMIN FLOATING BUTTON
   ======================================== */
.admin-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 9999;
    transition: .3s;
    border: 1px solid rgba(255,255,255,0.15);
}
.admin-floating-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    background: var(--color-bg);
    overflow: hidden;
    z-index: 2;
    padding-bottom: 60px;
}

.hero-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo occhio – leggermente più grande, margin-top 80px */
.hero-logo {
    margin-top: 80px;
    display: flex;
    justify-content: center;
}
.hero-logo img {
    height: 80px;
    width: auto;
}

/* Scritta Portfolio – 80% del container, distanziata 50px */
.hero-title-img {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}
.hero-title-img img {
    width: 60%;
    height: auto;
    opacity: 0.9;
}

/* Banner loghi – gradiente, 150px, no bordi arrotondati */
.hero-banner {
    margin-top: 30px;
    width: 100%;
    height: 150px;
    background: linear-gradient(90deg, #9bf3dc, #64eeca, #39e8b7, #48c7c4, #5bb1cd, #7099d7);
    border-radius: 0;
    border: none;
    overflow: hidden;
    position: relative;
}

/* Slider loghi – loop infinito */
.loghi-slider {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.loghi-track {
    display: flex;
    align-items: center;
    gap: 60px;
    height: 100%;
    width: max-content;
    animation: loghiScroll 35s linear infinite;
}

.loghi-item {
    height: 100px;
    width: 230px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.loghi-item:hover {
    opacity: 1;
}

@keyframes loghiScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========================================
   CERCHI ANIMATI (z-index sopra i clienti)
   ======================================== */
.circles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
    overflow: hidden;
}
.anim-circle {
    position: absolute;
    top: -120px;
    will-change: transform;
}

/* ========================================
   COLONNE (Industria sx | Servizi dx)
   ======================================== */
.colonne-wrapper {
    margin-top: 50px;
    width: 100%;
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 20;
}

.colonna {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 22px 24px;
    border: 1.5px solid var(--color-purple);
    background: transparent;
    cursor: pointer;
    transition: opacity .3s, border-color .3s;
    border-radius: 0;
}

/* Secondo elemento: rimuovi border-left per non sovrapporre con il divider */
.colonna:last-child {
    border-left: none;
}

.colonna-cerchio-wrap {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.colonna-cerchio {
    width: 100%;
    height: 100%;
}

.colonna-label {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    color: #fff;
    transition: color .3s;
}
.blocco-testo{
    font-size: clamp(1rem, 1.6vw, 1.1rem);
    margin-top: 30px;
    padding-bottom: 45px;
    padding-top: 45px;
}
.blocco-link {
    color: var(--color-yellow);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: opacity .2s ease;
}
.blocco-link:hover {
    opacity: .85;
}
.colonna-divider {
    width: 1px;
    align-self: stretch;
    background: var(--color-purple);
    flex-shrink: 0;
}

/* Stato attivo / inattivo */
.colonna-active {
    opacity: 1;
    border-color: var(--color-purple);
}
.colonna-active .colonna-label { color: #fff; }

.colonna-count {
    display: inline-flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-purple);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.colonna-inactive {
    opacity: 0.4;
    border-color: #444;
}
.colonna-inactive .colonna-label { color: #666; }

/* ========================================
   PULSANTI CATEGORIE
   ======================================== */
.categorie-btns {
    margin-top: 50px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
    z-index: 20;
}

.cat-btn {
    flex: 0 0 calc(33.333% - 10px);
    text-align: left;
    padding: 14px 20px;
    border: 1.5px solid var(--color-purple);
    border-radius: 80px;
    background: transparent;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}
.cat-btn:hover {
    background: rgba(151, 81, 255, 0.15);
    color: #fff;
}
.cat-btn-active,
.cat-btn-active:hover {
    background: var(--color-purple);
    color: #fff;
    border-color: var(--color-purple);
}

.filtro-reset {
   
    font-size: .85rem;
    color: var(--color-purple);
    padding: 8px 18px;
    border: 1px solid var(--color-purple);
    border-radius: 80px;
    transition: .2s;
    z-index: 20;
    position: relative;
    top: 35px;
    left: 45%;
}
.filtro-reset:hover { background: rgba(151, 81, 255, 0.2); color: #fff; }

/* ========================================
   SEZIONE PRODOTTI — 2 COLONNE
   ======================================== */
.prodotti-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 100px;
    background: var(--color-bg);
}

.prodotti-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

.no-prodotti { text-align: center; color: #666; padding: 60px 0; }

/* 2 colonne con offset verticale sulla colonna destra */
.prodotti-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    align-items: start;
}

/* Card prodotto */
.prodotto-card {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    opacity: 1;
    transform: scale(1);
    filter: saturate(1);
    transition: opacity .55s cubic-bezier(0.22, 1, 0.36, 1),
                transform .65s cubic-bezier(0.22, 1, 0.36, 1),
                filter .6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

body.js-cards-ready .prodotto-card {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    filter: saturate(0.82);
}

body.js-cards-ready .prodotto-card.prodotto-card--revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
    transition-delay: var(--reveal-delay, 0ms);
}

/* Colonna destra più bassa rispetto alla sinistra */
.prodotto-card:nth-child(2n) {
    margin-top: 70px;
}
.prodotto-card:hover {
    opacity: 1;
    transform: translateY(-7px) scale(1.01);
    filter: saturate(1.04);
}
/* Stato "in uscita" — aggiunto via JS prima di display:none */
.prodotto-card--exiting {
    opacity: 0 !important;
    transform: scale(0.93) !important;
    pointer-events: none;
}
/* Stato "in entrata" — frame prima di rimuovere la classe */
.prodotto-card--entering {
    opacity: 0;
    transform: scale(0.93);
}

.prodotto-img {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    height: clamp(200px, 25vw, 380px);
}

.prodotto-img img,
.prodotto-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}
.prodotto-card:hover .prodotto-img img,
.prodotto-card:hover .prodotto-img video { transform: scale(1.045); }

.prodotto-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #222);
}

/* Altezze fisse responsive per i 3 formati card */
.prodotto-card--tall .prodotto-img {
    height: clamp(260px, 32vw, 480px);
}

.prodotto-card--medium .prodotto-img {
    height: clamp(200px, 25vw, 380px);
}

.prodotto-card--short .prodotto-img {
    height: clamp(150px, 18vw, 280px);
}

/* Info sotto l'immagine */
.prodotto-info {
    padding: 12px 4px 0;
}

.prodotto-titolo {
    font-size: 2.6em;
    font-weight: 700;
    color: var(--color-yellow);
    margin: 0;
    line-height: 1.2;
}

.prodotto-cliente {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin-top: 4px;
}

/* ========================================
   CLIENTI (legacy) — nascosta / rimossa
   ======================================== */
.clienti-section {
    position: relative;
    z-index: 1;
    padding: 80px 0 100px;
    background: var(--color-bg);
}

.no-clienti { text-align: center; color: #666; padding: 60px 0; }

.cliente-card {
    display: block;
    width: min(100%, 860px);
    margin: 0 auto 80px;
    text-align: left;
    transition: opacity .3s;
}
.cliente-card:last-child { margin-bottom: 0; }
.cliente-card:hover { opacity: 0.9; }

.cliente-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
}
.cliente-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s;
}
.cliente-card:hover .cliente-img img { transform: scale(1.02); }
.cliente-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #222);
}

.cliente-card {
    gap: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    }

.cliente-img {
    max-width: 580px;
    width: 100%;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-cliente {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0 auto;
}

.cliente-titolo {
    margin-top: 25px;
    margin-bottom: 0;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-yellow);
    text-align: left;
    width: 100%;
}

.cliente-desc {
    margin-top: 20px;
    font-size: 1.05rem;
    color: #bbb;
    line-height: 1.7;
    text-align: left;
    width: 100%;
}

.container-cliente {
    width: 100%;
}

.cliente-titolo {
    margin-top: 25px;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-yellow);
    text-align: left;
    width: 100%;
}

.cliente-desc {
    margin-top: 20px;
    font-size: 1.05rem;
    color: #bbb;
    line-height: 1.7;
    text-align: left;
    width: 100%;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    background: #fff;
    transition: .2s;
}
.btn:hover { background: #eee; }
.btn-primary { background: #111; color: #fff; border-color: #111; }
.btn-primary:hover { background: #333; }
.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
.btn-link { color: #0066cc; border: none; background: none; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ========================================
   FLASH MESSAGES
   ======================================== */
.flash { padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; }
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ========================================
   FORMS
   ======================================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 600; font-size: .9rem; }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .95rem;
}
.form-group textarea { resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.inline-form { display: inline; }

/* ========================================
   ADMIN LAYOUT
   ======================================== */
.admin-body { background: #eef1f5; }

.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 220px;
    background: #1e293b;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-header { padding: 20px; border-bottom: 1px solid #334155; }
.sidebar-header .logo { font-size: 1.2rem; font-weight: 700; color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; padding: 10px 0; }
.sidebar-nav a {
    padding: 10px 20px;
    color: #94a3b8;
    font-size: .9rem;
    transition: .2s;
}
.sidebar-nav a:hover { background: #334155; color: #fff; }
.sidebar-nav hr { border: 0; border-top: 1px solid #334155; margin: 8px 0; }

.admin-content { flex: 1; padding: 30px; }
.admin-content h1 { margin-bottom: 20px; }

.admin-content,
.admin-content p,
.admin-content td,
.admin-content th,
.admin-content label,
.admin-content li { color: #111827; }

.admin-content code {
    color: #1f2937;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 2px 6px;
}

.admin-content .form-group label {
    color: #111827;
}

.admin-content .form-group input[type="text"],
.admin-content .form-group input[type="url"],
.admin-content .form-group input[type="password"],
.admin-content .form-group input[type="email"],
.admin-content .form-group input[type="number"],
.admin-content .form-group textarea,
.admin-content .form-group select {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
}

.admin-content .form-group input::placeholder,
.admin-content .form-group textarea::placeholder {
    color: #9ca3af;
}

.admin-help-text {
    margin: -8px 0 16px;
    color: #4b5563;
    font-size: .92rem;
}

/* Checkbox categorie nel form prodotti */
.categorie-check-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-top: 4px;
}

.categorie-check-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.categorie-check-label {
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .92rem;
    color: #111827;
    cursor: pointer;
    line-height: 1.4;
}

.check-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-purple);
    cursor: pointer;
    flex-shrink: 0;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: .82rem;
}

.admin-size-guide {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-size-guide p {
    margin: 0 0 6px;
    color: #374151;
    font-size: .83rem;
}

.admin-size-list {
    margin: 0;
    padding-left: 18px;
    color: #4b5563;
    font-size: .82rem;
    line-height: 1.5;
}

.slot-row-size {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: .76rem;
    font-weight: 400;
}

.admin-layout-preview {
    margin-top: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
    max-width: 280px;
}

.preview-grid {
    display: grid;
    gap: 6px;
    height: 92px;
}

.preview-grid span {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 6px;
    border: 1px solid #94a3b8;
}

.admin-layout-preview[data-layout=""] .preview-grid span {
    display: none;
}

.admin-layout-preview[data-layout="img_singola"] .preview-grid,
.admin-layout-preview[data-layout="video_singolo"] .preview-grid {
    grid-template-columns: 1fr;
}

.admin-layout-preview[data-layout="img_singola"] .preview-grid span:nth-child(n+2),
.admin-layout-preview[data-layout="video_singolo"] .preview-grid span:nth-child(n+2) {
    display: none;
}

.admin-layout-preview[data-layout="due_immagini"] .preview-grid {
    grid-template-columns: 1fr 1fr;
}

.admin-layout-preview[data-layout="due_immagini"] .preview-grid span:nth-child(3) {
    display: none;
}

.admin-layout-preview[data-layout="gallery"] .preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-layout-preview[data-layout="una_grande_due_piccole"] .preview-grid {
    grid-template-columns: 1fr 1.6fr;
    grid-template-rows: 1fr 1fr;
}

.admin-layout-preview[data-layout="una_grande_due_piccole"] .preview-grid span:nth-child(1) {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.preview-label {
    margin-top: 8px;
    font-size: .82rem;
    color: #4b5563;
}

.media-bulk-wrap {
    margin-top: 12px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.media-bulk-grid {
    display: grid;
    gap: 10px;
}

.media-bulk-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-bulk-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.btn {
    color: #111;
}

.btn-primary {
    color: #fff;
}

/* ========================================
   ADMIN TABLE
   ======================================== */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; margin-top: 16px; }
.admin-table th,
.admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: #f8fafc; font-size: .85rem; text-transform: uppercase; color: #64748b; }
.admin-table td { color: #111827; }
.admin-table .actions { white-space: nowrap; }
.admin-table .actions .btn { margin-right: 4px; }
.admin-table .thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; }

/* ========================================
   STATS
   ======================================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-card h3 { font-size: 2.5rem; color: #111; }
.stat-card p { color: #666; margin: 4px 0 12px; }

/* ========================================
   LOGIN
   ======================================== */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.login-box { background: #1a1a1a; padding: 40px; border-radius: 8px; width: 100%; max-width: 400px; box-shadow: 0 2px 10px rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,0.08); }
.login-box h1 { text-align: center; margin-bottom: 24px; color: #fff; }
.login-box .form-group label { color: #ccc; }
.login-box input { background: #111; color: #fff; border-color: #333; }
.login-box .btn-primary { width: 100%; }

/* ========================================
   DETTAGLIO CLIENTE (pagina scura)
   ======================================== */
.dettaglio-page {
    background: var(--color-bg);
    padding: 40px 20px 120px;
    position: relative;
    overflow: hidden;
}

.dettaglio-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.dettaglio-logo {
    height: 72px;
    width: auto;
}

.dettaglio-wrap {
    width: min(100%, 1100px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;

}

.dettaglio-inner {
    width: min(100%, 920px);
    margin: 0 auto;

}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: .95rem;
}

.dettaglio-back-link {
    margin: 0 0 22px;
}

.back-link-icon {
    width: min(48px, 16.8vw);
    height: auto;
    opacity: .9;
}

.back-link:hover {
    color: #fff;
}

.cliente-header {
    margin-top: 25px;
    margin-bottom: 40px;
}

.cliente-header h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    margin-bottom: 12px;
    color: var(--color-yellow);
    line-height: 1.15;
}

.cliente-tags,
.prodotto-tags {
    display: flex;
    gap: 14px;
    row-gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .74rem;
    letter-spacing: .2px;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,.12);
}

.cliente-tags-yellow .tag-yellow,
.prodotto-tags-yellow .tag-yellow,
.tag-yellow {
    background: rgba(221, 206, 51, 0.12);
    color: var(--color-yellow);
    border-color: rgba(221, 206, 51, 0.35);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

.dettaglio-cliente {
    width: 100%;
}

.dettaglio-cliente .cliente-desc { color: #bbb; line-height: 1.8; margin-bottom: 16px; max-width: 900px; }

.badge { padding: 2px 8px; border-radius: 10px; font-size: .75rem; }
.badge-servizio { background: rgba(151, 81, 255, 0.2); color: var(--color-purple); }
.badge-azienda { background: rgba(221, 206, 51, 0.15); color: var(--color-yellow); }

/* ========================================
   BLOCCHI
   ======================================== */
.blocchi-container { display: flex; flex-direction: column; gap: 60px; }
.blocco { padding: 20px 0; }
.blocco-titolo { font-size: clamp(1.7rem, 4vw, 4rem); margin-bottom: 10px; color: var(--color-yellow); line-height: 1.2; font-weight: 700; margin-top: 15px;}
.blocco-desc { color: #d1d5db; margin-bottom: 16px; line-height: 1.75; max-width: 980px; }

/* base media */
.blocco-media img,
.blocco-media video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }

.media-item {
    margin-top: 25px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
}

/* ---- 1. Singola immagine full width ---- */
.layout-singola {
    width: 100%;
}
.layout-singola .media-item img,
.layout-singola .media-item video {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 10px;
}
.layout-singola.layout-singola-custom .media-item {
    height: var(--singola-h, 520px);
}
.layout-singola.layout-singola-custom .media-item img,
.layout-singola.layout-singola-custom .media-item video {
    height: 100%;
    max-height: none;
    object-fit: contain;
}

/* ---- 5. Video singolo full width ---- */
.layout-video_singolo {
    width: 100%;
}
.layout-video_singolo .media-item-video video {
    width: 100%;
    height: auto;
    max-height: 720px;
    border-radius: 10px;
    display: block;
    background: #000;
}

/* ---- 2. 2 foto sx sovrapposte + 1 grande dx ---- */
.layout-due_sx_una_dx {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}
.layout-due_sx_una_dx .col-sinistra {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.layout-due_sx_una_dx .col-sinistra .media-item {
    flex: 1;
    min-height: 0;
}
.layout-due_sx_una_dx .col-sinistra .media-item img {
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}
.layout-due_sx_una_dx .col-destra {
    display: flex;
    flex-direction: column;
}
.layout-due_sx_una_dx .col-destra .media-item {
    flex: 1;
}
.layout-due_sx_una_dx .col-destra .media-item img {
    height: 100%;
    object-fit: cover;
}

/* ---- 3. 1 grande sx + 2 foto dx sovrapposte ---- */
.layout-una_sx_due_dx {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
}
.layout-una_sx_due_dx .col-sinistra {
    display: flex;
    flex-direction: column;
}
.layout-una_sx_due_dx .col-sinistra .media-item {
    flex: 1;
}
.layout-una_sx_due_dx .col-sinistra .media-item img {
    height: 100%;
    object-fit: cover;
}
.layout-una_sx_due_dx .col-destra {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.layout-una_sx_due_dx .col-destra .media-item {
    flex: 1;
    min-height: 0;
}
.layout-una_sx_due_dx .col-destra .media-item img {
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

/* ---- 4. Galleria — carousel 100% width ---- */
.layout-galleria {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.galleria-track {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}
.galleria-slide {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}
.layout-galleria .galleria-slide img,
.layout-galleria .galleria-slide video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}
.galleria-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.galleria-btn:hover { background: rgba(0, 0, 0, 0.75); }
.galleria-prev { left: 12px; }
.galleria-next { right: 12px; }
.galleria-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    pointer-events: none;
}
.galleria-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s;
    pointer-events: all;
    cursor: pointer;
}
.galleria-dot.active { background: #fff; }


/* legacy layout selectors rimossi — ora gestiti da .layout-singola, .layout-due_sx_una_dx, .layout-una_sx_due_dx, .layout-galleria, .layout-video_singolo */

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.gallery-carousel {
    width: 100%;
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    gap: 12px;
    align-items: center;
}

.gallery-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(221, 206, 51, 0.45);
    background: rgba(221, 206, 51, 0.08);
    color: var(--color-yellow);
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-nav:hover {
    background: rgba(221, 206, 51, 0.2);
}

.gallery-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.gallery-track {
    display: flex;
    gap: 12px;
}

.gallery-slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 9;
    scroll-snap-align: start;
}

/* ========================================
   CERCHI DETTAGLIO (z-index sotto il contenuto)
   ======================================== */
.circles-dettaglio {
    z-index: 1;
}

.dettaglio-wrap {
    position: relative;
    z-index: 2;
}

.dettaglio-logo-wrap {
    position: relative;
    z-index: 2;
}

/* ========================================
   CTA "PARLIAMOCI"
   ======================================== */
.cta-parliamoci-section {
    background: var(--color-bg);
    text-align: center;
    padding: 80px 20px 80px;
}
.cta-parliamoci {
    display: inline-block;
    font-size: clamp(1rem, 2vw, 1.7rem);

    font-weight: 700;
    color: var(--color-purple);
    letter-spacing: 1px;
    transition: color .3s;
    
}
.cta-parliamoci:hover {
    color: var(--color-purple);
}

/* ========================================
   SEZIONE "DAI UN ALTRO OCCHIO"
   ======================================== */
.altro-occhio-section {
    background: #222221;
    padding: 80px 20px;
}

.altro-occhio-container {
    width: min(100%, 920px);
    margin: 0 auto;
}

.altro-occhio-titolo {
    font-size: clamp(0.9rem, 2.6vw, 1.6rem);

    font-weight: 700;
    color: var(--color-yellow);
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-align: center;
}

.altro-occhio-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.altro-occhio-track {
    display: flex;
    gap: 12px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.altro-occhio-track.is-dragging {
    transition: none;
}

.altro-occhio-slide {
    position: relative;
    flex: 0 0 calc((100% - 12px) / 2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.altro-occhio-slide-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.altro-occhio-img-wrap {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    background: #111;
    margin: 0 auto;
}

.altro-occhio-img-inner {
    position: absolute;
    inset: 0;
    border-radius: 12px; 
    overflow: hidden;
}

.altro-occhio-img-inner img,
.altro-occhio-img-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.altro-occhio-nav-btn {
    position: absolute;
    top: 45%;
    right: 5%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    z-index: 5;
    transition: transform 0.3s;
}

.altro-occhio-nav-btn img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.altro-occhio-nav-btn:hover {
    transform: translateY(-50%) scale(1.15);
}

.altro-occhio-slide-titolo {
    font-size: clamp(1.25rem, 2.6vw, 1.9rem);
    color: var(--color-yellow);
    margin-top: 20px;
    text-align: center;
}

/* ========================================
   LINK VISITA IL SITO
   ======================================== */
.prodotto-sito-link {
    margin-top: 56px;
    padding-top: 16px;
}

.cliente-sito-link {
    margin-top: 40px;
    padding-top: 20px;
}

.btn-visita-sito {
    display: inline-block;
    padding: 12px 32px;
    border: 1.5px solid var(--color-yellow);
    border-radius: 80px;
    color: var(--color-yellow);
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: background 0.3s, color 0.3s;
}

.btn-visita-sito:hover {
    background: var(--color-yellow);
    color: #0a0a0a;
}

/* ========================================
   PREVIEW IMMAGINI
   ======================================== */
.current-img { margin-bottom: 8px; }
.preview-img { max-width: 300px; border-radius: 6px; border: 1px solid #ddd; }
.preview-img.small { max-width: 150px; }

/* ========================================
   RESPONSIVE
   ======================================== */

/* ---- Tablet: 2 colonne ---- */
@media (min-width: 769px) and (max-width: 1024px) {
    .prodotti-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .form-row { flex-direction: column; gap: 0; }
    .layout-due_immagini,
    .layout-gallery { grid-template-columns: 1fr; } /* legacy */

    /* Nuovi layout blocchi: 1 colonna su mobile */
    .layout-due_sx_una_dx,
    .layout-una_sx_due_dx {
        grid-template-columns: 1fr;
    }

    /* Hero responsive */
    .hero-logo { margin-top: 40px; display: flex; justify-content: center; }
    .hero-logo img { height: 50px; }
    .hero-title-img { width: 95%; }
    .hero-banner { height: 100px; }
    .loghi-item { height: 55px; width: 100px; }
    .loghi-track { gap: 40px; }

    .colonne-wrapper { flex-direction: column; gap: 0; }
    .colonna-divider { width: 100%; height: 1px; }
    .colonna:last-child { border-left: 1.5px solid var(--color-purple); border-top: none; }

    .categorie-btns { gap: 10px; }
    .cat-btn { flex: 0 0 calc(50% - 5px); font-size: .8rem; padding: 10px 12px; }

    /* Prodotti: 1 colonna su mobile */
    .prodotti-grid {
        grid-template-columns: 1fr;
        row-gap: 1.2rem;
    }
    .prodotto-card:nth-child(2n) {
        margin-top: 0;
    }
    /* Mobile: card piu verticali per evitare effetto "schiacciato" */
    .prodotto-card--tall .prodotto-img   { height: clamp(380px, 98vw, 620px); }
    .prodotto-card--medium .prodotto-img { height: clamp(340px, 88vw, 560px); }
    .prodotto-card--short .prodotto-img  { height: clamp(300px, 78vw, 500px); }

    /* Clienti responsive */
    .cliente-img { width: 100%; }
    .cliente-titolo { font-size: 1.3rem;  }

    .cliente-card { margin-bottom: 50px; }

    .dettaglio-page { padding: 28px 16px 60px; }
    .dettaglio-logo { height: 52px; }
    .gallery-carousel { grid-template-columns: 36px 1fr 36px; gap: 8px; }
    .gallery-nav { width: 36px; height: 36px; font-size: 1.5rem; }

    .altro-occhio-section { padding: 50px 16px; }
    .altro-occhio-nav-btn { width: 48px; height: 48px; }
    .altro-occhio-slide { flex-basis: 100%; }

    .media-bulk-grid-2,
    .media-bulk-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cat-btn { flex: 0 0 100%; }
    .cta-parliamoci-section { padding: 50px 20px 50px; }

    .hero-title-img img {
    width: 80%;
    height: auto;
    opacity: 0.9;
}
}


/* ============================================================
   ADMIN - Gestione Blocchi UI unificata
   ============================================================ */

.blocco-edit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.blocco-edit-header h1 { margin: 0; }

.blocco-meta-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.blocco-divider {
    border: none;
    border-top: 2px solid #ddd;
    margin: 28px 0;
}

.blocco-elementi-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.blocco-empty {
    color: #888;
    font-style: italic;
    margin-bottom: 16px;
}

.blocco-elemento {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.elemento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f0f0;
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
}

.elemento-tipo-badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: #e8e8e8;
    color: #333;
}
.elemento-tipo-descrizione { background: #e3f0ff; color: #1a5fad; }
.elemento-tipo-media       { background: #f3ffe3; color: #3a8a00; }

.elemento-actions { display: flex; gap: 6px; }
.elemento-body    { padding: 16px; }

.media-files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.media-file-item {
    position: relative;
    width: 100px;
    height: 100px;
}
.media-thumb, .media-thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}
.media-delete-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    padding: 1px 5px;
    font-size: 0.75rem;
    line-height: 1.4;
    opacity: 0.85;
}
.media-delete-btn:hover { opacity: 1; }

.media-layout-label { font-size: 0.9rem; margin-bottom: 10px; color: #555; }
.media-counter  { font-size: 0.85rem; color: #666; }
.counter-full   { color: #e05c00; font-weight: 700; }
.media-completo { color: #3a8a00; font-style: italic; font-size: 0.9rem; margin-top: 8px; }

.media-upload-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.media-upload-form input[type="file"] { font-size: 0.9rem; }
.media-height-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}
.media-height-form label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #374151;
}
.media-height-form input[type="number"] {
    width: 160px;
    max-width: 100%;
}

/* ── Layout a slot (due_sx_una_dx / una_sx_due_dx) ── */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.slot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fafafa;
    min-height: 52px;
}
.slot-row-filled { border-color: #3a8a00; background: #f4fff0; }
.slot-row-empty  { border-color: #ccc;    background: #f9f9f9; }

.slot-row-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #555;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.slot-row-filled .slot-row-num { background: #3a8a00; }

.slot-row-label {
    flex: 1;
    font-size: 0.82rem;
    color: #444;
    font-weight: 500;
}

.slot-row-thumb {
    width: 56px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}
.slot-mini {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slot-upload-inline {
    display: flex !important;
    align-items: center;
    gap: 6px;
}
.slot-file-label { position: relative; cursor: pointer; }
.slot-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
}
.btn-outline {
    background: #fff;
    border: 1px solid #999;
    color: #333;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-outline:hover { background: #f0f0f0; }

.blocco-add-panel {
    background: #fafafa;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px 24px;
    margin-top: 24px;
}
.blocco-add-panel h3 { margin: 0 0 14px; font-size: 1rem; color: #555; }
.blocco-add-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.media-add-form { display: flex; gap: 8px; align-items: center; }
.singola-height-add input[type="number"] {
    width: 180px;
    max-width: 100%;
}
.btn-add {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-add:hover { background: #111; }

.blocco-index-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.blocco-index-header h1 { margin: 0; }


.dettaglio-prodotto{
    margin-top: 30px;
}
