/* woocommerce-dark.css - VERSIONE NUCLEAR PER PULSANTI */

/* --- Generali --- */
.woocommerce, .woocommerce-page { color: #e2e8f0; }
.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce h4 { color: #fff; font-weight: 700; }
.woocommerce a { color: #ffffff!important; transition: color 0.2s; }
.woocommerce a:hover { color: #d8b4fe; }

/* --- Tabella Carrello --- */
.woocommerce table.shop_table {
    border: 1px solid #334155;
    border-radius: 1rem;
    border-collapse: separate;
    border-spacing: 0;
    background-color: rgba(15, 23, 42, 0.5);
    overflow: hidden;
}

.woocommerce table.shop_table th {
    background-color: #1e293b;
    color: #fff;
    padding: 1.2rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #334155;
}

.woocommerce table.shop_table td {
    border-top: 1px solid #334155;
    padding: 1.2rem;
    color: #cbd5e1;
    vertical-align: middle;
}

/* Rimuovi */
.woocommerce a.remove {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    text-decoration: none !important;
}
.woocommerce a.remove:hover {
    background: #ef4444;
    color: white !important;
}

/* --- Box Totali Carrello --- */
.cart-collaterals .cart_totals {
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 2rem;
    width: 100% !important;
}

.cart-collaterals .cart_totals h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    color: white;
}

.cart-collaterals .cart_totals table.shop_table {
    border: none;
    background: transparent;
    width: 100%;
}

.cart-collaterals .cart_totals table.shop_table th,
.cart-collaterals .cart_totals table.shop_table td {
    border-bottom: 1px solid #334155;
    background: transparent;
    padding: 1rem 0;
}
.cart-collaterals .cart_totals table.shop_table tr:last-child th,
.cart-collaterals .cart_totals table.shop_table tr:last-child td {
    border-bottom: none;
}

/* --- Input Quantità e Testo --- */
.woocommerce .quantity .qty,
.woocommerce-cart .coupon input.input-text,
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    background-color: #0f172a !important;
    color: white !important;
    border: 1px solid #334155 !important;
    border-radius: 0.5rem !important;
    padding: 0.7rem !important;
}

/* --- SELETTORI PULSANTI ULTRA-SPECIFICI --- */
/* Uso "body .woocommerce" per vincere sulla specificità del tema */

/* 1. GRUPPO MASTER: Tutti i pulsanti di azione primaria (Cart, Checkout, Product, Update) */
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order,
body.woocommerce-checkout button#place_order,
body.woocommerce .single_add_to_cart_button,
body.woocommerce button.button.alt,
body.woocommerce button[name="update_cart"], /* Fix: Pulsante Aggiorna Carrello */
body.woocommerce .coupon button[name="apply_coupon"] /* Fix: Pulsante Coupon */
{
    background-image: linear-gradient(to right, #9333ea, #2563eb) !important; /* Uniformato al Viola */
    background-color: #9333ea !important;
    color: #ffffff !important;
    display: inline-block !important; /* Fix: inline-block è più sicuro per update cart */
    padding: 15px 24px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 0.75rem !important;
    border: none !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 2. Specificità per il pulsante Checkout (Renderlo più grande/evidente) */
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order {
    display: block !important;
    width: 100% !important;
    padding: 18px 20px !important;
    font-size: 1.25rem !important;
    margin-top: 20px !important;
}

/* 3. HOVER EFFECTS UNIFICATI */
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-checkout #place_order:hover,
body.woocommerce .single_add_to_cart_button:hover,
body.woocommerce button.button.alt:hover,
body.woocommerce button[name="update_cart"]:hover,
body.woocommerce .coupon button[name="apply_coupon"]:hover
{
    background-image: linear-gradient(to right, #a855f7, #3b82f6) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px -5px rgba(147, 51, 234, 0.4) !important;
    color: #ffffff !important;
}

/* 4. Fix specifici per l'allineamento nella pagina Carrello */
.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
    display: block;
    padding: 0;
}

/* Fix per allineare il pulsante coupon e l'input sulla stessa riga */
.woocommerce-cart .coupon {
    display: flex !important;
    align-items: stretch !important; /* Assicura stessa altezza */
    gap: 10px !important;
}

.woocommerce-cart .coupon .input-text {
    margin: 0 !important; /* Rimuove margini che sfasano l'altezza */
    width: auto !important;
    flex-grow: 1;
}

.woocommerce-cart .coupon button {
    float: none !important;
    width: auto !important;
}

/* Messaggi */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    background-color: rgba(30, 41, 59, 0.9);
    color: white;
    border-top: 3px solid #a855f7;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem !important;
}
.woocommerce-error { border-top-color: #ef4444; }

/* Select2 Dropdown */
.select2-container--default .select2-selection--single {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    height: 40px !important;
    border-radius: 0.5rem !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: white !important;
    line-height: 40px !important;
}

/* Nascondere i componenti nel "Mini Cart" per i Bundle*/
tr.cart_item.bundled-item td.product-name:before {
    content: "↳ Incluso: ";
    font-size: 0.9em;
    opacity: 0.7;
}