/* ===== home-v2: page type HomeV2 (pages/HomeV2). Solo sezioni home-v2; le regole copiate da home.css senza piu' markup sono state tolte (da .finder restano appearance, colore e cursore del select, spostati nella sezione duo) ===== */

/* ===== home-v2 hero: foto con testo a sinistra, vetrina "Offerta del momento" a destra (template LayoutCatalogHomeV2/Hero), due tessere sotto. Tutta larghezza; sotto 1180px tutto in colonna ===== */
.home-hero {
    --tint: #f1f0ed;
    --save: #3f6b0e;
    --dark: #0d1717;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    height: clamp(600px, 40vw, 720px);
    margin: 16px var(--home-gutter) 0
}

.home-hero__panel {
    grid-row: 1 / 3;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 26px;
    background: var(--dark);
    color: #fff
}

.home-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 78% 50%
}

/* velo scuro da sinistra: il testo resta leggibile sulla foto */
.home-hero__panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(5, 14, 24, .78) 0%, rgba(5, 14, 24, .42) 52%, rgba(5, 14, 24, 0) 78%)
}

.home-hero__content {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: start;
    gap: 22px;
    max-width: 700px;
    padding: 40px 58px
}

.home-hero__kicker {
    padding: 11px 14px 10px;
    background: var(--red);
    font: 700 17px/1 var(--d);
    letter-spacing: .1em;
    text-transform: uppercase
}

.home-hero__title {
    font: 800 clamp(40px, 4.5vw, 66px)/.96 var(--d);
    font-stretch: 75%;
    letter-spacing: .005em;
    text-transform: uppercase;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45)
}

.home-hero__title em {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: .08em;
    text-underline-offset: .1em
}

.home-hero__text {
    max-width: 32em;
    font-size: clamp(16px, 1.2vw, 18px);
    font-weight: 500;
    line-height: 1.55;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5)
}

.home-hero__content .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.home-hero__content .btn {
    height: 50px;
    padding: 0 28px;
    border-color: #fff;
    background: transparent;
    color: #fff;
    font-size: 17px;
    font-weight: 700
}

.home-hero__content .btn:hover {
    background: #fff;
    color: var(--ink)
}

.home-hero__content .btn.btn--solid {
    border-color: var(--red);
    background: var(--red)
}

.home-hero__content .btn.btn--solid:hover {
    border-color: var(--red2);
    background: var(--red2);
    color: #fff
}

/* tessere sotto la vetrina: meta' colonna ciascuna */
.home-hero__tile {
    grid-row: 2;
    grid-column: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: calc(50% - 6px);
    min-height: 136px;
    padding: 16px 18px;
    border-radius: 26px;
    background: var(--tint);
    color: var(--ink);
    transition: transform .35s var(--ease)
}

.home-hero__tile--dark {
    justify-self: end;
    background: var(--dark);
    color: #fff
}

.home-hero__tile:hover {
    transform: translateY(-3px)
}

.home-hero__tile::after {
    content: "\2192";
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 20px;
    line-height: 1
}

.home-hero__tile-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #fff
}

.home-hero__tile--dark .home-hero__tile-icon {
    background: rgba(255, 255, 255, .14)
}

.home-hero__tile-icon svg {
    width: 20px;
    height: 20px
}

.home-hero__tile b {
    font-size: 18px;
    line-height: 1.2
}

.home-hero__tile b + span {
    font-size: 14px;
    line-height: 1.3;
    opacity: .75
}

/* vetrina a rotazione: le slide stanno una sopra l'altra e si alternano in dissolvenza */
.hero-offer {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 18px 22px 20px;
    border-radius: 26px;
    background: radial-gradient(ellipse at 50% 28%, #fff 0, rgba(255, 255, 255, 0) 60%), var(--tint)
}

.hero-offer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.hero-offer__label {
    min-width: 0;
    font: 700 14px/1.15 var(--d);
    letter-spacing: .12em;
    text-transform: uppercase
}

.hero-offer__controls {
    display: flex;
    align-items: center;
    gap: 4px
}

.hero-offer__dots {
    display: flex
}

.hero-offer__dots button {
    display: grid;
    align-items: center;
    width: 30px;
    height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    cursor: pointer
}

.hero-offer__dots i {
    position: relative;
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(13, 23, 23, .22)
}

.hero-offer__dots i::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left
}

/* la barra del pallino attivo mostra il tempo trascorso della slide: --fill (0-1) lo imposta home-v2.js dall'evento autoplayTimeLeft di Swiper, che alla fine passa alla successiva */
.hero-offer__dots .is-active i::after {
    transform: scaleX(var(--fill, 0))
}

.hero-offer__pause {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer
}

