/**
* Scheda prodotto - Restyling UX/CRO
* Intestazione, galleria, caratteristiche, sezioni di approfondimento e configuratore di prenotazione.
*/

.tl-product {
    padding: var(--tl-space-6) 0 60px;
    font-family: var(--tl-font-family);
    color: var(--tl-text);
}

/*--------------------------------------------------------------
# Intestazione
--------------------------------------------------------------*/
.tl-product__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tl-space-4);
    margin-bottom: var(--tl-space-4);
}

.tl-product__category {
    height: 32px;
    padding: 0 26px;
    font-size: var(--tl-fs-base);
}

.tl-product__title {
    margin: 0 0 var(--tl-space-3);
    font-family: var(--tl-font-family);
    font-size: var(--tl-fs-h3);
    line-height: var(--tl-lh-h3);
    font-weight: var(--tl-font-weight-medium);
    color: var(--tl-navy);
}

.tl-product__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--tl-space-2) var(--tl-space-5);
    margin-bottom: var(--tl-space-5);
    font-size: var(--tl-fs-base);
}

.tl-share {
    display: inline-flex;
    align-items: center;
    gap: var(--tl-space-2);
    padding: 0;
    border: 0;
    background: none;
    color: var(--tl-navy);
    font-size: var(--tl-fs-md);
    font-weight: var(--tl-font-weight-medium);
}

    .tl-share .bi {
        font-size: 22px;
    }

/* Su mobile il pulsante "Condividi" è un'icona tonda accanto alla categoria */
.tl-share--icon {
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tl-surface-alt);
}

    .tl-share--icon .bi {
        font-size: 16px;
    }

/*--------------------------------------------------------------
# Colonne: contenuto e configuratore
--------------------------------------------------------------*/
.tl-product__layout {
    display: grid;
    gap: var(--tl-space-5);
}

.tl-product__main {
    min-width: 0;
}

.tl-product__section {
    padding: var(--tl-space-5) 0;
    border-top: 1px solid var(--tl-border-muted);
}

.tl-product__section-title {
    margin: 0 0 var(--tl-space-3);
    font-family: var(--tl-font-family);
    font-size: var(--tl-fs-h3);
    line-height: var(--tl-lh-h3);
    font-weight: var(--tl-font-weight-medium);
    color: var(--tl-navy);
}

.tl-link {
    color: var(--tl-text);
    font-weight: var(--tl-font-weight-medium);
    text-decoration: underline;
}

/*--------------------------------------------------------------
# Galleria: su mobile scorre un'immagine alla volta,
# su desktop una grande e quattro piccole (le altre restano nel lightbox)
--------------------------------------------------------------*/
.tl-gallery {
    position: relative;
    margin: 0 calc(-1 * var(--tl-gutter-mobile)) var(--tl-space-4);
}

.tl-gallery__track {
    display: flex;
    gap: var(--tl-space-2);
    padding: 0 var(--tl-gutter-mobile);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

    .tl-gallery__track::-webkit-scrollbar {
        display: none;
    }

.tl-gallery__item {
    position: relative;
    flex: 0 0 100%;
    overflow: hidden;
    aspect-ratio: 352 / 260;
    border-radius: var(--tl-radius-md);
    scroll-snap-align: center;
}

    .tl-gallery__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .tl-gallery__item:hover img {
        transform: scale(1.03);
    }

.tl-gallery__more {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: var(--tl-text-inverse);
    font-size: var(--tl-fs-h3);
    font-weight: var(--tl-font-weight-medium);
}

.tl-gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--tl-border-strong);
    border-radius: 50%;
    background: var(--tl-surface);
    transform: translateY(-50%);
}

.tl-gallery__nav--prev {
    left: 4px;
}

.tl-gallery__nav--next {
    right: 4px;
}

/*--------------------------------------------------------------
# Descrizione e caratteristiche
--------------------------------------------------------------*/
.tl-product__description {
    margin-bottom: var(--tl-space-5);
    font-size: var(--tl-fs-md);
    line-height: 1.4;
}

    .tl-product__description .description-content > :last-child {
        margin-bottom: 0;
    }

