/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* PERSONALIZZAZIONE SIDEBAR PRODOTTI */
/* 1. Rimuove il rientro (padding) e i puntini dalle macrocategorie */
.wc-block-product-categories-list {
    padding-left: 0 !important;
    list-style-type: none !important;
	margin-bottom: 10px !important;
}

/* 2. Rende le macrocategorie in grassetto (bold) */
.wc-block-product-categories-list-item > a {
    font-weight: bold !important;
    text-decoration: none;
}

/* 3. Gestione sottocategorie: ripristina il puntino vuoto e il rientro */
.wc-block-product-categories-list-item .wc-block-product-categories-list {
    padding-left: 20px !important; /* Sposta a destra solo le sottocategorie */
    list-style-type: circle !important; /* Mantiene il puntino vuoto (stroke) */
    margin-top: 5px;
}

/* Rimuove il grassetto dalle sottocategorie (se ereditato) */
.wc-block-product-categories-list-item .wc-block-product-categories-list-item > a {
    font-weight: normal !important;
}

/* PERSONALIZZAZIONE PAGINA RIEPILOGO ORDINE */
/* 1. Nasconde i totali e il titolo interno */
.cart-collaterals .cart_totals h2, 
.cart-collaterals .shop_table_responsive,
.e-cart-totals .e-cart-section-title {
    display: none !important;
}

/* 2. Rimuove bordi, sfondi e ombre dai contenitori di Elementor e WooCommerce */
.cart-collaterals .cart_totals,
.e-cart-totals.e-cart-section,
.e-cart-column-inner {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    outline: none !important;
}