/* cerchio disegnato piu' piccolo dell'area di tocco */
.hero-offer__pause svg {
    box-sizing: content-box;
    width: 13px;
    height: 13px;
    padding: 10px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    transition: background .2s, color .2s
}

.hero-offer__pause:hover svg {
    background: var(--ink);
    color: #fff
}

.hero-offer__pause[hidden] {
    display: none
}

.hero-offer__nav {
    position: absolute;
    z-index: 4;
    top: 30%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: background .2s, color .2s
}

.hero-offer__nav:hover {
    background: var(--ink);
    color: #fff
}

.hero-offer__nav svg {
    width: 18px;
    height: 18px
}

.hero-offer__nav--prev {
    left: 8px
}

.hero-offer__nav--next {
    right: 8px
}

.hero-offer.is-single .hero-offer__nav,
.hero-offer.is-single .hero-offer__controls {
    display: none
}

/* slider Swiper con effetto fade (home-v2.js): le slide stanno una sopra l'altra e si alternano in dissolvenza; quelle non attive hanno [inert] */
.hero-offer__track {
    flex: 1;
    min-width: 0;
    min-height: 0;
    /* .swiper ha margin auto ai lati: in colonna flex disattiva lo stretch e la fila si allarga al contenuto */
    margin-left: 0;
    margin-right: 0
}

.hero-offer__slide {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    min-height: 0
}

/* foto prodotto dal catalogo, su fondo chiaro: riquadro bianco */
.hero-offer__photo {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 18px;
    background: #fff
}

.hero-offer__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 1.6s var(--ease)
}

.hero-offer__slide.swiper-slide-active .hero-offer__photo img {
    transform: none
}

.hero-offer__photo .discount-badge {
    position: absolute;
    z-index: 1;
    top: 12px;
    left: 12px;
    font-size: 21px;
    padding: 6px 12px 5px
}

.hero-offer__card {
    display: grid;
    gap: 6px
}

.hero-offer__brand {
    font: 700 13px/1 var(--d);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--red)
}

.hero-offer__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font: 700 clamp(19px, 1.6vw, 24px)/1.2 var(--f)
}

.hero-offer__name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px
}

.hero-offer__card .spec-chips li {
    padding: 0;
    border: 0;
    color: var(--mut);
    font-size: 15px
}

.hero-offer__card .spec-chips li b {
    color: var(--ink);
    font-size: 19px
}

.hero-offer__buy {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 4px 12px;
    margin-top: 4px
}

.hero-offer__buy .price {
    display: grid;
    gap: 2px;
    line-height: 1
}

.hero-offer__buy .price b {
    font-size: clamp(34px, 3vw, 44px)
}

.hero-offer__buy .price s {
    font-size: 15px
}

.hero-offer__buy .saving {
    grid-column: 1;
    margin: 0;
    color: var(--save);
    font-weight: 600
}

.hero-offer__buy .add-to-cart {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: end;
    width: auto;
    height: 52px;
    padding: 0 20px;
    font-weight: 700
}

.hero-offer__buy .add-to-cart:hover {
    border-color: var(--red);
    background: var(--red);
    color: #fff
}

@media (min-width:1181px) and (max-width:1440px) {

    /* la colonna della vetrina e' stretta: etichetta corta sul pulsante, tessere piu' basse */
    .home-hero__tile {
        min-height: 0;
        padding: 12px 14px
    }

    .home-hero__tile-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 4px
    }

    /* specificita' piu' alta: product-card.css si carica dopo */
    .hero-offer__buy .add-to-cart .add-to-cart__label-long {
        display: none
    }

    .hero-offer__buy .add-to-cart .add-to-cart__label-short {
        display: inline
    }
}

@media (max-width:1180px) {
    .home-hero {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
        height: auto;
        margin: 12px var(--home-gutter) 0
    }

    .home-hero__panel {
        grid-row: auto;
        grid-column: 1 / -1;
        min-height: 440px
    }

    .home-hero__bg {
        object-position: 74% 50%
    }

    .home-hero__content {
        max-width: 620px;
        padding: 40px 36px
    }

    .hero-offer {
        grid-column: 1 / -1
    }

    .hero-offer__photo {
        flex: none;
        height: 300px
    }

    .home-hero__tile {
        grid-row: auto;
        grid-column: auto;
        width: auto;
        justify-self: stretch
    }
}