/* Testo lungo: le prime righe e "Mostra" per il resto */
.description-collapse:not(.expanded):not(.no-clamp) .description-content {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.description-toggle {
    display: inline-block;
    margin-top: var(--tl-space-2);
    color: var(--tl-text);
    font-size: var(--tl-fs-base);
    font-weight: var(--tl-font-weight-medium);
    text-decoration: underline;
}

.no-clamp .description-toggle {
    display: none;
}

.tl-features {
    display: grid;
    gap: var(--tl-space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

    .tl-features li {
        display: flex;
        align-items: center;
        gap: var(--tl-space-4);
    }

.tl-features__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--tl-radius-card);
    background: var(--tl-surface-alt);
    font-size: 24px;
}

    .tl-features__icon svg {
        width: 24px;
        height: 24px;
    }

.tl-features strong {
    display: block;
    font-size: var(--tl-fs-md);
    line-height: var(--tl-lh-md);
    font-weight: var(--tl-font-weight-medium);
}

.tl-features small {
    font-size: var(--tl-fs-xs);
}

/*--------------------------------------------------------------
# Punto d'incontro, accordion delle informazioni
--------------------------------------------------------------*/
.tl-meeting {
    display: grid;
    gap: var(--tl-space-4);
}

    .tl-meeting iframe {
        width: 100%;
        height: 248px;
        border: 0;
        border-radius: var(--tl-radius-sm);
    }

.tl-accordion__item {
    border-bottom: 1px solid var(--tl-border-muted);
}

.tl-accordion__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tl-space-4);
    width: 100%;
    padding: 14px 10px;
    border: 0;
    background: none;
    color: var(--tl-navy);
    font-family: var(--tl-font-family);
    font-size: var(--tl-fs-lg);
    line-height: var(--tl-lh-lg);
    font-weight: var(--tl-font-weight-medium);
    text-align: left;
}

    .tl-accordion__button .bi {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--tl-surface-alt);
        font-size: 12px;
        color: var(--tl-text);
        transition: transform 0.2s ease;
    }

    .tl-accordion__button[aria-expanded="true"] .bi {
        transform: rotate(180deg);
    }

.tl-accordion__body {
    padding: 0 10px var(--tl-space-4);
    font-size: var(--tl-fs-base);
    line-height: 1.5;
}

.tl-included {
    display: grid;
    gap: var(--tl-space-4);
}

    .tl-included ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tl-included li {
        display: flex;
        gap: var(--tl-space-2);
        padding: 4px 0;
    }

    .tl-included .bi-check-lg {
        color: #008e70;
    }

    .tl-included .bi-x-lg {
        color: var(--tl-red);
    }

/*--------------------------------------------------------------
# "Come funziona", "Perché scegliere T-Light" e charity, correlati
--------------------------------------------------------------*/
.tl-steps {
    padding: var(--tl-space-6) 0;
    background: var(--tl-surface-subtle);
}

    .tl-steps .tl-product__section-title {
        margin-bottom: var(--tl-space-5);
    }

