.ht-cross-sell {
    --ht-yellow: #f7c600;
    --ht-black: #151515;
    --ht-border: #e5e5e5;
    --ht-muted: #6f6f6f;

    /* Allineato alla larghezza del contenuto della scheda prodotto HappyTec. */
    width: calc(100% - 40px);
    max-width: 1040px;
    box-sizing: border-box;
    margin: 28px auto 34px;
    padding: 20px 24px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .04);
}

.ht-cross-sell__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 3px solid var(--ht-yellow);
}

.ht-cross-sell__head h2 {
    margin: 0;
    color: var(--ht-black);
    font-size: clamp(20px, 1.7vw, 26px);
    line-height: 1.15;
    font-weight: 800;
}

.ht-cross-sell__eyebrow {
    color: var(--ht-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.ht-cross-sell__list { margin-top: 5px; }

.ht-cross-sell__row {
    display: grid;
    grid-template-columns: 24px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    margin: 0;
    padding: 8px 4px;
    border-bottom: 1px solid var(--ht-border);
    cursor: pointer;
}

.ht-cross-sell__row.is-main {
    background: #fafafa;
    cursor: default;
}

.ht-cross-sell__check-wrap {
    display: flex;
    justify-content: center;
}

.ht-cross-sell__check {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--ht-yellow);
}

.ht-cross-sell__check:disabled { opacity: 1; }

.ht-cross-sell__image img {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.ht-cross-sell__content { min-width: 0; }

.ht-cross-sell__content small {
    display: block;
    margin-bottom: 3px;
    color: var(--ht-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ht-cross-sell__name {
    display: block;
    color: #222;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
}

.ht-cross-sell__price {
    min-width: 92px;
    text-align: right;
    color: var(--ht-black);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.ht-cross-sell__price del {
    display: block;
    color: #777;
    font-size: 12px;
    font-weight: 500;
}

.ht-cross-sell__price ins {
    color: #111;
    text-decoration: none;
}

.ht-cross-sell__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
}

.ht-cross-sell__total span,
.ht-cross-sell__total small { display: block; }

.ht-cross-sell__total span {
    color: var(--ht-muted);
    font-size: 12px;
}

.ht-cross-sell__total strong {
    display: block;
    margin: 1px 0;
    color: var(--ht-black);
    font-size: 21px;
    line-height: 1.15;
}

.ht-cross-sell__total small {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #4d4d4d;
    font-size: 12px;
    white-space: nowrap;
}

.ht-cross-sell__total small b,
.ht-cross-sell__total small .woocommerce-Price-amount,
.ht-cross-sell__total small .woocommerce-Price-amount bdi,
.ht-cross-sell__total small .woocommerce-Price-currencySymbol {
    display: inline !important;
    white-space: nowrap;
}

.ht-cross-sell .ht-cross-sell__button,
.ht-cross-sell .ht-cross-sell__button.button {
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    border-radius: 9px;
    background: var(--ht-yellow);
    color: #111;
    box-shadow: none;
    font-weight: 850;
    line-height: 1.2;
    text-transform: none;
}

.ht-cross-sell .ht-cross-sell__button:hover,
.ht-cross-sell .ht-cross-sell__button.button:hover {
    background: #111;
    color: #fff;
}

.ht-cross-sell .ht-cross-sell__button:disabled {
    opacity: .72;
    cursor: wait;
}

.ht-cross-sell .ht-cross-sell__button.is-success {
    background: #111;
    color: #fff;
}

.ht-cross-sell__message {
    min-height: 18px;
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
}

.ht-cross-sell__message a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 767px) {
    .ht-cross-sell {
        /* Margine reale su entrambi i lati: niente box incollato al bordo sinistro. */
        width: calc(100% - 24px);
        max-width: none;
        margin: 22px 12px 28px;
        padding: 16px 12px;
        border-radius: 12px;
    }

    .ht-cross-sell__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding-bottom: 11px;
    }

    .ht-cross-sell__head h2 {
        font-size: 20px;
    }

    .ht-cross-sell__eyebrow {
        font-size: 10px;
        white-space: normal;
    }

    .ht-cross-sell__row {
        grid-template-columns: 20px 50px minmax(0, 1fr);
        gap: 8px;
        min-height: 72px;
        padding: 9px 0;
    }

    .ht-cross-sell__check {
        width: 16px;
        height: 16px;
    }

    .ht-cross-sell__image img {
        width: 48px;
        height: 48px;
    }

    .ht-cross-sell__content small {
        font-size: 9px;
    }

    .ht-cross-sell__name {
        font-size: 13px;
        line-height: 1.28;
    }

    .ht-cross-sell__price {
        grid-column: 3;
        min-width: 0;
        margin-top: -4px;
        text-align: left;
        font-size: 13px;
    }

    .ht-cross-sell__price del {
        display: inline;
        margin-right: 4px;
        font-size: 11.5px;
    }

    .ht-cross-sell__footer {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding-top: 14px;
    }

    .ht-cross-sell__total strong {
        font-size: 20px;
    }

    .ht-cross-sell .ht-cross-sell__button,
    .ht-cross-sell .ht-cross-sell__button.button {
        width: 100%;
        min-height: 44px;
    }

    .ht-cross-sell__message {
        text-align: center;
    }
}

/* Cross-sell variabili: selezione inline, senza modali. */
.ht-cross-sell__variation-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.ht-cross-sell__variation-fields label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: var(--ht-muted);
    font-size: 11px;
    font-weight: 650;
}

.ht-cross-sell__variation-fields label > span {
    white-space: nowrap;
}

.ht-cross-sell__variation-select {
    max-width: 180px;
    min-height: 32px;
    padding: 4px 28px 4px 8px;
    border: 1px solid #cfcfcf;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font-size: 12px;
}

.ht-cross-sell__row.is-variable .ht-cross-sell__check:disabled {
    opacity: .38;
}

.ht-cross-sell__row.is-variable.has-valid-variation .ht-cross-sell__check:disabled {
    opacity: 1;
}

.ht-cross-sell__row.is-resolving {
    opacity: .72;
}

.ht-cross-sell__price-note,
.ht-cross-sell__variation-message {
    display: block;
    margin-top: 4px;
    color: var(--ht-muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
}

.ht-cross-sell__variation-message:not(:empty) {
    color: #8a5a00;
}

.ht-cross-sell__choose-price {
    color: var(--ht-muted);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 767px) {
    .ht-cross-sell__variation-fields {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .ht-cross-sell__variation-fields label {
        justify-content: space-between;
        gap: 8px;
    }

    .ht-cross-sell__variation-select {
        width: min(170px, 62vw);
        max-width: 100%;
    }
}
.ht-cross-sell__content .ht-cross-sell__price-note,
.ht-cross-sell__content .ht-cross-sell__variation-message {
    text-transform: none;
    letter-spacing: 0;
}

.ht-cross-sell__saving[hidden] {
    display: none !important;
}

/* Stato commerciale dei prodotti consigliati */
.ht-cross-sell__status{
    display:inline-flex;
    align-items:center;
    width:max-content;
    margin:5px 0 1px;
    padding:3px 7px;
    border-radius:999px;
    font-size:10px;
    line-height:1.2;
    font-weight:850;
    letter-spacing:.02em;
}
.ht-cross-sell__status[hidden]{display:none!important}
.ht-cross-sell__status--preorder{
    border:1px solid #e0b500;
    background:#fff8d6;
    color:#5c4a00;
}