@media (max-width:700px) {
    .home-hero {
        gap: 10px;
        margin: 10px var(--home-gutter) 0
    }

    .home-hero__panel {
        min-height: 0;
        border-radius: 22px
    }

    .home-hero__content {
        gap: 18px;
        padding: 34px 22px 36px
    }

    .home-hero__kicker {
        font-size: 14px
    }

    .home-hero__title {
        font-size: 38px
    }

    .home-hero__content .btn {
        flex: 1 1 100%
    }

    .hero-offer {
        padding: 12px 14px 18px;
        border-radius: 22px
    }

    .hero-offer__photo {
        height: 250px
    }

    .home-hero__tile {
        min-height: 120px;
        padding: 14px;
        border-radius: 22px
    }

    .home-hero__tile b {
        font-size: 16px
    }

    .home-hero__tile b + span {
        font-size: 13px
    }
}

@media (prefers-reduced-motion:reduce) {

    .home-hero__tile,
    .hero-offer__slide,
    .hero-offer__photo img {
        transition: none
    }
}

/* ===== home-v2 gutter: margine laterale dei blocchi a tutta larghezza (hero, marchi + trova batteria, poi banner doppio e storia), 32px / 20px sotto 1180px / 14px sotto 700px; ombra delle schede bianche ===== */
:root {
    --home-gutter: 32px;
    --home-shadow: 0 8px 24px -14px rgba(13, 23, 23, .35), 0 1px 3px rgba(13, 23, 23, .08)
}

@media (max-width:1180px) {
    :root {
        --home-gutter: 20px
    }
}

@media (max-width:700px) {
    :root {
        --home-gutter: 14px
    }
}

/* ===== home-v2 heading: titoli di sezione condensati con la barra rossa inclinata davanti (--small: titolo dentro un riquadro) ===== */
.home-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font: 700 clamp(26px, 2.6vw, 34px)/1.1 var(--d);
    font-stretch: 85%;
    letter-spacing: -.005em;
    color: var(--ink)
}

.home-heading::before,
.home-duo .finder__title::before {
    content: "";
    flex: none;
    width: 10px;
    height: 28px;
    background: var(--red);
    transform: skewX(-18deg)
}

.home-heading--small {
    font-size: 20px;
    line-height: 1.05;
    white-space: nowrap
}

.home-heading--small::before,
.home-duo .finder__title::before {
    width: 7px;
    height: 22px
}

/* ===== home-v2 duo: marchi (frecce nella pagina, fila del template LayoutCatalogHomeV2/Brands) e "Trova batteria" (form di modules/search_form.inc.php) affiancati, a tutta larghezza come l'hero; sotto 1180px uno sopra l'altro ===== */
.home-duo {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    margin: 20px var(--home-gutter) 0
}

.brand-rail,
.home-duo .finder {
    min-width: 0;
    padding: 12px 16px 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--home-shadow)
}

.brand-rail {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.brand-rail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px
}

.brand-rail__nav {
    display: flex;
    gap: 8px
}

.brand-rail__nav[hidden] {
    display: none
}

.brand-rail__arrow,
.product-rail__arrow {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1.5px solid var(--line2);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, opacity .2s
}

/* area di tocco di 44px intorno al cerchio da 36 */
.brand-rail__arrow::after,
.product-rail__arrow::after {
    content: "";
    position: absolute;
    inset: -4px
}

.brand-rail__arrow svg,
.product-rail__arrow svg {
    width: 18px;
    height: 18px
}

.brand-rail__arrow:hover,
.product-rail__arrow:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff
}

.brand-rail__arrow[aria-disabled="true"],
.product-rail__arrow[aria-disabled="true"] {
    opacity: .35;
    cursor: default;
    border-color: var(--line2);
    background: #fff;
    color: var(--ink)
}

.brand-rail__track {
    /* slider Swiper (home-v2.js, sliderOpts): .swiper e .swiper-wrapper vengono da css/swiper-bundle.min.css; quanti loghi per volta si decide nel JS */
    --per: 4;
    --gap: 12px;
    /* .swiper ha margin auto ai lati: in una colonna flex disattiva lo stretch e la fila si allargherebbe al contenuto */
    flex: 1;
    display: flex;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
    min-height: 64px;
    border-radius: 12px
}

/* prima che Swiper parta (JS in fondo alla pagina) le slide hanno gia' la larghezza finale: niente salto di layout. --per e --gap vanno tenuti allineati ai breakpoints di home-v2.js */
.swiper:not(.swiper-initialized) .swiper-slide {
    width: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
    margin-right: var(--gap)
}

.brand-rail__item {
    display: grid;
    place-items: center;
    height: auto;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--soft);
    transition: background .25s
}

.brand-rail__item:hover {
    background: var(--ground)
}

/* dentro la fila che scorre il bordo esterno verrebbe tagliato */
.brand-rail__item:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: -3px
}

.brand-rail__item img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    mix-blend-mode: multiply
}