.tl-steps__list {
    display: grid;
    gap: var(--tl-space-5);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

    .tl-steps__list li {
        counter-increment: step;
    }

        .tl-steps__list li::before {
            content: counter(step);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            margin-bottom: var(--tl-space-4);
            border-radius: 50%;
            background: var(--tl-blue);
            color: var(--tl-text-inverse);
            font-size: var(--tl-fs-h3);
        }

    .tl-steps__list strong {
        display: block;
        font-size: var(--tl-fs-sm);
        font-weight: var(--tl-font-weight-medium);
    }

    .tl-steps__list p {
        margin: 2px 0 0;
        font-size: var(--tl-fs-xs);
        line-height: var(--tl-lh-xs);
    }

.tl-product__boxes {
    display: grid;
    gap: var(--tl-space-4);
    padding: var(--tl-space-6) 0;
}

.tl-charity img {
    max-width: 100%;
    margin-bottom: var(--tl-space-4);
}

.tl-charity__text {
    font-size: var(--tl-fs-sm);
    line-height: 1.4;
}

.tl-related {
    padding: var(--tl-space-5) 0 60px;
}

    .tl-related .tl-section-title {
        font-size: var(--tl-fs-lg);
    }

/*--------------------------------------------------------------
# Configuratore di prenotazione
--------------------------------------------------------------*/
.tl-booking {
    padding: 14px 12px;
    border: 1px solid var(--tl-border-muted);
    border-radius: var(--tl-radius-card);
    background: var(--tl-surface);
    font-family: var(--tl-font-family);
    color: var(--tl-text);
}

.tl-booking__from {
    margin: var(--tl-space-3) 0;
    font-size: var(--tl-fs-xs);
}

    .tl-booking__from strong {
        font-size: var(--tl-fs-md);
        font-weight: var(--tl-font-weight-medium);
    }

.tl-booking__steps {
    display: flex;
    flex-direction: column;
    gap: var(--tl-space-2);
}

/* Riga di un passo: Persone, Lingua, Data */
.tl-booking__toggle,
.tl-booking__field {
    display: flex;
    align-items: center;
    gap: var(--tl-space-4);
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 0 var(--tl-space-4);
    border: 0;
    border-radius: 6px;
    background: var(--tl-surface-alt);
    color: var(--tl-text);
    font-family: var(--tl-font-family);
    font-size: var(--tl-fs-base);
    text-align: left;
}

    .tl-booking__toggle > .bi:first-child,
    .tl-booking__field > .bi:first-child {
        font-size: 22px;
    }

    .tl-booking__toggle span {
        flex: 1;
    }

    .tl-booking__field select,
    .tl-booking__field input {
        flex: 1;
        min-width: 0;
        height: 46px;
        border: 0;
        background: none;
        color: inherit;
        font: inherit;
        outline: none;
    }

.tl-booking__chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.tl-booking__toggle[aria-expanded="true"] .tl-booking__chevron {
    transform: rotate(180deg);
}

/* Pannello aperto sotto la riga */
.tl-booking__panel {
    margin-top: var(--tl-space-2);
    padding: var(--tl-space-3);
    border-radius: 6px;
    background: var(--tl-surface);
    box-shadow: var(--tl-shadow-sm);
}

.tl-booking__option {
    display: flex;
    align-items: center;
    gap: var(--tl-space-3);
    padding: 6px 0;
    font-size: var(--tl-fs-base);
    cursor: pointer;
}

    .tl-booking__option input {
        accent-color: var(--tl-blue);
    }

    .tl-booking__option[hidden] {
        display: none;
    }

.tl-booking__loading {
    padding: var(--tl-space-3) 0;
    text-align: center;
}

.tl-booking__message {
    margin: var(--tl-space-2) 0 0;
    font-size: var(--tl-fs-sm);
    color: var(--tl-text-muted);
}

.tl-booking__message--error {
    color: var(--tl-red);
}

/* Partecipanti */
.tl-variant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tl-space-3);
    padding: 10px 0;
}

    .tl-variant + .tl-variant {
        border-top: 1px solid var(--tl-border-muted);
    }

.tl-variant__info strong {
    display: block;
    font-size: var(--tl-fs-base);
    font-weight: var(--tl-font-weight-medium);
}

.tl-variant__info small {
    display: block;
    font-size: var(--tl-fs-xs);
}

.tl-variant--choice {
    cursor: pointer;
}

    .tl-variant--choice input {
        accent-color: var(--tl-blue);
    }

.tl-variant__price {
    margin-left: auto;
    font-weight: var(--tl-font-weight-medium);
    white-space: nowrap;
}

.tl-stepper {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--tl-space-3);
}

.tl-stepper__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--tl-blue);
    border-radius: 50%;
    background: none;
    color: var(--tl-blue);
    font-size: 12px;
}

    .tl-stepper__button:disabled {
        border-color: var(--tl-border);
        color: var(--tl-border);
    }

.tl-stepper__value {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--tl-border-strong);
    background: var(--tl-surface);
    font-size: var(--tl-fs-base);
    text-align: center;
    -moz-appearance: textfield;
}

    .tl-stepper__value::-webkit-inner-spin-button,
    .tl-stepper__value::-webkit-outer-spin-button {
        margin: 0;
        -webkit-appearance: none;
    }

