/* =========================================================
   PAGINA CARRELLO - RESTYLING 0971 PUBBLICITÀ
   File: cart.css
   Versione pulita e corretta
   ========================================================= */

:root {
    --nb-orange: #f47721;
    --nb-orange-dark: #d95c08;
    --nb-blue: #2454a6;
    --nb-dark: #171717;
    --nb-muted: #777777;
    --nb-border: #ececf1;
    --nb-bg: #f7f8fb;
    --nb-white: #ffffff;
}

/* =========================================================
   STRUTTURA PAGINA
   ========================================================= */

body.woocommerce-cart .page-area {
    padding-top: 70px !important;
    padding-bottom: 90px !important;
    background: var(--nb-bg) !important;
}

body.woocommerce-cart .chy-container-1,
body.woocommerce-cart .container {
    max-width: 1440px !important;
}

body.woocommerce-cart .tx-page-content > .fix,
body.woocommerce-cart .woocommerce {
    width: 100% !important;
}

body.woocommerce-cart *,
body.woocommerce-cart *::before,
body.woocommerce-cart *::after {
    box-sizing: border-box !important;
}

/* =========================================================
   TABELLA CARRELLO
   ========================================================= */

body.woocommerce-cart table.shop_table.cart {
    width: 100% !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
    background: transparent !important;
    margin-bottom: 34px !important;
}

/* Header tabella */
body.woocommerce-cart table.shop_table.cart thead tr {
    background: var(--nb-dark) !important;
    border-radius: 18px !important;
}