/* .finder (form del template LayoutFilters/Specifiche) come scheda nel duo */
.home-duo .finder {
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-content: space-between;
    align-items: end;
    gap: 10px;
    margin: 0;
    border: 0
}

.home-duo .finder__title {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0;
    border: 0;
    font: 700 20px/1.05 var(--d);
    font-stretch: 85%;
    text-transform: none;
    white-space: nowrap
}

.home-duo .finder label {
    grid-column: auto;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink)
}

.home-duo .finder select {
    height: 44px;
    appearance: none;
    color: var(--ink);
    cursor: pointer;
    padding: 0 28px 0 10px;
    border: 1.5px solid var(--line2);
    border-radius: 10px;
    background: #fff var(--chev) no-repeat right 10px center;
    font: 500 15px var(--f);
    text-overflow: ellipsis
}

.home-duo .finder select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 1px var(--ink)
}

.home-duo .finder__submit {
    grid-column: auto;
    height: 44px;
    padding: 0 22px;
    white-space: nowrap
}

@media (max-width:1180px) {
    .home-duo {
        grid-auto-flow: row
    }
}

@media (max-width:700px) {
    .brand-rail,
    .home-duo .finder {
        padding: 14px
    }

    .brand-rail__track {
        --per: 2
    }

    .home-duo .finder {
        grid-template-columns: 1fr 1fr
    }

    .home-duo .finder label:last-of-type,
    .home-duo .finder__submit {
        grid-column: 1 / -1
    }
}

/* ===== home-v2 categorie: riquadro boxed con titolo; le tessere (template LayoutMenu/CategorieV2) sono in category-tiles.css, condivise con la radice del catalogo ===== */
.home-cats {
    margin-top: 40px
}

/* riquadro bianco come slider prodotti e recensioni */
.home-cats__box {
    padding: 20px 22px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--home-shadow)
}

.home-cats .home-heading {
    margin-bottom: 16px
}

@media (max-width:700px) {
    .home-cats {
        margin-top: 30px
    }

    .home-cats__box {
        padding: 16px 12px 18px;
        border-radius: 14px
    }
}

/* ===== home-v2 rail: "In vetrina" (id="offerte") e "I piu' venduti", boxed in un riquadro bianco; testata con titolo, frecce (home-v2.js, pager) e "Vedi tutti" nella pagina, fila di card del template LayoutCatalogHomeV2/Rail. 5 card, 3 sotto 1180px, 2 sotto 900px, una e un quarto sotto 700px ===== */
.home-rail {
    margin-top: 40px
}

.product-rail {
    padding: 20px 22px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--home-shadow)
}

.product-rail__head {
    display: flex;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 14px
}

.product-rail__head .home-heading {
    white-space: nowrap
}

.product-rail__intro {
    margin-right: auto;
    color: var(--mut);
    font-size: 15px
}

.product-rail__nav {
    display: flex;
    gap: 8px
}

.product-rail__nav[hidden] {
    display: none
}

.btn.product-rail__all {
    flex: none;
    height: 44px;
    padding: 0 20px;
    border-color: var(--red);
    color: var(--red);
    font-weight: 600
}

.btn.product-rail__all:hover {
    background: var(--red);
    color: #fff
}

.product-rail__all svg {
    width: 18px;
    height: 18px
}

/* slider Swiper: margini negativi e padding lasciano spazio all'ombra (l'overflow di .swiper taglia al bordo del padding) */
.product-rail__track {
    --per: 5;
    --gap: 16px;
    display: flex;
    margin: -4px -2px -10px;
    padding: 4px 2px 10px
}

.rail-card {
    min-width: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .3s, box-shadow .3s
}

.rail-card:hover {
    border-color: var(--line2);
    box-shadow: var(--home-shadow)
}

/* foto dal DB su fondo bianco nel riquadro chiaro, come le tessere delle categorie */
.rail-card__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    overflow: hidden;
    border-radius: 10px;
    background: radial-gradient(ellipse at 50% 65%, #fff 0, var(--ground) 85%)
}

.rail-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: transform .45s var(--ease)
}

.rail-card:hover .rail-card__image img {
    transform: scale(1.06)
}

.rail-card__image .discount-badge {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    padding: 4px 10px 3px;
    border-radius: 10px 0 10px 0;
    font-size: 17px
}

/* tre righe sempre riservate: prezzi e pulsanti allineati fra le card */
.rail-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: 3.6em;
    font: 700 16px/1.2 var(--d);
    font-stretch: 90%;
    color: var(--ink)
}

.rail-card__title a {
    color: inherit;
    text-decoration: none
}

.rail-card__title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px
}

.rail-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--mut)
}

.rail-card__specs li {
    display: inline-flex;
    align-items: center;
    gap: 5px
}