/* 3. Rende il bottone full-width e rimuove i padding del suo contenitore */
.wc-proceed-to-checkout {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.wc-proceed-to-checkout a.checkout-button {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
    margin: 0 !important;
    border-radius: 8px !important; /* Opzionale: per arrotondare gli angoli del bottone */
}

/* 4. Rimuove lo spazio bianco eccessivo tra la tabella prodotti e il bottone */
.e-cart-container {
    gap: 10px !important; /* Riduce lo spazio tra le colonne se necessario */
}

.cart-collaterals {
    margin-top: 10px !important;
}

/* Pagina checkout spazio tra le voci prodotto */
td.product-name {
	padding-top: 5px !important;
	padding-bottom: 10px !important;
}

th.product-name {
	padding-bottom: 10px !important;
}

/* Pagina checkout spazio privacy */
.woocommerce-privacy-policy-text p {
	margin-bottom: 20px !important;
}

/* --- IMMAGINI PAGINA RIEPILOGO (CARRELLO) --- */
/* Forza l'ingrandimento solo nella pagina carrello */
.woocommerce-cart table.cart .product-thumbnail {
    width: 100px !important;
    min-width: 100px !important;
    display: table-cell !important;
}

.woocommerce-cart table.cart .product-thumbnail img {
    width: 100px !important;
    height: auto !important;
    max-width: 100px !important;
    border-radius: 8px;
}

/* --- IMMAGINI CARRELLO LATERALE (SIDE CART) --- */
/* Ridimensiona le immagini nel carrello a comparsa di Elementor */
.elementor-menu-cart__main-container .elementor-menu-cart__product-image,
.elementor-menu-cart__main-container .elementor-menu-cart__product-image img,
.elementor-menu-cart__container .product-thumbnail img {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    object-fit: cover !important;
}

/* Fix per evitare che il contenitore dell'immagine nel mini-cart si allarghi */
.elementor-menu-cart__product-image {
    width: 50px !important;
    flex-basis: 50px !important;
    min-width: 50px !important;
}

/* Padding riepilogo ordine */
.woocommerce-cart table.cart td {
	padding-inline: 0 40px !important;
}

/* --- RESET DEFINITIVO ALLINEAMENTO SINISTRA MOBILE --- */
@media (max-width: 767px) {
    /* 1. Forza tutte le celle a occupare il 100% e allinearsi a sinistra */
    .woocommerce-cart table.cart td {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        float: none !important;
        clear: both !important;
    }

    /* 2. Rimuove le etichette (Prodotto:, Quantità:, ecc.) */
    .woocommerce-cart table.cart td::before {
        display: none !important;
        content: none !important;
    }

    /* 3. Immagine: Allineamento a sinistra */
    .woocommerce-cart table.cart .product-thumbnail img {
        margin-left: 0 !important;
        margin-right: auto !important;
        display: block !important;
    }

    /* 4. Nome Prodotto: Allineamento a sinistra */
    .woocommerce-cart table.cart .product-name,
    .woocommerce-cart table.cart .product-name a {
        text-align: left !important;
        display: block !important;
        width: 100% !important;
    }

    /* 5. Quantità: Rimuove ogni spinta verso destra */
    .woocommerce-cart table.cart .product-quantity {
        text-align: left !important;
    }

    .woocommerce-cart table.cart .product-quantity .quantity {
        margin-left: 0 !important; /* Rimuove lo spostamento a destra */
        margin-right: auto !important;
        display: inline-block !important; /* Mantiene il box piccolo ma a sinistra */
    }

    /* Input numerico effettivo */
    .woocommerce-cart table.cart .product-quantity input.qty {
        margin-left: 0 !important;
        text-align: left !important;
    }

    /* 6. Spostamento 'X' di rimozione in alto a destra per pulizia layout */
    .woocommerce-cart table.cart .product-remove {
        position: absolute !important;
        top: 10px;
        right: 0;
        width: auto !important;
        text-align: right !important;
    }

    /* Struttura della riga */
    .woocommerce-cart table.cart tr.cart_item {
        display: block !important;
        position: relative !important;
        padding: 20px 0 !important;
    }
}



/* --- 1. PULIZIA GENERALE (CARRELLO E MINI-CART) --- */
.product-price, .product-subtotal, th.product-price, th.product-subtotal,
.cart-subtotal, .order-total, .elementor-menu-cart__product-price, 
.elementor-menu-cart__subtotal, .amount, .woocommerce-Price-amount {
    display: none !important;
}

/* --- 2. RIEPILOGO CHECKOUT (LA COLONNA "IL TUO ORDINE") --- */
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table .cart-subtotal,
.woocommerce-checkout-review-order-table .order-total,
.woocommerce-checkout-review-order-table th.product-total,
.e-checkout-order-review .product-total,
.e-checkout-order-review .order-total,
.e-checkout-order-review .cart-subtotal {
    display: none !important;
}

/* --- 3. PAGINA FINALE "ORDINE RICEVUTO" (THANK YOU PAGE) --- */
/* Nasconde la tabella dei totali in basso */
.woocommerce-order-received .shop_table.order_details tfoot,
.woocommerce-order-received .shop_table.order_details .product-total,
.woocommerce-order-received .woocommerce-table__product-total,
.woocommerce-order-received th.woocommerce-table__product-total {
    display: none !important;
}

/* Nasconde il riepilogo "Totale" nella riga orizzontale sotto il titolo */
.woocommerce-order-overview .woocommerce-order-overview__total,
.woocommerce-order-overview .total,
.woocommerce-order-overview li:last-child {
    display: none !important;
}

/* Rimuove i bordi delle celle rimaste vuote per pulizia estetica */
.woocommerce-table__product-name.product-name {
    border-right: none !important;
}

/* --- UNIFORMARE COLORI ICONE E LINK NEI MESSAGGI --- */

/* 1. Cambia il colore di tutte le icone (i simboli a sinistra) */
.woocommerce-info::before, 
.woocommerce-message::before, 
.woocommerce-error::before {
    color: #729D39 !important; /* Inserisci qui il tuo VERDE */
}

/* 2. Cambia il colore della linea di bordo superiore (spesso azzurra o rosa) */
.woocommerce-info, 
.woocommerce-message, 
.woocommerce-error {
    border-top-color: #729D39 !important; /* Inserisci qui il tuo VERDE */
}

/* 3. Cambia il colore dei link e dei bottoni "Ritorna allo shop" o "Visualizza" */
.woocommerce-info a, 
.woocommerce-message a, 
.woocommerce-error a,
.woocommerce-info a.button,
.woocommerce-message a.button {
    color: #729D39 !important; /* Inserisci qui il tuo BLU SCURO/NERO per i link */
    text-decoration: none !important;
}

/* 4. Colore del testo principale del messaggio */
.woocommerce-info, 
.woocommerce-message, 
.woocommerce-error {
    color: #002124 !important; /* Inserisci qui il tuo BLU SCURO o NERO */
}

/* 4. Colore del bottone */
.wc-backward {
	color: #ffffff !important; /* Inserisci qui il tuo BIANCO */
	background-color: #002124 !important; /* Sfondo bottone SCURO */
}

/* Sostituisce solo la parola senza toccare lo stile del bottone */
.elementor-menu-cart__footer-buttons a.elementor-button--checkout .elementor-button-text {
    visibility: hidden;
    position: relative;
}

.elementor-menu-cart__footer-buttons a.elementor-button--checkout .elementor-button-text::after {
    content: "Preventivo";
    visibility: visible;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}