/* ===== product: scheda prodotto (galleria, box d'acquisto, righe di dettaglio, scheda tecnica, barra fissa) ===== */

.product {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    margin-top: 16px
}

/* galleria: palco 4:3 + miniature; la foto si ingrandisce sotto il puntatore */
.gallery {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 10px
}

.gallery__stage {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--r-lg);
    background: #f1f1ee;
    overflow: hidden
}

.gallery__stage .discount-badge {
    position: absolute;
    left: 16px;
    top: 16px;
    font-size: 24px
}

.gallery__pane {
    position: absolute;
    inset: 0
}

.gallery__pane[hidden] {
    display: none
}

.gallery__pane img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    transition: transform .45s var(--ease)
}

.gallery__zoom {
    cursor: zoom-in
}

.gallery__zoom.is-zoomed img {
    transform: scale(2)
}

.dimensions {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line)
}

.dimensions svg {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 4% 4% 0
}

.dimensions .dimensions__body {
    fill: #fff;
    stroke: var(--ink);
    stroke-width: 3
}

.dimensions .dimensions__lid {
    fill: var(--red);
    stroke: var(--ink);
    stroke-width: 3
}

.dimensions .dimensions__pole {
    fill: #b9bdb9;
    stroke: var(--ink);
    stroke-width: 2.5
}

.dimensions .dimensions__line {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2
}

.dimensions text {
    font: 700 44px var(--d);
    font-stretch: 78%;
    fill: var(--ink)
}

.dimensions .dimensions__sign {
    fill: var(--red);
    font-size: 48px
}

.dimensions .dimensions__caption {
    font: 500 24px var(--f);
    letter-spacing: .08em;
    text-transform: uppercase;
    fill: var(--mut)
}

.dimensions p {
    padding: 0 20px 16px;
    font-size: 14px;
    color: var(--mut);
    text-align: center
}

.gallery__thumbs {
    display: flex;
    gap: 10px
}

.gallery__thumbs button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    width: 96px;
    aspect-ratio: 4/3;
    padding: 0;
    border: 1px solid var(--line2);
    border-radius: var(--r-sm);
    background: #f1f1ee;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s
}

.gallery__thumbs button:hover {
    border-color: var(--ink)
}

.gallery__thumbs button[aria-pressed="true"] {
    border: 2px solid var(--ink)
}

.gallery__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply
}

.gallery__thumbs svg {
    width: 24px;
    height: 24px;
    color: var(--red)
}

/* box d'acquisto */
.buy-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.buy-box h1 {
    font-size: clamp(34px, 3.2vw, 46px);
    line-height: .98;
    text-transform: uppercase;
    text-wrap: balance
}

.buy-box__subtitle {
    margin-top: 12px;
    color: var(--mut)
}

/* misure chiave: stessa fascia a filetti del banner, su fondo chiaro */
.key-specs {
    display: flex;
    flex-wrap: wrap;
    align-self: stretch;
    margin-top: 20px;
    border-block: 1px solid var(--line2)
}

.key-specs li {
    padding: 12px 22px 11px 0;
    margin-right: 22px
}

.key-specs li+li {
    border-left: 1px solid var(--line2);
    padding-left: 22px
}

.key-specs li:last-child {
    margin-right: 0;
    padding-right: 0
}

.key-specs b {
    display: block;
    font: 700 30px/1 var(--d);
    font-stretch: 78%;
    letter-spacing: .01em
}

.key-specs small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mut)
}

/* icone V / A / Ah accanto all'etichetta, come nelle card */
.key-specs small,
.spec-table dt {
    display: flex;
    align-items: center;
    gap: 6px
}

.key-specs svg,
.spec-table dt svg {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--red)
}

.buy-box>.arrow-link {
    margin-top: 4px;
    font-size: 15px
}

.buy-box__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-top: 12px
}

.buy-box__price .price b {
    font-size: 64px
}

.buy-box__price .price s {
    font-size: 19px
}

.buy-box__price .saving {
    margin: 0;
    font-size: 16px;
    font-weight: 600
}