.rail-card__specs svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--red)
}

.rail-card__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto
}

.rail-card .price {
    display: grid;
    gap: 2px;
    line-height: 1
}

.rail-card .price b {
    font-size: 25px;
    font-stretch: 88%
}

.rail-card .price s {
    font-size: 13px
}

/* product-card.css si carica dopo: specificita' piu' alta per il pulsante quadrato rosso */
.rail-card .add-to-cart.add-to-cart--square {
    width: 44px;
    height: 44px;
    border-color: var(--red);
    border-radius: 10px;
    background: var(--red);
    color: #fff
}

.rail-card .add-to-cart.add-to-cart--square:hover {
    border-color: var(--red2);
    background: var(--red2);
    color: #fff
}

@media (max-width:1180px) {
    .product-rail__track {
        --per: 3
    }
}

@media (max-width:900px) {
    /* titolo, frecce e "Vedi tutti" sulla prima riga, frase sotto */
    .product-rail__head {
        flex-wrap: wrap
    }

    .product-rail__intro {
        flex: 1 0 100%;
        order: 3;
        margin-right: 0
    }

    .product-rail__nav {
        margin-left: auto
    }

    .product-rail__track {
        --per: 2
    }
}

@media (max-width:700px) {
    .home-rail {
        margin-top: 30px
    }

    .product-rail {
        padding: 16px 12px 18px;
        border-radius: 14px
    }

    /* sul telefono si scorre col dito, niente frecce */
    .product-rail__head {
        gap: 8px 12px
    }

    .product-rail__nav {
        display: none
    }

    .btn.product-rail__all {
        margin-left: auto;
        padding: 0 16px
    }

    .product-rail__track {
        --per: 1.35;
        --gap: 12px
    }

    .rail-card__image {
        height: 130px
    }
}

/* ===== home-v2 banner: "Offerte in evidenza", due banner con foto di sfondo e testo su velo scuro (template LayoutCatalogHomeV2/Dual, primi due articoli di comp_center_catalog). Tutta larghezza; affiancati sopra 1180px, in colonna sotto; sotto 700px foto in alto e testo sotto ===== */
.home-offers {
    margin: 40px var(--home-gutter) 0
}

.offer-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.offer-banner {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: clamp(400px, 30vw, 520px);
    border-radius: 18px;
    background: #14181a;
    color: #fff
}

/* foto e velo come pseudo-elementi: la foto si ingrandisce al passaggio senza muovere il testo */
.offer-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: 100% 50% / cover no-repeat;
    transition: transform 1.2s var(--ease)
}

.offer-banner:hover::before {
    transform: scale(1.04)
}

.offer-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(4, 8, 14, .94) 0%, rgba(4, 8, 14, .9) 44%, rgba(4, 8, 14, .5) 56%, rgba(4, 8, 14, 0) 68%)
}

.offer-banner--1::before {
    background-image: url("../images/home-v2/banner/offerta-red-tek.webp")
}

.offer-banner--2::before {
    background-image: url("../images/home-v2/banner/offerta-energy-safe.webp")
}

.offer-banner__content {
    display: grid;
    justify-items: start;
    gap: 14px;
    width: 38%;
    min-width: 260px;
    padding: 32px 0 32px 36px
}

.offer-banner__content .discount-badge {
    font-size: 21px;
    padding: 6px 12px 5px
}

.offer-banner__title {
    margin: 0;
    font: 800 clamp(26px, 2.3vw, 36px) / 1.02 var(--d);
    font-stretch: 78%;
    letter-spacing: .005em;
    text-transform: uppercase;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .45)
}

.offer-banner__text {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .5)
}

.offer-banner__content .price {
    gap: 4px 12px;
    margin-top: 4px
}

.offer-banner__content .price b {
    color: #fff;
    font-size: clamp(34px, 3vw, 46px);
    text-shadow: 0 2px 14px rgba(0, 0, 0, .4)
}

.offer-banner__content .price s {
    color: #d6dadd
}

.offer-banner__content .button-row {
    margin-top: 6px
}

/* specificita' piu' alta: product-card.css si carica dopo */
.offer-banner__content .add-to-cart.add-to-cart--large {
    width: auto;
    height: 48px;
    margin: 0;
    padding: 0 20px;
    border-color: var(--red);
    background: var(--red);
    color: #fff;
    font-size: 16px;
    white-space: nowrap
}

.offer-banner__content .add-to-cart.add-to-cart--large:hover {
    border-color: var(--lime);
    background: var(--lime);
    color: var(--ink)
}

.offer-banner__content .btn {
    padding: 0 20px;
    border-color: #fff;
    background: transparent;
    color: #fff;
    font-size: 16px;
    white-space: nowrap
}

