
/* 
    
    FOGLIO DI STILE CARRELLO SBSC

*/

/* Rimozione layout rigidi */
.woocommerce-cart-form table.shop_table {
    border: none !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 16px !important;
    width: 100% !important;
}

/* Nasconde la testata della tabella per un look pulito e focalizzato sulle card */
.woocommerce-cart-form table.shop_table thead {
    display: none !important;
}

/* TRASFORMAZIONE DELLA RIGA PRODOTTO IN CARD */
.woocommerce-cart-form table.shop_table tbody tr.cart_item {
    background: #ffffff !important;
    border: 3px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px !important;
    margin-bottom: 16px !important;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Effetto hover su desktop */
.woocommerce-cart-form table.shop_table tbody tr.cart_item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

/* Reset dei bordi delle celle interne */
.woocommerce-cart-form table.shop_table td {
    border: none !important;
    padding: 8px !important;
}

/* LA FOTO DEL PRODOTTO */
.woocommerce-cart-form table.shop_table td.product-thumbnail {
    padding-right: 16px !important;
}
.woocommerce-cart-form table.shop_table td.product-thumbnail img {
    max-width: 90px !important;
    height: auto !important;
    border-radius: 10px !important;
    object-fit: cover;
}

/* IL NOME DEL PRODOTTO */
.woocommerce-cart-form table.shop_table td.product-name {
    flex: 1 1 250px !important;
    display: block !important;
    width: 100% !important;
}
/* aggiunge automaticamente la scritta Prodotto: sopra il nome di ogni prodotto nel carrello */
.woocommerce-cart-form table.shop_table td.product-name::before {
    content: "Prodotto:" !important;
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-bottom: 5px !important;
}
.woocommerce-cart-form table.shop_table td.product-name a {
    display: block !important;
    font-weight: 600 !important;
    color: #e6007a !important;
    text-decoration: none !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}
.woocommerce-cart-form table.shop_table td.product-name a:hover {
    color: #c00065 !important;
}

/* PREZZI E QUANTITÀ */
.woocommerce-cart-form table.shop_table td.product-price,
.woocommerce-cart-form table.shop_table td.product-quantity,
.woocommerce-cart-form table.shop_table td.product-subtotal {
    font-size: 15px !important;
    color: #334155 !important;
}
.woocommerce-cart-form table.shop_table td.product-price {
    color: #64748b !important;
}
.woocommerce-cart-form table.shop_table td.product-subtotal {
    font-weight: 700 !important;
    color: #e6007a !important;
}

/* ETICHETTE PREZZO, QUANTITÀ E TOTALE */
.woocommerce-cart-form table.shop_table td.product-price::before {
    content: "Prezzo singolo: ";
    font-weight: 500;
    color: #64748b;
    font-size: 14px;
}
.woocommerce-cart-form table.shop_table td.product-quantity::before {
    content: "Quantità: ";
    font-weight: 500;
    color: #64748b;
    font-size: 14px;
}
.woocommerce-cart-form table.shop_table td.product-subtotal::before {
    content: "Totale prodotto: ";
    font-weight: 800;
    color: #64748b;
    font-size: 14px;
}

/* X DI RIMOZIONE ben visibile */
.woocommerce-cart-form table.shop_table td.product-remove {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    padding: 0 !important;
    z-index: 10;
}
.woocommerce-cart-form table.shop_table td.product-remove a.remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    background-color: #e6007a !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
}
/* Effetto hover sulla X */
.woocommerce-cart-form table.shop_table td.product-remove a.remove:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}


/* VERSIONE OTTIMIZZATA MOBILE */
@media (max-width: 1366px) {
    .woocommerce-cart-form table.shop_table tbody tr.cart_item {
        display: block !important;
        padding: 20px 16px 16px 16px !important;
        position: relative !important;
    }
    .woocommerce-cart-form table.shop_table td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 6px 0 !important;
        box-sizing: border-box;
    }
    /* Immagine prodotto */
    .woocommerce-cart-form table.shop_table td.product-thumbnail {
        text-align: left !important;
        margin-bottom: 8px;
    }
    .woocommerce-cart-form table.shop_table td.product-thumbnail img {
        max-width: 80px !important;
    }
    /* Quantità */
    .woocommerce-cart-form table.shop_table td.product-quantity::before {
        display: block;
        margin-bottom: 4px;
    }
    .woocommerce-cart-form table.shop_table td.product-quantity .quantity input {
        width: 70px !important;
        display: inline-block !important;
    }
    /* Pulsante X in alto a destra */
    .woocommerce-cart-form table.shop_table td.product-remove {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        display: block !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        z-index: 20 !important;
    }
    .woocommerce-cart-form table.shop_table td.product-remove a.remove {
        width: 32px !important;
        height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
        float: none !important;
    }
    .woocommerce-cart-form table.shop_table td.product-remove::before {
        content: none !important;
        display: none !important;
    }
    /* Nome prodotto su una riga separata */
    .woocommerce-cart-form table.shop_table tbody tr.cart_item td.product-name {
        display: block !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        text-align: left !important;
        white-space: normal !important;
    }
    .woocommerce-cart-form table.shop_table tbody tr.cart_item td.product-name::before {
        content: "Prodotto:" !important;
        display: block !important;
        width: 100% !important;
        margin-bottom: 5px !important;
        white-space: normal !important;
    }
    .woocommerce-cart-form table.shop_table tbody tr.cart_item td.product-name a {
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
}
