/*
Theme Name: Hello Elementor Child
Description: Child theme of Hello Elementor for Fioreria customizations
Author: Fioreria Custom
Template: hello-elementor
Version: 1.0.3
Text Domain: hello-elementor-child
*/

/*
=== FIORERIA CUSTOM STYLES ===
All customizations for fioreria.demodv.com
Child theme ensures customizations survive parent theme updates
*/

/* Import parent theme styles */
@import url("../hello-elementor/style.css");

/* ===== STILI CARRELLO FIORERIA - VERSIONE SEMPLIFICATA ===== */

/* Container principale del carrello */
body.woocommerce-cart .woocommerce {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

/* Ripristina logo Elementor Pro - ID corretto dal DOM */
body.woocommerce-cart .elementor-element-5b3af6c img,
body.woocommerce-cart .elementor-element-5b3af6c .attachment-full {
    width: inherit !important;
    height: inherit !important;
    max-width: inherit !important;
    max-height: inherit !important;
    min-width: inherit !important;
    transform: none !important;
    scale: inherit !important;
}

/* Titolo carrello */
body.woocommerce-cart .page-title,
body.woocommerce-cart h1 {
    color: #4c6b5c !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 30px !important;
}

/* Tabella principale del carrello */
body.woocommerce-cart table {
    width: 100% !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: white !important;
    margin-bottom: 30px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Header della tabella carrello - tutto verde */
body.woocommerce-cart table th {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    padding: 15px !important;
    border: none !important;
    text-align: center !important;
}

/* Assicura che anche thead abbia sfondo verde */
body.woocommerce-cart table thead,
body.woocommerce-cart table thead tr {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
}

/* Header specifico dei blocchi WooCommerce - FORZATO VERDE */
body.woocommerce-cart .wc-block-cart-items__header,
body.woocommerce-cart tr.wc-block-cart-items__header {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
}

body.woocommerce-cart .wc-block-cart-items__header th,
body.woocommerce-cart .wc-block-cart-items__header-image,
body.woocommerce-cart .wc-block-cart-items__header-product,
body.woocommerce-cart .wc-block-cart-items__header-total {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
    color: white !important;
    border: none !important;
}

body.woocommerce-cart .wc-block-cart-items__header th span,
body.woocommerce-cart .wc-block-cart-items__header span {
    color: white !important;
    background: transparent !important;
}

/* FORZA tutti gli elementi dell'header ad essere verdi */
body.woocommerce-cart .wc-block-cart-items thead,
body.woocommerce-cart .wc-block-cart-items thead tr,
body.woocommerce-cart .wc-block-cart-items thead th {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
    color: white !important;
}

/* ULTIMA FORZA per l'header - tutti i possibili selettori */
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__header th:nth-child(1),
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__header th:nth-child(2),
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__header th:nth-child(3),
body.woocommerce-cart .wc-block-cart-items th.wc-block-cart-items__header-image,
body.woocommerce-cart .wc-block-cart-items th.wc-block-cart-items__header-product,
body.woocommerce-cart .wc-block-cart-items th.wc-block-cart-items__header-total {
    background: #4c6b5c !important;
    background-color: #4c6b5c !important;
    color: white !important;
    border: none !important;
}

/* Ripristina header del sito */
body.woocommerce-cart .site-header,
body.woocommerce-cart header,
body.woocommerce-cart .page-header {
    background: transparent !important;
    background-color: transparent !important;
}

/* NASCONDI COMPLETAMENTE header tabella carrello */
body.woocommerce-cart .wp-block-woocommerce-cart-items-block thead,
body.woocommerce-cart .wc-block-cart-items thead,
body.woocommerce-cart .wc-block-cart-items__header,
body.woocommerce-cart tr.wc-block-cart-items__header,
body.woocommerce-cart table.wc-block-cart-items thead,
body.woocommerce-cart .wp-block-table thead {
    display: none !important;
}

/* RIPRISTINA sfondo bianco per le righe dei prodotti */
body.woocommerce-cart .wc-block-cart-items tbody,
body.woocommerce-cart .wc-block-cart-items tbody tr,
body.woocommerce-cart .wc-block-cart-items tbody td,
body.woocommerce-cart .wc-block-cart-items tr:not(.wc-block-cart-items__header),
body.woocommerce-cart .wc-block-cart-items tr:not(:first-child) {
    background: white !important;
    background-color: white !important;
}

/* Contenitore esterno - senza bordi arrotondati */
body.woocommerce-cart .wp-block-woocommerce-cart-items-block {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    margin-bottom: 30px !important;
}

/* Solo la tabella prodotti con bordi arrotondati */
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wp-block-table {
    border: 1px solid #ddd !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    background: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Celle della tabella carrello */
body.woocommerce-cart table td {
    padding: 20px 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    vertical-align: middle !important;
    border-left: none !important;
    border-right: none !important;
    text-align: center !important;
}

/* Ultima riga senza bordo */
body.woocommerce-cart table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ===== STILI BLOCCHI WOOCOMMERCE - APPROCCIO UNIVERSALE ===== */

/* FORZA immagini prodotto SOLO nella tabella carrello */
body.woocommerce-cart .wc-block-cart-items img[src*="uploads"],
body.woocommerce-cart .wp-block-woocommerce-cart-items-block img[src*="uploads"],
body.woocommerce-cart table.wc-block-cart-items img[src*="uploads"] {
    max-width: 120px !important;
    width: 120px !important;
    height: auto !important;
    border-radius: 6px !important;
}

/* FORZA dimensioni contenitori immagini SOLO nella tabella carrello */
body.woocommerce-cart .wc-block-cart-items [class*="image"],
body.woocommerce-cart .wp-block-woocommerce-cart-items-block [class*="image"],
body.woocommerce-cart table.wc-block-cart-items [class*="image"] {
    width: 120px !important;
    min-width: 120px !important;
}

/* FORZA stili nome prodotto - cerca tutti i link di prodotti */
body.woocommerce-cart a[href*="prodotto"] {
    font-weight: 700 !important;
    color: #4c6b5c !important;
    font-size: 16px !important;
    text-decoration: none !important;
}

/* FORZA tutti i prezzi nella tabella carrello */
body.woocommerce-cart [class*="price"] {
    color: #4c6b5c !important;
    font-weight: 500 !important;
    font-size: 16px !important;
}

/* ===== STILI BLOCCHI WOOCOMMERCE - SELETTORI SPECIFICI ===== */

/* Container del prodotto con flexbox - FORZATO */
body.woocommerce-cart .wc-block-cart-item__wrap,
body.woocommerce-cart .wp-block-woocommerce-cart-items-block .wc-block-cart-item__wrap,
body.woocommerce-cart table .wc-block-cart-item__wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

/* Nome del prodotto - font-weight più pesante - FORZATO */
body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wp-block-woocommerce-cart-items-block .wc-block-components-product-name,
body.woocommerce-cart table .wc-block-components-product-name {
    text-align: left !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #4c6b5c !important;
    flex: 0 0 auto !important;
    margin-right: 15px !important;
    max-width: 60% !important;
}

/* Link del nome prodotto */
body.woocommerce-cart .wc-block-components-product-name a {
    color: #4c6b5c !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

/* Descrizione/dettagli prodotto - sotto nome e prezzo */
body.woocommerce-cart .wc-block-components-product-metadata {
    text-align: left !important;
    font-size: 13px !important;
    color: #666 !important;
    margin-top: 8px !important;
    line-height: 1.4 !important;
    width: 100% !important;
    order: 3 !important;
    flex-basis: 100% !important;
}

/* Prezzo del prodotto - vicino al nome con font-weight più leggero - FORZATO */
body.woocommerce-cart .wc-block-cart-item__prices,
body.woocommerce-cart .wp-block-woocommerce-cart-items-block .wc-block-cart-item__prices,
body.woocommerce-cart table .wc-block-cart-item__prices {
    text-align: left !important;
    font-weight: 500 !important;
    color: #4c6b5c !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    margin-left: 5px !important;
    margin-right: auto !important;
}

/* Immagine del prodotto - ancora più grande - FORZATO */
body.woocommerce-cart .wc-block-cart-item__image img,
body.woocommerce-cart .wp-block-woocommerce-cart-items-block .wc-block-cart-item__image img,
body.woocommerce-cart table .wc-block-cart-item__image img {
    max-width: 120px !important;
    width: 120px !important;
    height: auto !important;
    border-radius: 6px !important;
}

body.woocommerce-cart .wc-block-cart-item__image,
body.woocommerce-cart .wp-block-woocommerce-cart-items-block .wc-block-cart-item__image,
body.woocommerce-cart table .wc-block-cart-item__image {
    width: 120px !important;
    min-width: 120px !important;
}

/* Quantità e rimuovi articolo sotto la descrizione */
body.woocommerce-cart .wc-block-cart-item__quantity {
    order: 4 !important;
    flex-basis: 100% !important;
    margin-top: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    text-align: left !important;
}

/* Selettore quantità */
body.woocommerce-cart .wc-block-components-quantity-selector {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Bottone rimuovi articolo */
body.woocommerce-cart .wc-block-cart-item__remove-link {
    color: #dc3545 !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Sezione totali del carrello */
body.woocommerce-cart .cart_totals {
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 25px !important;
    max-width: 400px !important;
    margin-left: auto !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

body.woocommerce-cart .cart_totals h2 {
    color: #4c6b5c !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    font-size: 22px !important;
}

/* Bottone procedi al pagamento - selettore corretto */
body.woocommerce-cart .wc-block-components-button,
body.woocommerce-cart .wc-block-cart__submit-button {
    background: #4c6b5c !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    width: 100% !important;
    text-decoration: none !important;
    display: block !important;
    text-align: center !important;
    margin-top: 20px !important;
}

/* Testo del bottone */
body.woocommerce-cart .wc-block-components-button__text {
    color: white !important;
}

body.woocommerce-cart .checkout-button:hover,
body.woocommerce-cart a.checkout-button:hover {
    background: #3a5449 !important;
    color: white !important;
}

/* Altri bottoni del carrello */
body.woocommerce-cart .button {
    background: #4c6b5c !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
}

/* Input quantità */
body.woocommerce-cart input[type="number"] {
    width: 60px !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px !important;
    font-weight: 600 !important;
}

/* Prezzi nella colonna totale - font-weight più pesante */
body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper,
body.woocommerce-cart .wc-block-cart-item__total .price {
    font-weight: 700 !important;
    color: #4c6b5c !important;
    font-size: 16px !important;
}

/* Prezzi generici nella sezione totali */
body.woocommerce-cart .wc-block-components-totals-item__value,
body.woocommerce-cart .wc-block-formatted-money-amount {
    font-weight: 700 !important;
    color: #4c6b5c !important;
}

/* Nasconde la parola "stimato" solo dal totale finale (footer) */
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    font-size: 0 !important;
}

body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label::before {
    content: "Totale" !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #333 !important;
}

/* Codice Fiscale Field Styling - Checkout - SUPER AGGRESSIVE */
* #billing-codice_fiscale,
* input[name="billing_codice_fiscale"],
*[id*="codice_fiscale"],
*[name*="codice_fiscale"],
.codice-fiscale-field-container input,
.codice-fiscale-field-container input[type="text"],
body #billing-codice_fiscale,
body input[name="billing_codice_fiscale"],
html body #billing-codice_fiscale,
html body input[name="billing_codice_fiscale"] {
    color: #595959 !important;
    font-size: 1em !important;
    background: white !important;
    border: 1px solid hsla(0,0%,7%,.8) !important;
    border-radius: 4px !important;
    padding: 12px !important;
    width: 100% !important;
}

/* Focus state for codice fiscale - SUPER AGGRESSIVE */
* #billing-codice_fiscale:focus,
* input[name="billing_codice_fiscale"]:focus,
*[id*="codice_fiscale"]:focus,
*[name*="codice_fiscale"]:focus,
.codice-fiscale-field-container input:focus,
body #billing-codice_fiscale:focus,
html body #billing-codice_fiscale:focus {
    color: #595959 !important;
    border-color: hsla(0,0%,7%,.8) !important;
    outline: none !important;
}

/* Placeholder styling for codice fiscale - MATCH OTHER FIELDS */
#billing-codice_fiscale::placeholder,
input[name="billing_codice_fiscale"]::placeholder,
#billing-codice_fiscale::-webkit-input-placeholder,
input[name="billing_codice_fiscale"]::-webkit-input-placeholder,
#billing-codice_fiscale::-moz-placeholder,
input[name="billing_codice_fiscale"]::-moz-placeholder,
#billing-codice_fiscale:-ms-input-placeholder,
input[name="billing_codice_fiscale"]:-ms-input-placeholder {
    color: #595959 !important;
    opacity: 1 !important;
}

/* Pulsante "Effettua ordine" - Checkout WooCommerce Blocks */
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wp-element-button.wc-block-components-checkout-place-order-button,
.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button.contained,
.wc-block-components-checkout-place-order-button.wc-block-components-button,
button.wc-block-components-checkout-place-order-button,
.wc-block-components-checkout-place-order-button {
    background-color: #4c6b5c !important;
    background: #4c6b5c !important;
    border-color: #4c6b5c !important;
    color: white !important;
}

/* Hover state per il pulsante */
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout .wp-element-button.wc-block-components-checkout-place-order-button:hover,
.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button.contained:hover,
.wc-block-components-checkout-place-order-button.wc-block-components-button:hover,
button.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button:hover {
    background-color: #3a5449 !important;
    background: #3a5449 !important;
    border-color: #3a5449 !important;
    color: white !important;
}

/* Focus state per il pulsante */
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button:focus,
body.woocommerce-checkout .wp-element-button.wc-block-components-checkout-place-order-button:focus,
.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button.contained:focus,
.wc-block-components-checkout-place-order-button.wc-block-components-button:focus,
button.wc-block-components-checkout-place-order-button:focus,
.wc-block-components-checkout-place-order-button:focus {
    background-color: #4c6b5c !important;
    background: #4c6b5c !important;
    border-color: #4c6b5c !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(76, 107, 92, 0.3) !important;
}

/* Layout billing section - Città e CAP sulla stessa riga */
body.woocommerce-checkout .wc-block-components-address-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 1rem !important;
    row-gap: 0 !important;
    grid-template-areas:
        "country country"
        "first_name last_name"
        "codice_fiscale codice_fiscale"
        "address_1 address_1"
        "city postcode"
        "phone phone"
        "address_2_toggle address_2_toggle" !important;
}

/* Assegnazione delle aree grid ai campi */
body.woocommerce-checkout .wc-block-components-address-form__country {
    grid-area: country !important;
}

body.woocommerce-checkout .wc-block-components-address-form__first_name {
    grid-area: first_name !important;
}

body.woocommerce-checkout .wc-block-components-address-form__last_name {
    grid-area: last_name !important;
}

body.woocommerce-checkout .wc-block-components-address-form__address_1 {
    grid-area: address_1 !important;
    margin-top: calc(0.25rem - 5px) !important;
    margin-bottom: 1rem !important;
}

body.woocommerce-checkout .codice-fiscale-field-container {
    grid-area: codice_fiscale !important;
    grid-column: 1 / -1 !important;
    margin-bottom: calc(0.25rem - 5px) !important;
}

body.woocommerce-checkout .wc-block-components-address-form__city {
    grid-area: city !important;
    width: 100% !important;
    align-self: start !important;
    margin-top: 0 !important;
}

body.woocommerce-checkout .wc-block-components-address-form__city input {
    width: 100% !important;
    margin: 0 !important;
}

body.woocommerce-checkout .wc-block-components-address-form__postcode {
    grid-area: postcode !important;
    width: 100% !important;
    align-self: start !important;
    margin-top: 0 !important;
}

body.woocommerce-checkout .wc-block-components-address-form__postcode input {
    width: 100% !important;
    margin: 0 !important;
}

body.woocommerce-checkout .wc-block-components-address-form__phone {
    grid-area: phone !important;
    grid-column: 1 / -1 !important;
}

body.woocommerce-checkout .wc-block-components-address-form__address_2-toggle {
    grid-area: address_2_toggle !important;
    grid-column: 1 / -1 !important;
}

/* Nascondere il campo provincia se presente */
body.woocommerce-checkout .wc-block-components-address-form__state {
    display: none !important;
}

/* Ridurre spazio nella sezione Informazioni di contatto - ULTRA AGGRESSIVO */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block .wc-block-components-checkout-step__container {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block .wc-block-components-checkout-step__content {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block .wc-block-components-text-input {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block input[type="email"] {
    margin: 0 !important;
}

/* Selettore super specifico per la sezione contatto */
body.woocommerce-checkout .wc-block-components-checkout-step.wp-block-woocommerce-checkout-contact-information-block {
    margin: 0 !important;
    padding: 0 !important;
}

/* RIDUZIONE MIRATA DELLO SPAZIO - Solo sotto la sezione contatto */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block {
    margin-bottom: 0.5rem !important; /* Spazio ridotto sotto */
}

/* Spazio corretto sopra il campo email */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block .wc-block-components-text-input {
    margin-top: 1rem !important; /* Spazio normale sopra il campo email */
    margin-bottom: 0 !important; /* Nessuno spazio sotto il campo email */
}

/* Campo email con spazio corretto */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block input[type="email"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 12px !important;
}

/* Spazio base tra contatto e billing */
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block + .wc-block-checkout__billing-fields,
body.woocommerce-checkout .wp-block-woocommerce-checkout-contact-information-block + fieldset {
    margin-top: 1rem !important;
}

/* Titolo sezione billing con controllo specifico */
body.woocommerce-checkout .wc-block-components-title.wc-block-components-checkout-step__title {
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

/* Backup per altri selettori del titolo billing */
body.woocommerce-checkout .wc-block-checkout__billing-fields .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-checkout__billing-fields h2,
body.woocommerce-checkout .wc-block-checkout__billing-fields legend {
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
}

/* Ridurre spazio generale tra le sezioni del checkout */
body.woocommerce-checkout .wc-block-components-checkout-step {
    margin-bottom: 1.5rem !important;
}

body.woocommerce-checkout .wc-block-components-checkout-step:last-child {
    margin-bottom: 0 !important;
}