.offer-banner__content .btn:hover {
    background: #fff;
    color: var(--ink)
}

@media (max-width:1180px) {
    .offer-banners {
        grid-template-columns: 1fr
    }

    .offer-banner {
        min-height: 420px
    }

    .offer-banner__content {
        width: 40%
    }
}

/* foto in alto, testo sotto su velo che sfuma dal basso; pulsanti a tutta riga */
@media (max-width:700px) {
    .home-offers {
        margin-top: 30px
    }

    .offer-banner {
        display: block;
        min-height: 0;
        border-radius: 16px
    }

    .offer-banner::before {
        background-position: 100% 0;
        background-size: auto 56%
    }

    .offer-banner::after {
        background: linear-gradient(180deg, rgba(4, 8, 14, 0) 22%, rgba(4, 8, 14, .94) 52%)
    }

    .offer-banner__content {
        width: auto;
        min-width: 0;
        gap: 12px;
        padding: 200px 20px 26px
    }

    .offer-banner__content .button-row {
        width: 100%
    }

    .offer-banner__content .add-to-cart.add-to-cart--large,
    .offer-banner__content .btn {
        flex: 1 1 100%
    }

    /* c'e' spazio per l'etichetta lunga: la riga e' intera */
    .offer-banner__content .add-to-cart .add-to-cart__label-long {
        display: inline
    }

    .offer-banner__content .add-to-cart .add-to-cart__label-short {
        display: none
    }
}

/* ===== home-v2 vantaggi: cinque punti di forza in fila con icona rossa e filetti, boxed sotto "I piu' venduti"; 3 per riga sotto 1180px, 2 sotto 700px con l'ultimo a tutta riga ===== */
/* fascia e contenuto a tutta larghezza: i cinque punti si distribuiscono da bordo a bordo, con solo la gutter laterale */
.home-perks {
    margin-top: 40px;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

.home-perks__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 14px 32px;
    list-style: none
}

.home-perks__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-left: 1px solid var(--line2)
}

.home-perks__item:first-child {
    padding-left: 0;
    border-left: 0
}

.home-perks__item svg {
    flex: none;
    width: 36px;
    height: 36px;
    color: var(--red);
    stroke-width: 1.5
}

.home-perks__title {
    display: block;
    font: 700 16px/1.15 var(--d);
    font-stretch: 90%
}

.home-perks__text {
    display: block;
    color: var(--mut);
    font-size: 14px;
    line-height: 1.3
}

@media (max-width:1180px) {
    .home-perks__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 10px
    }

    .home-perks__item:nth-child(4) {
        padding-left: 0;
        border-left: 0
    }
}

@media (max-width:700px) {
    .home-perks {
        margin-top: 30px
    }

    .home-perks__list {
        padding: 6px 16px;
        grid-template-columns: 1fr 1fr;
        row-gap: 0
    }

    .home-perks__item,
    .home-perks__item:first-child,
    .home-perks__item:nth-child(4) {
        padding: 12px 10px;
        border-left: 0;
        border-top: 1px solid var(--line2)
    }

    .home-perks__item:nth-child(-n+2) {
        border-top: 0
    }

    .home-perks__item:nth-child(even) {
        border-left: 1px solid var(--line2)
    }

    .home-perks__item:nth-child(5) {
        grid-column: 1 / -1
    }

    .home-perks__item svg {
        width: 30px;
        height: 30px
    }
}

/* ===== home-v2 storia: "La nostra storia" e "Perche' comprare da Start Batterie" su campo scuro con "1965" a filo in trasparenza. Tutta larghezza come il banner doppio; quattro punti, 2 sotto 1180px, 1 sotto 700px ===== */
.home-story {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 40px var(--home-gutter) 0;
    padding: clamp(56px, 7vw, 108px) clamp(22px, 5vw, 80px) clamp(52px, 6vw, 96px);
    border-radius: 18px;
    background: var(--ink);
    color: #fff
}

/* numero decorativo: testo alternativo vuoto perche' i lettori di schermo non lo leggano */
.home-story::before {
    content: "1965";
    content: "1965" / "";
    position: absolute;
    z-index: -1;
    right: -1%;
    top: -3%;
    font: 800 clamp(180px, 33vw, 540px)/1 var(--d);
    font-stretch: 85%;
    letter-spacing: -.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, .1);
    pointer-events: none;
    user-select: none
}

.home-story__kicker {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ff4351;
    font-size: 15px;
    font-weight: 700
}

.home-story__kicker::before {
    content: "";
    width: 34px;
    height: 2px;
    background: #ff2d3a
}