body.woocommerce-cart table.shop_table.cart thead th {
    padding: 18px 16px !important;
    background: var(--nb-dark) !important;
    color: #ffffff !important;
    border: 0 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table.cart thead th:first-child {
    border-radius: 18px 0 0 18px !important;
}

body.woocommerce-cart table.shop_table.cart thead th:last-child {
    border-radius: 0 18px 18px 0 !important;
}

/* Riga prodotto */
body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
    background: #ffffff !important;
    border-radius: 22px !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s ease !important;
    isolation: isolate !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.09) !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item td {
    padding: 22px 16px !important;
    border: 0 !important;
    background: #ffffff !important;
    vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item td:first-child {
    border-radius: 22px 0 0 22px !important;
    overflow: hidden !important;
}

body.woocommerce-cart table.shop_table.cart tbody tr.cart_item td:last-child {
    border-radius: 0 22px 22px 0 !important;
    overflow: hidden !important;
}

/* =========================================================
   RIMUOVI PRODOTTO
   ========================================================= */

body.woocommerce-cart table.shop_table.cart .product-remove {
    width: 54px !important;
    text-align: center !important;
}

body.woocommerce-cart table.shop_table.cart .product-remove a.remove {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 999px !important;
    background: #fff0f0 !important;
    color: #d93030 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-cart table.shop_table.cart .product-remove a.remove:hover {
    background: #d93030 !important;
    color: #ffffff !important;
}

/* =========================================================
   IMMAGINE PRODOTTO
   ========================================================= */

body.woocommerce-cart table.shop_table.cart .product-thumbnail {
    width: 105px !important;
}

body.woocommerce-cart table.shop_table.cart .product-thumbnail img {
    display: block !important;
    width: 86px !important;
    height: 86px !important;
    object-fit: cover !important;
    border-radius: 18px !important;
    background: #f5f5f7 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

/* =========================================================
   NOME PRODOTTO + VARIANTI
   ========================================================= */

body.woocommerce-cart table.shop_table.cart .product-name {
    min-width: 280px !important;
}

body.woocommerce-cart table.shop_table.cart .product-name > a {
    display: inline-block !important;
    color: var(--nb-dark) !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    margin-bottom: 10px !important;
}

body.woocommerce-cart table.shop_table.cart .product-name > a:hover {
    color: var(--nb-orange) !important;
}

/* Varianti prodotto */
body.woocommerce-cart table.shop_table.cart .variation {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin: 8px 0 0 !important;
}

body.woocommerce-cart table.shop_table.cart .variation dt,
body.woocommerce-cart table.shop_table.cart .variation dd {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-cart table.shop_table.cart .variation dt {
    display: none !important;
}

body.woocommerce-cart table.shop_table.cart .variation dd {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 10px !important;
    background: #f4f5f8 !important;
    color: #333333 !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
}

body.woocommerce-cart table.shop_table.cart .variation dd p {
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================================
   PREZZI
   ========================================================= */

body.woocommerce-cart table.shop_table.cart .product-price,
body.woocommerce-cart table.shop_table.cart .product-subtotal {
    white-space: nowrap !important;
}

body.woocommerce-cart table.shop_table.cart .product-price .amount {
    color: #333333 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

body.woocommerce-cart table.shop_table.cart .product-subtotal .amount {
    color: var(--nb-dark) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
}

/* =========================================================
   QUANTITÀ
   ========================================================= */

body.woocommerce-cart table.shop_table.cart .product-quantity {
    width: 160px !important;
    min-width: 160px !important;
}

body.woocommerce-cart table.shop_table.cart .quantity {
    margin: 0 !important;
}

body.woocommerce-cart table.shop_table.cart .bootstrap-touchspin {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 130px !important;
    min-width: 130px !important;
    height: 44px !important;
    background: #f5f5f7 !important;
    border: 1px solid var(--nb-border) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}

body.woocommerce-cart table.shop_table.cart .bootstrap-touchspin .btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--nb-dark) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

body.woocommerce-cart table.shop_table.cart .bootstrap-touchspin .btn:hover {
    color: var(--nb-orange) !important;
}

body.woocommerce-cart table.shop_table.cart input.qty {
    width: 48px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--nb-dark) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-align: center !important;
    box-shadow: none !important;
}

/* =========================================================
   BOTTONI GLOBALI CARRELLO
   ========================================================= */

body.woocommerce-cart button.button,
body.woocommerce-cart a.button,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    min-height: 50px !important;
    padding: 0 24px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--nb-orange) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(244, 119, 33, 0.28) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

body.woocommerce-cart button.button:hover,
body.woocommerce-cart a.button:hover,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: var(--nb-orange-dark) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* =========================================================
   RIGA COUPON / AGGIORNA CARRELLO - DESKTOP CORRETTA
   ========================================================= */

body.woocommerce-cart table.shop_table.cart td.actions {
    display: table-cell !important;
    width: 100% !important;
    padding: 24px 0 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-align: initial !important;
    vertical-align: middle !important;
}

body.woocommerce-cart table.shop_table.cart td.actions::after {
    content: "" !important;
    display: block !important;
    clear: both !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon {
    float: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: auto !important;
    max-width: calc(100% - 220px) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon label {
    display: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text,
body.woocommerce-cart table.shop_table.cart td.actions #coupon_code {
    display: block !important;
    width: 260px !important;
    max-width: 260px !important;
    min-width: 260px !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 1px solid var(--nb-border) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--nb-dark) !important;
    font-size: 14px !important;
    line-height: 50px !important;
    outline: none !important;
    box-shadow: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text:focus,
body.woocommerce-cart table.shop_table.cart td.actions #coupon_code:focus {
    border-color: var(--nb-orange) !important;
}

body.woocommerce-cart table.shop_table.cart td.actions .coupon button.button {
    float: none !important;
    position: static !important;
    width: auto !important;
    min-width: 150px !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 22px !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
    float: right !important;
    position: static !important;
    width: auto !important;
    min-width: 170px !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    background: var(--nb-dark) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:hover {
    background: #333333 !important;
    color: #ffffff !important;
}

body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"]:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* =========================================================
   TOTALI CARRELLO
   ========================================================= */

body.woocommerce-cart .cart-collaterals {
    margin-top: 34px !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
    width: 420px !important;
    max-width: 100% !important;
    float: right !important;
    background: #ffffff !important;
    border: 1px solid var(--nb-border) !important;
    border-radius: 26px !important;
    padding: 28px !important;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.08) !important;
}

body.woocommerce-cart .cart_totals h2 {
    margin: 0 0 20px !important;
    color: var(--nb-dark) !important;
    font-size: 26px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
    letter-spacing: -0.035em !important;
}

body.woocommerce-cart .cart_totals table.shop_table {
    border: 0 !important;
    margin: 0 0 22px !important;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
    padding: 14px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--nb-border) !important;
    background: transparent !important;
    color: var(--nb-dark) !important;
    font-size: 15px !important;
}

body.woocommerce-cart .cart_totals table.shop_table th {
    font-weight: 700 !important;
}

body.woocommerce-cart .cart_totals table.shop_table td {
    text-align: right !important;
    font-weight: 800 !important;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
    border-bottom: 0 !important;
    padding-top: 18px !important;
}

body.woocommerce-cart .cart_totals .order-total .amount {
    color: var(--nb-orange) !important;
    font-size: 28px !important;
    font-weight: 900 !important;
}

/* Pulsante checkout */
body.woocommerce-cart .wc-proceed-to-checkout {
    padding: 0 !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    width: 100% !important;
    min-height: 58px !important;
    font-size: 16px !important;
}

/* =========================================================
   MOBILE - CARD PRODOTTO
   ========================================================= */

@media (max-width: 767px) {
    body.woocommerce-cart .page-area {
        padding-top: 42px !important;
        padding-bottom: 60px !important;
    }

    body.woocommerce-cart table.shop_table.cart {
        display: block !important;
        border-spacing: 0 !important;
        margin-bottom: 24px !important;
    }

    body.woocommerce-cart table.shop_table.cart thead {
        display: none !important;
    }

    body.woocommerce-cart table.shop_table.cart tbody,
    body.woocommerce-cart table.shop_table.cart tr,
    body.woocommerce-cart table.shop_table.cart td {
        display: block !important;
        width: 100% !important;
    }

    body.woocommerce-cart table.shop_table.cart tbody tr.cart_item {
        position: relative !important;
        margin-bottom: 18px !important;
        padding: 18px !important;
        border-radius: 22px !important;
        background: #ffffff !important;
        box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08) !important;
    }

    body.woocommerce-cart table.shop_table.cart tbody tr.cart_item:hover {
        transform: none !important;
    }

    body.woocommerce-cart table.shop_table.cart tbody tr.cart_item td {
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-remove {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        width: auto !important;
        z-index: 3 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-thumbnail {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 14px !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-thumbnail img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: 230px !important;
        object-fit: cover !important;
        border-radius: 18px !important;
        margin: 0 auto !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-name {
        min-width: 0 !important;
        margin-bottom: 16px !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-name > a {
        font-size: 17px !important;
        margin-bottom: 10px !important;
        padding-right: 42px !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-price,
    body.woocommerce-cart table.shop_table.cart .product-quantity,
    body.woocommerce-cart table.shop_table.cart .product-subtotal {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 16px !important;
        width: 100% !important;
        padding: 12px 0 !important;
        border-top: 1px solid var(--nb-border) !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-quantity .bootstrap-touchspin {
        width: 130px !important;
        min-width: 130px !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-quantity .quantity {
        flex-shrink: 0 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-price::before {
        content: "Prezzo" !important;
        color: var(--nb-muted) !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-quantity::before {
        content: "Quantità" !important;
        color: var(--nb-muted) !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-subtotal::before {
        content: "Totale" !important;
        color: var(--nb-muted) !important;
        font-size: 13px !important;
        font-weight: 700 !important;
    }

    body.woocommerce-cart table.shop_table.cart .product-subtotal .amount {
        font-size: 20px !important;
        color: var(--nb-orange) !important;
    }

    /* Riga coupon mobile */
    body.woocommerce-cart table.shop_table.cart td.actions {
        display: block !important;
        width: 100% !important;
        padding-top: 14px !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions .coupon {
        float: none !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 12px !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions .coupon input.input-text,
    body.woocommerce-cart table.shop_table.cart td.actions #coupon_code,
    body.woocommerce-cart table.shop_table.cart td.actions .coupon button.button,
    body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    body.woocommerce-cart table.shop_table.cart td.actions button[name="update_cart"] {
        margin-top: 0 !important;
    }

    body.woocommerce-cart .cart-collaterals .cart_totals {
        float: none !important;
        width: 100% !important;
        padding: 22px !important;
        border-radius: 22px !important;
    }

    body.woocommerce-cart .cart_totals h2 {
        font-size: 24px !important;
    }
}