/* ===================================================================
   Scheda prodotto (/prodotto/{slug}): pulsanti opzioni, zoom copertina,
   badge e lightbox. Estratto dal <style> di views/pages/prodotto/detail.twig
   (regola: niente CSS inline nei template).
   =================================================================== */

.swatch-btn { transition: transform .15s, border-color .15s; }
.swatch-btn.active { transform: scale(1.1); border-color: #0f172a; box-shadow: 0 0 0 3px rgba(15,23,42,.12); }
.swatch-color { display:inline-block; width:28px; height:28px; border-radius:9999px; border:1px solid rgba(0,0,0,.1); }
.opt-btn { border:1px solid #d1d5db; background:#fff; padding:.35rem .75rem; border-radius:.375rem; font-size:.875rem; cursor:pointer; }
.opt-btn.active { background:#0f172a; color:#fff; border-color:#0f172a; }
.opt-btn[disabled] { opacity:.4; cursor:not-allowed; }

/* Cover hover zoom + cursor-zoom */
#prodotto-cover { cursor: zoom-in; position: relative; }
#prodotto-cover-img { transition: transform .35s ease; will-change: transform; }
#prodotto-cover:hover #prodotto-cover-img { transform: scale(1.08); }

/* Badge prodotto */
.prodotto-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .75rem;
    border-radius: 9999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    pointer-events: none;
}
.badge-evidenza {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.badge-sconto {
    background: #d32f2f;
    color: #fff;
    top: 12px;
    left: auto;
    right: 12px;
}

/* Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 1rem; }
.lightbox-overlay.active { display: flex; }
.lightbox-img { max-width: 95vw; max-height: 92vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); border-radius: .5rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.25rem; color: #fff; background: rgba(0,0,0,.4); border: 0; width: 42px; height: 42px; border-radius: 9999px; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(0,0,0,.7); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 9999px; font-size: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-nav:hover { background: rgba(0,0,0,.7); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
@media (max-width: 640px) { .lightbox-nav { width: 40px; height: 40px; font-size: 22px; } }

/* Pulsanti della scheda: effetto al passaggio del mouse (prima onmouseover inline) */
#btn-add-cart:not([disabled]):hover { filter: brightness(0.92); }
#cart-cta-checkout:hover { background-color: #047857 !important; }