.home-story__title {
    max-width: 11em;
    margin: 22px 0 26px;
    font: 800 clamp(40px, 5.6vw, 88px)/1.03 var(--d);
    font-stretch: 85%;
    letter-spacing: -.025em;
    color: #fff;
    text-wrap: balance
}

.home-story__lede {
    max-width: 25em;
    color: #cdd1d5;
    font-size: clamp(18px, 1.6vw, 23px);
    line-height: 1.6
}

.home-story__subtitle {
    max-width: 14em;
    margin-top: clamp(48px, 5vw, 80px);
    font: 800 clamp(30px, 3.4vw, 50px)/1.08 var(--d);
    font-stretch: 85%;
    letter-spacing: -.02em;
    color: #fff;
    text-wrap: balance
}

.home-story__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-top: 34px;
    padding: 0;
    list-style: none
}

.home-story__item {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .16)
}

.home-story__item svg {
    display: block;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    color: #ff4351;
    stroke-width: 1.5
}

.home-story__item-title {
    display: block;
    margin-bottom: 8px;
    font: 700 20px/1.25 var(--d);
    font-stretch: 90%
}

.home-story__item-text {
    color: #aeb4b9;
    font-size: 15.5px;
    line-height: 1.6
}

@media (max-width:1180px) {
    .home-story__list {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width:700px) {
    .home-story {
        margin-top: 30px
    }

    .home-story__list {
        grid-template-columns: 1fr;
        gap: 22px
    }
}

/* ===== home-v2 recensioni: riquadro bianco boxed; a sinistra pannello scuro con media Google, link e negozio, a destra slider di schede (frecce e barra di posizione in home-v2.js). 2 schede visibili; sotto 1180px pannello sopra lo slider, sotto 700px una scheda e un pezzo della successiva ===== */
.home-reviews {
    margin-top: 40px
}

.home-reviews__box {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 28px;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--home-shadow)
}

/* pannello scuro come la storia; virgolette decorative in trasparenza */
.home-reviews__summary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 28px 24px;
    border-radius: 14px;
    background: var(--ink);
    color: #fff
}

.home-reviews__summary::before {
    content: "\201C";
    content: "\201C" / "";
    position: absolute;
    z-index: -1;
    right: 14px;
    top: -26px;
    font: 800 260px/1 var(--d);
    color: rgba(255, 255, 255, .06);
    pointer-events: none
}

.home-reviews__kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ff4351;
    font-size: 15px;
    font-weight: 700
}

.home-reviews__kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    background: #ff2d3a
}

.home-reviews__title {
    max-width: 10em;
    margin: 12px 0 0;
    font: 800 clamp(28px, 2.4vw, 34px)/1.05 var(--d);
    font-stretch: 85%;
    letter-spacing: -.015em;
    color: #fff;
    text-wrap: balance
}

.home-reviews__score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 26px
}

.home-reviews__score-num {
    font: 800 72px/.9 var(--d);
    font-stretch: 85%;
    letter-spacing: -.03em
}

.home-reviews__score-side {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.home-reviews__score-text {
    max-width: 10em;
    color: #aeb4b9;
    font-size: 14px;
    line-height: 1.35
}

/* stelle: simbolo #rv-star ripetuto, colore dal currentColor */
.review-stars {
    display: block;
    flex: none;
    width: 100px;
    height: 20px;
    color: #f5a524;
    fill: currentColor
}

.btn.home-reviews__link {
    height: 44px;
    margin: 24px 0 26px;
    padding: 0 18px;
    border-color: rgba(255, 255, 255, .5);
    background: transparent;
    color: #fff;
    font-weight: 600
}

.btn.home-reviews__link:hover {
    border-color: #fff;
    background: #fff;
    color: var(--ink)
}

.home-reviews__link svg {
    width: 18px;
    height: 18px
}

.home-reviews__shop {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    color: #cdd1d5;
    font-size: 14px;
    line-height: 1.4
}

.home-reviews__shop svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: #ff4351
}

.home-reviews__shop b {
    display: block;
    color: #fff;
    font-weight: 600
}

.home-reviews__slider {
    display: flex;
    flex-direction: column;
    min-width: 0
}

/* slider Swiper: padding e margini negativi lasciano spazio all'ombra al passaggio, come le rail */
.home-reviews__track {
    --per: 2;
    --gap: 16px;
    flex: 1;
    display: flex;
    margin: -4px -2px -10px;
    padding: 4px 2px 10px
}

.home-reviews__track .swiper-wrapper {
    margin: 0;
    padding: 0;
    list-style: none
}

.review-card {
    position: relative;
    isolation: isolate;
    height: auto;
    min-width: 0;
    display: flex;
    padding: 26px 26px 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .3s, box-shadow .3s
}