.buy-box__cta {
    align-self: stretch;
    display: flex;
    gap: 10px;
    margin-top: 22px
}

.buy-box__cta .add-to-cart.add-to-cart--large {
    flex: 1;
    width: auto;
    height: 56px;
    margin: 0;
    background: var(--red);
    border-color: var(--red);
    font-size: 17px
}

.buy-box__cta .add-to-cart.add-to-cart--large:hover {
    background: var(--red2);
    border-color: var(--red2);
    color: #fff
}

.buy-box__cta .add-to-cart.add-to-cart--large.is-done {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink)
}

.buy-box__cta .add-to-cart.add-to-cart--large svg {
    width: 22px;
    height: 22px
}

.buy-box__total {
    align-self: stretch;
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
    font-size: 15px;
    color: var(--mut)
}

.buy-box__total b {
    font: 700 22px/1 var(--d);
    font-stretch: 78%;
    color: var(--ink);
    font-variant-numeric: tabular-nums
}

.ask-call {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: var(--soft);
    transition: background .2s
}

.ask-call svg {
    flex: none;
    width: 24px;
    height: 24px;
    color: var(--red)
}

.ask-call b {
    font-weight: 600;
    white-space: nowrap
}

.ask-call:hover {
    background: var(--ground)
}

.ask-call:hover b {
    color: var(--red)
}

/* righe di dettaglio: filetto scuro in testa, titolo a sinistra, contenuto a destra */
.product-details {
    margin-top: 96px
}

.detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
    gap: 24px 56px;
    padding: 36px 0 56px;
    border-top: 1px solid var(--ink)
}

/* titolo V2 (come .home-heading) */
.detail-row>h2 {
    position: relative;
    padding-left: 22px;
    font-size: clamp(26px, 2.6vw, 34px);
    font-stretch: 85%;
    line-height: 1.1;
    letter-spacing: -.005em;
    text-transform: none
}

.detail-row>h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(.55em - 14px);
    width: 10px;
    height: 28px;
    background: var(--red);
    transform: skewX(-18deg)
}

.detail-row__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 48px
}

.detail-text {
    display: grid;
    align-content: start;
    gap: 14px;
    max-width: 62ch;
    text-wrap: pretty
}

.detail-text h3 {
    font-size: 24px;
    text-transform: uppercase
}

.detail-text a {
    text-decoration: underline;
    text-underline-offset: 3px
}

.detail-text a:hover {
    color: var(--red)
}

.detail-points {
    display: grid;
    align-content: start;
    border-top: 1px solid var(--line2)
}

.detail-points li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--line2);
    font-weight: 500
}

.detail-points li::before {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    background: var(--red)
}

/* scheda tecnica: due colonne di righe, valori con cifre tabellari */
.spec-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    border-top: 1px solid var(--line2)
}

.spec-table div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line2)
}

.spec-table dt {
    color: var(--mut)
}

.spec-table dd {
    text-align: right;
    font-weight: 500;
    font-variant-numeric: tabular-nums
}

.spec-table dd b {
    font: 700 22px/1 var(--d);
    font-stretch: 78%;
    letter-spacing: .01em
}

.detail-row__body {
    max-width: 760px
}

.shipping-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums
}

.shipping-table th,
.shipping-table td {
    padding: 14px 16px 14px 0;
    text-align: left;
    border-bottom: 1px solid var(--line2)
}

.shipping-table thead th {
    padding-top: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mut);
    border-bottom-color: var(--ink)
}

.shipping-table tbody th {
    font-weight: 600
}

.shipping-table td:last-child,
.shipping-table thead th:last-child {
    text-align: right;
    padding-right: 0
}

.shipping-table td:last-child {
    font: 700 22px/1 var(--d);
    font-stretch: 78%
}

.footnote {
    margin-top: 14px;
    max-width: 62ch;
    font-size: 15px;
    color: var(--mut)
}

.footnote+.footnote {
    margin-top: 6px
}

.warranty-list {
    margin-top: 6px;
    border-top: 1px solid var(--line2)
}

.warranty-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line2);
    font-size: 15px
}

