/* ==========================================================================
   PHOENIX SPORTS - STILE CARRELLO MINIMALE (STYLE EKOÏ)
   ========================================================================== */

/* Sfondo di pagina e reset card */
.page-template-page-cart-custom {
    background-color: #f4f4f4 !important;
}

.page-template-page-cart-custom .card {
    background: #ffffff !important;
    border-radius: 0px !important; /* Design squadrato come da screen */
    box-shadow: none !important; /* Rimuove le ombre di bootstrap */
}

/* Titoli in maiuscolo e minimali */
.page-template-page-cart-custom h1, 
.page-template-page-cart-custom h2, 
.page-template-page-cart-custom h3 {
    font-family: 'Montserrat', sans-serif;
    color: #333333;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- TABELLA PRODOTTI CARRELLO (woocommerce_cart) --- */
.woocommerce table.shop_table {
    border: none !important;
    border-radius: 0px !important;
}

/* Riga del singolo prodotto */
.woocommerce table.shop_table tr.cart_item {
    background: #ffffff !important;
    border-bottom: 10px solid #f4f4f4 !important; /* Spaziatore tra i prodotti */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Nascondi intestazioni tabella standard per un look moderno */
.woocommerce table.shop_table thead {
    display: none !important;
}

/* Rigenerazione celle in flexbox per allineamento come da screenshot */
.woocommerce table.shop_table td {
    border: none !important;
    padding: 0px !important;
}

/* Immagine Prodotto */
.woocommerce table.shop_table td.product-thumbnail {
    width: 100px;
    max-width: 100px;
    margin-right: 25px;
}
.woocommerce table.shop_table td.product-thumbnail img {
    width: 100% !important;
    height: auto !important;
}

/* Nome Prodotto e variazioni (Taglia) */
.woocommerce table.shop_table td.product-name {
    flex: 1;
    text-align: left;
}
.woocommerce table.shop_table td.product-name a {
    color: #000000 !important;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}
.woocommerce table.shop_table td.product-name .variation {
    margin-top: 5px;
    color: #666666;
    font-size: 0.9rem;
}
.woocommerce table.shop_table td.product-name .variation dt {
    font-weight: normal;
    display: inline;
}
.woocommerce table.shop_table td.product-name .variation dd {
    display: inline;
    margin-right: 10px;
}

/* Prezzi nel carrello */
.woocommerce table.shop_table td.product-price,
.woocommerce table.shop_table td.product-subtotal {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    text-align: right;
    margin-left: auto;
    padding-right: 15px !important;
}

/* Prezzo barrato (Sconti) */
.woocommerce table.shop_table del,
.cart-subtotal del {
    color: #999999 !important;
    font-weight: normal;
    font-size: 0.95rem;
    margin-right: 8px;
    text-decoration: line-through;
}

/* Quantità e Bottone Rimuovi posizionati a destra */
.woocommerce table.shop_table td.product-quantity {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 90px;
}

/* Input Quantità Minimale */
.woocommerce .quantity .qty {
    width: 65px !important;
    height: 38px;
    padding: 0 5px !important;
    text-align: center;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    font-size: 0.95rem;
    border-radius: 0px !important;
}

/* Tasto Elimina sotto la quantità */
.woocommerce table.shop_table td.product-remove {
    position: absolute;
    bottom: 15px;
    right: 20px;
}
.woocommerce table.shop_table td.product-remove a.remove {
    font-size: 0.85rem !important;
    color: #666666 !important;
    text-decoration: underline !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    text-transform: capitalize;
}
.woocommerce table.shop_table td.product-remove a.remove:hover {
    color: #000000 !important;
}
/* Nascondi la "X" rossa nativa di WC per scrivere "Elimina" via CSS se necessario, 
   o lascialo gestire al testo pulito */
.woocommerce table.shop_table td.product-remove a.remove::before {
    content: "Elimina" !important;
    font-size: 0.85rem;
}


/* --- RIEPILOGO TOTALE (DESTRA) --- */
.cart_totals {
    width: 100% !important;
    float: none !important;
    text-align: left;
}

.cart_totals table {
    margin-bottom: 20px !important;
    border-collapse: collapse;
}

.cart_totals table tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

/* Linea tratteggiata di separazione */
.cart_totals table tr.cart-subtotal {
    border-bottom: 1px dashed #cccccc !important;
}

.cart_totals table td, 
.cart_totals table th {
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.cart_totals .order-total {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Testo Risparmio in Verde */
.woocommerce-mr-discount, 
.text-risparmio-green {
    color: #2e7d32 !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
    display: block;
}

/* Link Codice Promozionale */
.woocommerce-clickable-coupon-toggle {
    color: #1565c0 !important;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    text-align: center;
    margin: 20px 0;
}
.woocommerce-clickable-coupon-toggle:hover {
    text-decoration: underline;
}

/* BOTTONE PROCEDI / CONFERMA IL CARRELLO (VERDE EKOÏ) */
.woocommerce .cart_totals .wc-proceed-to-checkout a.checkout-button {
    background-color: #2e7d32 !important; /* Verde scuro sportivo dello screenshot */
    color: #ffffff !important;
    border-radius: 0px !important; /* Rigorosamente squadrato */
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: block;
    width: 100%;
    border: none !important;
    transition: background 0.2s ease-in-out;
}

.woocommerce .cart_totals .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #1b5e20 !important; /* Variante hover più scura */
}

/* Nascondi azioni inutili come "Aggiorna Carrello" se distorcono il layout minimale */
button[name="update_cart"] {
    display: none !important; /* Spesso si preferisce aggiornare via Ajax o con un mini-link */
}