/* Orari */
.tl-booking__slots {
    margin-top: var(--tl-space-2);
    padding: var(--tl-space-4);
    border-radius: 6px;
    background: var(--tl-surface-alt);
}

.tl-booking__slots-title {
    margin: 0 0 var(--tl-space-2);
    font-size: var(--tl-fs-base);
    font-weight: var(--tl-font-weight-medium);
}

.tl-booking__slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: var(--tl-space-2);
}

.tl-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 6px;
    min-height: 36px;
    padding: 4px 6px;
    border: 1px solid var(--tl-border-strong);
    border-radius: var(--tl-radius-sm);
    background: var(--tl-surface);
    color: var(--tl-text);
}

.tl-slot__time {
    font-size: var(--tl-fs-base);
}

.tl-slot__price {
    padding-left: 6px;
    border-left: 1px dotted currentColor;
    font-size: var(--tl-fs-xxs);
}

.tl-slot__lang {
    flex-basis: 100%;
    font-size: var(--tl-fs-xxs);
    text-align: center;
}

.tl-slot.is-selected {
    border-color: var(--tl-blue);
    background: var(--tl-blue);
    color: var(--tl-text-inverse);
}

.tl-slot:disabled {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Totale, rassicurazioni */
.tl-booking__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: var(--tl-space-4) 0;
    font-size: var(--tl-fs-base);
    font-weight: var(--tl-font-weight-medium);
}

    .tl-booking__total strong {
        font-size: var(--tl-fs-lg);
        font-weight: var(--tl-font-weight-medium);
    }

.tl-booking__trust {
    margin: var(--tl-space-3) 0 0;
    font-size: var(--tl-fs-xxs);
    text-align: center;
}

.tl-booking .tl-pay {
    margin: var(--tl-space-2) 0 0;
}

/* Calendario in linea (flatpickr) con il prezzo minimo sotto ogni giorno disponibile */
.tl-booking .flatpickr-calendar.inline {
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
    font-family: var(--tl-font-family);
}

.tl-booking .flatpickr-innerContainer,
.tl-booking .flatpickr-rContainer,
.tl-booking .flatpickr-days,
.tl-booking .dayContainer {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.tl-booking .flatpickr-day {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    height: 46px;
    line-height: 1.1;
}

    .tl-booking .flatpickr-day.selected,
    .tl-booking .flatpickr-day.selected:hover {
        border-color: var(--tl-text);
        background: var(--tl-text);
    }

.tl-calendar-price {
    font-size: 9px;
    color: var(--tl-text-muted);
}

.flatpickr-day.selected .tl-calendar-price {
    color: var(--tl-text-inverse);
}

.flatpickr-day.flatpickr-disabled .tl-calendar-price {
    display: none;
}

/* Box "Un'esperienza tira l'altra" sotto il configuratore */
.tl-promo {
    margin-top: var(--tl-space-4);
    padding: 14px;
    border-radius: var(--tl-radius-card);
    background: var(--tl-surface-info);
    font-family: var(--tl-font-family);
}

    .tl-promo h2 {
        margin: 0 0 var(--tl-space-2);
        font-family: var(--tl-font-family);
        font-size: var(--tl-fs-md);
        font-weight: var(--tl-font-weight-medium);
        color: var(--tl-navy);
    }

    .tl-promo strong {
        display: block;
        font-size: var(--tl-fs-sm);
        font-weight: var(--tl-font-weight-medium);
    }

    .tl-promo p {
        margin: 4px 0 0;
        font-size: var(--tl-fs-xs);
    }

/* Barra in basso su mobile con prezzo e invito a prenotare */
.tl-product-bar__price {
    font-size: var(--tl-fs-xs);
}

    .tl-product-bar__price strong {
        font-size: var(--tl-fs-lg);
        font-weight: var(--tl-font-weight-medium);
    }

/*--------------------------------------------------------------
# Popup dopo l'aggiunta al carrello (_AddedToCartModal)
--------------------------------------------------------------*/
.tl-upsell .modal-dialog {
    max-width: 846px;
}

.tl-upsell .modal-content {
    border: 0;
    background: none;
    font-family: var(--tl-font-family);
}

.tl-upsell__confirm {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-bottom: var(--tl-space-4);
    padding: 0 48px;
    border-radius: var(--tl-radius-pill);
    background: var(--tl-surface-info);
    font-size: var(--tl-fs-md);
}

    .tl-upsell__confirm .bi-check-circle-fill {
        color: var(--tl-blue);
    }

.tl-upsell__close {
    position: absolute;
    right: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--tl-surface);
    color: var(--tl-text);
    font-size: 18px;
}