.warranty-list dd {
    font-weight: 600;
    white-space: nowrap
}

.warranty-list .is-active {
    margin: 0 -12px;
    padding: 10px 12px;
    background: var(--soft);
    font-weight: 600
}

/* correlati dopo la scheda tecnica: piu' stretti del ritmo .section (64/44).
   ~ e non +: nel markup tra le due c'e' la .buy-bar (fissa, fuori flusso) */
.product-details~.section {
    margin-top: 48px
}

/* barra d'acquisto fissa in basso */
.buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line2);
    box-shadow: 0 -8px 24px rgba(13, 23, 23, .08);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .4s var(--ease), visibility 0s .4s
}

.buy-bar.is-active {
    transform: none;
    visibility: visible;
    transition: transform .4s var(--ease)
}

.buy-bar__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 76px
}

.buy-bar__inner img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    background: #f1f1ee;
    mix-blend-mode: multiply
}

.buy-bar__name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.buy-bar__inner .price {
    flex-wrap: nowrap
}

.buy-bar__inner .price b {
    font-size: 32px
}

.buy-bar__inner .add-to-cart {
    width: auto;
    height: 48px;
    margin: 0;
    padding: 0 26px;
    background: var(--red);
    border-color: var(--red)
}

.buy-bar__inner .add-to-cart:hover {
    background: var(--red2);
    border-color: var(--red2);
    color: #fff
}

.buy-bar__inner .add-to-cart.is-done {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink)
}

.has-buy-bar .toast {
    bottom: 100px
}

.product .price b,
.buy-bar__inner .price b {
    font-variant-numeric: tabular-nums
}

@media (max-width:1180px) {
    .gallery {
        top: 130px
    }

    .product {
        gap: 40px
    }

    .detail-row__cols {
        grid-template-columns: 1fr
    }
}

@media (max-width:900px) {
    .product {
        grid-template-columns: 1fr;
        gap: 28px
    }

    .gallery {
        position: static
    }

    .detail-row {
        grid-template-columns: 1fr;
        padding: 28px 0 44px
    }

    .spec-table {
        grid-template-columns: 1fr
    }
}

@media (max-width:700px) {

    .product {
        margin-top: 4px
    }

    /* la galleria tocca i bordi dello schermo */
    .gallery {
        margin: 0 -16px
    }

    /* a filo dello schermo il raggio non ha senso */
    .gallery__stage {
        border-radius: 0
    }

    .gallery__thumbs {
        padding: 0 16px
    }

    .gallery__thumbs button {
        width: 76px
    }

    .gallery__stage .discount-badge {
        font-size: 20px
    }

    .buy-box h1 {
        font-size: 34px
    }

    /* quattro colonne uguali: nessuna misura va a capo */
    .key-specs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }

    .key-specs li {
        padding: 10px 0 9px;
        margin: 0
    }

    .key-specs li+li {
        padding-left: 10px
    }

    .key-specs b {
        font-size: 23px
    }

    /* colonne strette: l'icona va sopra l'etichetta, accanto non ci sta */
    .key-specs small {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 12px;
        letter-spacing: .04em
    }

    .buy-box__price .price b {
        font-size: 52px
    }

    .buy-box__cta .add-to-cart .add-to-cart__label-long {
        display: inline
    }

    .buy-box__cta .add-to-cart .add-to-cart__label-short {
        display: none
    }

    .ask-call {
        align-items: flex-start
    }

    .ask-call b {
        display: block
    }

    .product-details {
        margin-top: 64px
    }

    .product-details~.section {
        margin-top: 36px
    }

    .spec-table dd b,
    .shipping-table td:last-child {
        font-size: 20px
    }

    .buy-bar__inner {
        gap: 12px;
        height: 68px
    }

    .buy-bar__name,
    .buy-bar__inner .price s {
        display: none
    }

    .buy-bar__inner .price {
        flex: 1
    }

    .buy-bar__inner .price b {
        font-size: 28px
    }

    .buy-bar__inner .add-to-cart {
        padding: 0 20px
    }

    .has-buy-bar .toast {
        bottom: 84px
    }
}