.review-card:hover {
    border-color: var(--line2);
    box-shadow: var(--home-shadow)
}

.review-card::before {
    content: "\201C";
    content: "\201D" / "";
    position: absolute;
    z-index: -1;
    right: 18px;
    bottom: 40px;
    font: 800 150px/.6 var(--d);
    color: var(--red);
    opacity: .08;
    pointer-events: none
}

.review-card__figure {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%
}

.review-card__top {
    display: flex;
    align-items: center;
    gap: 12px
}

.review-card__tag {
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--soft);
    color: var(--mut);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap
}

.review-card__text {
    flex: 1;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.6
}

.review-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    line-height: 1.3
}

.review-card__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--soft);
    color: var(--mut)
}

.review-card__avatar svg {
    width: 20px;
    height: 20px
}

.review-card__author b {
    display: block;
    font-size: 15px;
    font-weight: 600
}

.review-card__author small {
    display: block;
    color: var(--mut);
    font-size: 13px
}

.home-reviews__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px
}

.home-reviews__nav[hidden] {
    display: none
}

/* barra di posizione: il modulo scrollbar di Swiper crea la barra (dragClass) e ne imposta larghezza e posizione */
.home-reviews__progress {
    position: relative;
    flex: 1;
    height: 3px;
    margin-right: 12px;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden
}

.home-reviews__progress-bar {
    position: relative;
    display: block;
    width: 33%;
    height: 100%;
    border-radius: 3px;
    background: var(--red)
}

.home-reviews__arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--line2);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, opacity .2s
}

.home-reviews__arrow svg {
    width: 20px;
    height: 20px
}

.home-reviews__arrow:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff
}

.home-reviews__arrow[aria-disabled="true"] {
    opacity: .35;
    cursor: default;
    border-color: var(--line2);
    background: #fff;
    color: var(--ink)
}

@media (max-width:1180px) {
    .home-reviews__box {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 20px
    }

    /* pannello in orizzontale: titolo e pulsante a sinistra, media e negozio a destra */
    .home-reviews__summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 32px;
        align-items: end;
        padding: 26px 26px 22px
    }

    .home-reviews__kicker,
    .home-reviews__title,
    .btn.home-reviews__link {
        grid-column: 1
    }

    .btn.home-reviews__link {
        justify-self: start;
        margin: 20px 0 0
    }

    .home-reviews__title {
        max-width: none
    }

    .home-reviews__score {
        grid-column: 2;
        grid-row: 1 / 3;
        margin-top: 0
    }

    .home-reviews__shop {
        grid-column: 2;
        grid-row: 3;
        width: auto;
        margin-top: 20px;
        padding-top: 0;
        border-top: 0;
        align-self: center
    }
}

@media (max-width:700px) {
    .home-reviews {
        margin-top: 30px
    }

    .home-reviews__box {
        gap: 18px;
        padding: 14px
    }

    .home-reviews__summary {
        display: flex;
        align-items: flex-start;
        padding: 24px 20px 20px
    }

    .home-reviews__score {
        margin-top: 20px
    }

    .home-reviews__score-num {
        font-size: 60px
    }

    .home-reviews__shop {
        width: 100%;
        margin-top: 22px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, .14)
    }

    .home-reviews__track {
        --per: 1.16;
        --gap: 16px
    }

    .review-card {
        padding: 22px 20px 18px
    }

    .review-card__text {
        font-size: 16px
    }
}

/* ===== home-v2 seo-margin: il footer ha margin-top: 0, margine sotto il testo SEO se e' l'ultimo blocco (la fascia telefono e' in layout.css) ===== */
.home-seo {
    margin-bottom: 88px
}

@media (max-width:700px) {
    .home-seo {
        margin-bottom: 56px
    }
}

/* ===== home-v2 seo: titolo_bottom, testo_bottom (HTML dei campi pagina, senza classi: per questo i selettori sugli elementi dentro .home-seo__text) e comp_bottom, boxed in fondo alla pagina ===== */
.home-seo {
    margin-top: 56px
}

.home-seo__text {
    max-width: 860px;
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.65
}

.home-seo__text > * + * {
    margin-top: 14px
}

.home-seo__text h2,
.home-seo__text h3,
.home-seo__text h4 {
    margin-top: 28px;
    font: 700 21px/1.2 var(--d);
    font-stretch: 88%;
    letter-spacing: 0
}

.home-seo__text ul,
.home-seo__text ol {
    padding-left: 1.3em
}

.home-seo__text a {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 2px
}

.home-seo__text img {
    max-width: 100%;
    height: auto
}

@media (max-width:700px) {
    .home-seo {
        margin-top: 40px
    }
}