.tl-upsell__body {
    padding: var(--tl-space-6) var(--tl-space-4) var(--tl-space-5);
    border-radius: var(--tl-radius-card) var(--tl-radius-card) 0 0;
    background: var(--tl-surface);
    text-align: center;
}

.tl-upsell__title {
    margin: 0 0 var(--tl-space-3);
    font-family: var(--tl-font-family);
    font-size: var(--tl-fs-h1);
    line-height: 1.15;
    font-weight: var(--tl-font-weight-medium);
    color: var(--tl-navy);
}

.tl-upsell__subtitle {
    max-width: 680px;
    margin: 0 auto var(--tl-space-5);
    font-size: var(--tl-fs-md);
    line-height: 1.35;
}

.tl-upsell .tl-carousel {
    text-align: left;
}

.tl-upsell__actions {
    display: flex;
    flex-direction: column;
    gap: var(--tl-space-4);
    padding: var(--tl-space-4);
    border-top: 1px solid var(--tl-border);
    border-radius: 0 0 var(--tl-radius-card) var(--tl-radius-card);
    background: var(--tl-surface);
}

    .tl-upsell__actions .tl-btn {
        flex-shrink: 0;
        height: 52px;
        font-size: var(--tl-fs-md);
    }

    .tl-upsell__actions .tl-btn--outline {
        border: 2px solid var(--tl-blue-dark);
        color: var(--tl-blue-dark);
    }

@media (min-width: 768px) {
    .tl-upsell__title {
        font-size: var(--tl-fs-hero);
    }

    .tl-upsell__subtitle {
        font-size: var(--tl-fs-h3);
    }

    .tl-upsell__actions {
        flex-direction: row;
        padding: var(--tl-space-4) 120px;
    }

        .tl-upsell__actions .tl-btn {
            flex: 1;
        }

    /* Nel popup tre card per riga */
    .tl-upsell .tl-carousel__track {
        grid-auto-columns: calc((100% - 2 * var(--tl-space-4)) / 3);
    }

    .tl-gallery {
        margin: 0 0 var(--tl-space-5);
    }

    .tl-gallery__track {
        display: grid;
        grid-template-columns: 413fr 196fr 196fr;
        grid-template-rows: repeat(2, auto);
        gap: var(--tl-space-4);
        padding: 0;
        overflow: visible;
    }

    .tl-gallery__item {
        aspect-ratio: 1;
    }

        .tl-gallery__item:first-child {
            grid-row: span 2;
        }

        .tl-gallery__item:nth-child(n+6) {
            display: none;
        }

        .tl-gallery__item:nth-child(5) .tl-gallery__more {
            display: flex;
        }

    .tl-gallery__nav {
        display: none;
    }

    .tl-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .tl-meeting {
        grid-template-columns: 1fr 1fr;
    }

    .tl-included {
        grid-template-columns: 1fr 1fr;
    }

    .tl-steps__list {
        grid-template-columns: repeat(4, 1fr);
    }

    .tl-product__boxes {
        grid-template-columns: 1fr 1fr;
    }

    .tl-product__title {
        font-size: var(--tl-fs-h1);
        line-height: var(--tl-lh-h1);
    }
}

@media (min-width: 992px) {
    .tl-product__layout {
        grid-template-columns: minmax(0, 1fr) 352px;
        gap: 60px;
        align-items: start;
    }

    .tl-product__aside {
        position: sticky;
        top: var(--tl-space-4);
    }
}
