.kl-hero-gallery { position: relative; isolation: isolate; }
.kl-home .kl-hero-gallery .kl-photo { opacity: 0; transition: opacity .6s ease; }
.kl-home .kl-hero-gallery .kl-photo.is-active { opacity: 1; }
.kl-hero-gallery picture { display:contents; }
.kl-home .kl-hero-gallery :where(picture:not(:first-child)) .kl-photo {
    position:absolute;
    inset:0;
    object-position:75% center;
}
.kl-hero-controls {
    display:flex;
    align-items:center;
    width:max-content;
    max-width:100%;
    gap:5px;
    padding:4px;
    color:#fff;
    background:transparent;
    text-shadow:0 1px 3px #102440, 0 0 6px #102440;
    border-radius:8px;
    font-size:.8rem;
    font-variant-numeric:tabular-nums;
}
.kl-hero-controls[hidden] { display:none; }
.kl-hero-controls button {
    display:grid;
    place-items:center;
    min-width:38px;
    min-height:38px;
    padding:0;
    color:inherit;
    background:transparent;
    border:1px solid transparent;
    border-radius:5px;
    font:inherit;
    text-shadow:inherit;
    font-size:1rem;
    cursor:pointer;
}
.kl-hero-controls button:hover,
.kl-hero-controls button:focus-visible { border-color:#d4e3f6; }
.kl-hero-position { min-width:3em; text-align:center; }
@media (min-width: 841px) {
    .kl-home .kl-hero-gallery { position:absolute; inset:0; z-index:-2; }
    .kl-home .kl-hero-gallery .kl-photo { z-index:auto; }
    .kl-hero-controls { position:absolute; inset:auto 12px 12px auto; }
}
@media (max-width: 840px) {
    .kl-hero-gallery .kl-photo { height:clamp(215px, 38vw, 350px); min-height:0; }
    .kl-hero-gallery,.kl-hero-controls { grid-area:1 / 2; }
    .kl-hero-gallery { align-self:end; }
    .kl-hero-controls { align-self:end; justify-self:end; margin:0 8px 8px 0; z-index:1; }
}
@media (max-width: 620px) {
    .kl-hero-gallery,.kl-hero-controls { grid-area:2 / 1; }
}
@media (prefers-reduced-motion: reduce) {
    .kl-home .kl-hero-gallery .kl-photo { transition:none; }
}
@media (min-width: 841px) {
    .kl-home .kl-hero-gallery .kl-photo {
        left:auto;
        right:0;
        width:clamp(70%, calc(110vh + 8vw), 85%);
        object-fit:cover;
        object-position:right center;
        mask-image:linear-gradient(to right, transparent, #000 28%, #000 calc(100% - clamp(64px, 7vw, 160px)), transparent);
    }
}

.kl-home {
    --kl-promo-gap:24px;
    --kl-promo-section-width:min(100%, var(--kl-site-width, 1200px));
}
.kl-home #kl-recensioni:has(.kl-warranty-row) { padding-bottom:var(--kl-promo-gap); }
.kl-home .kl-warranty-row { display:flex; justify-content:center; padding-top:var(--kl-promo-gap); }
.kl-home > #kl-offerte { width:var(--kl-promo-section-width); }
@media (min-width: 841px) {
    .kl-home { --kl-promo-section-width:min(92%, var(--kl-site-width, 1200px)); }
}
.kl-warranty-badge {
    position:relative;
    overflow:hidden;
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:10px 20px;
    border-radius:999px;
    background:#064795;
    color:#fff;
    font-size:clamp(1rem, 2vw, 1.3rem);
    font-weight:700;
}
@media (prefers-reduced-motion: no-preference) {
    .kl-warranty-badge.is-visible::after {
        content:"";
        position:absolute;
        inset:0;
        pointer-events:none;
        background:linear-gradient(110deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%);
        animation:kl-warranty-shine .85s ease-out both;
    }
}
@keyframes kl-warranty-shine {
    from { transform:translateX(-100%); }
    to { transform:translateX(100%); }
}

.kl-warranty-badge svg { width:1.4em; height:1.4em; flex:none; }
