/* 
Theme Name: Hello Elementor Child - Winefor Clean
Theme URI: https://winefor.it/
Description: Hello Elementor Child — versione pulita per Winefor. Shortcode personalizzati e personalizzazioni WooCommerce/WordPress. Nessuna automazione Telegram, social o AI.
Author: Winefor
Author URI: https://winefor.it/
Template: hello-elementor
Version: 1.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
*/

/* =============================================================================
   WINEFOR - LAYOUT LARGHEZZA PIENA (FULL WIDTH)
   ============================================================================= */

/* Forza larghezza piena per il contenuto principale */
body.winefor-full-width .site-main,
body.winefor-full-width .page-header .entry-title,
body.winefor-full-width .site-content,
body.winefor-full-width #primary,
body.winefor-full-width #content,
body.winefor-full-width .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding-inline-start: 20px !important;
    padding-inline-end: 20px !important;
}

/* Sulle schede prodotto il template ha il proprio padding interno - azzera il padding del site-main */
body.winefor-full-width.single-product .site-main,
body.winefor-full-width.single-product #primary,
body.winefor-full-width.single-product #content,
body.winefor-full-width.single-product .content-area {
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Spaziatura paragrafi nelle schede prodotto */
body.winefor-full-width.single-product p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Nascondi sidebar */
body.winefor-full-width #secondary,
body.winefor-full-width .sidebar,
body.winefor-full-width aside {
    display: none !important;
}

/* Nascondi titolo dell'article WordPress (pagine, single post) — NON le card di plugin tipo The Post Grid */
article.page .entry-title,
article.single-post .entry-title,
.single .entry-header .entry-title,
.page-header .entry-title {
    display: none !important;
}

/* Override responsive breakpoints */
@media (min-width: 576px) {
    body.winefor-full-width .site-main { max-width: 100% !important; }
}
@media (min-width: 768px) {
    body.winefor-full-width .site-main { max-width: 100% !important; }
}
@media (min-width: 992px) {
    body.winefor-full-width .site-main { max-width: 100% !important; }
}
@media (min-width: 1200px) {
    body.winefor-full-width .site-main { max-width: 100% !important; }
}

/* =============================================================================
   WINEFOR - PRODOTTI WOOCOMMERCE COME PAGINE SEMPLICI
   ============================================================================= */

/* NASCONDI TUTTO L'ECOMMERCE - Lascia solo contenuto descrittivo */

/* Nascondi prezzo WooCommerce nativo (non quello del template Winefor) */
body.winefor-full-width.single-product .price,
body.winefor-full-width.single-product .woocommerce-Price-amount,
body.winefor-full-width.single-product .amount,
body.winefor-full-width.single-product ins,
body.winefor-full-width.single-product del,
body.winefor-full-width.single-product .woocommerce-price-suffix {
    display: none !important;
}

/* Ripristina visibilità prezzo dentro il template Winefor */
body.winefor-full-width.single-product #product-price .woocommerce-Price-amount,
body.winefor-full-width.single-product #product-price .amount,
body.winefor-full-width.single-product #product-price bdi,
body.winefor-full-width.single-product #product-price .woocommerce-Price-currencySymbol {
    display: inline !important;
}

/* Nascondi TUTTO il form carrello e elementi correlati */
body.winefor-full-width.single-product .cart,
body.winefor-full-width.single-product .quantity,
body.winefor-full-width.single-product .single_add_to_cart_button,
body.winefor-full-width.single-product form.cart,
body.winefor-full-width.single-product .woocommerce-variation,
body.winefor-full-width.single-product .woocommerce-variation-price,
body.winefor-full-width.single-product .woocommerce-variation-availability,
body.winefor-full-width.single-product .woocommerce-variation-description,
body.winefor-full-width.single-product .reset_variations,
body.winefor-full-width.single-product .woocommerce-grouped-product-list,
body.winefor-full-width.single-product button[type="submit"]:not(.winefor-degustazione-submit-btn),
body.winefor-full-width.single-product input[type="submit"]:not([form="winefor_degustazione_form"]) {
    display: none !important;
}

/* Nascondi tutti i messaggi WooCommerce */
body.winefor-full-width.single-product .woocommerce-message,
body.winefor-full-width.single-product .woocommerce-info,
body.winefor-full-width.single-product .woocommerce-error,
body.winefor-full-width.single-product .woocommerce-notices-wrapper,
body.winefor-full-width.single-product .wc-forward,
body.winefor-full-width.single-product .woocommerce-notice {
    display: none !important;
}

/* Nascondi meta prodotto (SKU, categorie, tags) */
body.winefor-full-width.single-product .product_meta,
body.winefor-full-width.single-product .posted_in,
body.winefor-full-width.single-product .tagged_as,
body.winefor-full-width.single-product .sku_wrapper {
    display: none !important;
}

/* Nascondi variazioni e attributi */
body.winefor-full-width.single-product .variations,
body.winefor-full-width.single-product .variations_form,
body.winefor-full-width.single-product table.variations,
body.winefor-full-width.single-product .woocommerce-product-attributes {
    display: none !important;
}

/* Nascondi disponibilità stock */
body.winefor-full-width.single-product .stock,
body.winefor-full-width.single-product .availability,
body.winefor-full-width.single-product .in-stock,
body.winefor-full-width.single-product .out-of-stock,
body.winefor-full-width.single-product p.stock {
    display: none !important;
}

/* Nascondi prodotti correlati e upsells */
body.winefor-full-width.single-product .related.products,
body.winefor-full-width.single-product .upsells.products,
body.winefor-full-width.single-product .cross-sells {
    display: none !important;
}

/* Nascondi rating e recensioni WooCommerce */
body.winefor-full-width.single-product .woocommerce-product-rating,
body.winefor-full-width.single-product .star-rating,
body.winefor-full-width.single-product .woocommerce-review-link,
body.winefor-full-width.single-product #reviews,
body.winefor-full-width.single-product #review_form_wrapper,
body.winefor-full-width.single-product .woocommerce-Reviews {
    display: none !important;
}

/* Nascondi breadcrumb WooCommerce */
body.winefor-full-width.single-product .woocommerce-breadcrumb {
    display: none !important;
}

/* Nascondi sale badge */
body.winefor-full-width.single-product .onsale,
body.winefor-full-width.single-product span.onsale {
    display: none !important;
}

/* Nascondi campi selettori di formato/tipo - NON quelli del form degustazione */
body.winefor-full-width.single-product select:not(.winefor-degustazione-select),
body.winefor-full-width.single-product .woocommerce-product-details table.variations select {
    display: none !important;
}

/* Nascondi label "Quantità" e simili */
body.winefor-full-width.single-product label[for*="quantity"],
body.winefor-full-width.single-product .quantity label {
    display: none !important;
}

/* Nascondi input numerici WooCommerce - NON quelli del form degustazione né il selettore qtà Winefor */
body.winefor-full-width.single-product input[type="number"]:not(.winefor-degustazione-input):not(.winefor-quantity-input),
body.winefor-full-width.single-product input.qty {
    display: none !important;
}

/* Nascondi pulsanti +/- della quantità */
body.winefor-full-width.single-product .quantity .qty,
body.winefor-full-width.single-product .quantity button,
body.winefor-full-width.single-product .plus,
body.winefor-full-width.single-product .minus {
    display: none !important;
}

/* Nascondi eventuali form di contatto prodotto */
body.winefor-full-width.single-product .wpcf7-form,
body.winefor-full-width.single-product .wpcf7 {
    display: none !important;
}

/* Nascondi plugin esterni (TrustIndex, ecc) */
body.winefor-full-width.single-product .trustindex-plugin,
body.winefor-full-width.single-product [class*="trustindex"] {
    display: none !important;
}

/* Nascondi link "Richiedi informazioni" e simili */
body.winefor-full-width.single-product a[href*="contatt"],
body.winefor-full-width.single-product .product-inquiry {
    display: none !important;
}

/* Nascondi sezioni accordion custom Winefor */
body.winefor-full-width.single-product .winefor-riconoscimenti,
body.winefor-full-width.single-product .winefor-wine-specs,
body.winefor-full-width.single-product .winefor-specifiche-tecniche {
    display: none !important;
}

/* Nascondi tab prodotto WooCommerce */
body.winefor-full-width.single-product .woocommerce-tabs,
body.winefor-full-width.single-product ul.tabs,
body.winefor-full-width.single-product .wc-tabs {
    display: none !important;
}

/* Nascondi eventuali campi custom del tema (Denominazione, Tipo, ecc) */
body.winefor-full-width.single-product .custom-field,
body.winefor-full-width.single-product .product-custom-field {
    display: none !important;
}

/* Ottimizza layout prodotto come pagina semplice */
body.winefor-full-width.single-product .product {
    max-width: 100%;
}

body.winefor-full-width.single-product .woocommerce-product-gallery {
    margin-bottom: 2rem;
}

body.winefor-full-width.single-product .entry-summary {
    /* Rimuovi stili tipici di summary ecommerce */
    padding: 0;
}

/* Mantieni solo il contenuto essenziale visibile */
body.winefor-full-width.single-product .woocommerce-product-details__short-description {
    /* Questo può rimanere visibile - è la descrizione breve */
}

body.winefor-full-width.single-product .woocommerce-Tabs-panel--description {
    /* Descrizione completa può rimanere */
}

/* ========================================================================
   PRODOTTO WINEFOR - NASCONDE TUTTI I CAMPI CUSTOM E FORM
   ======================================================================== */

/* Nasconde wrapper completo template Winefor custom */
body.winefor-full-width.single-product #winefor-product-template {
    display: none !important;
}

/* Nasconde tutti i dettagli/accordion */
body.winefor-full-width.single-product details,
body.winefor-full-width.single-product summary {
    display: none !important;
}

/* Nasconde tutte le section del template - NON quelle del form degustazione */
body.winefor-full-width.single-product .product-section,
body.winefor-full-width.single-product [class*="-section"]:not([class*="winefor-degustazione"]):not(.winefor-degustazione-section):not(.winefor-degustazione-submit-section) {
    display: none !important;
}

/* Nascondi specifici ID e classi Winefor */
body.winefor-full-width.single-product #riconoscimenti,
body.winefor-full-width.single-product #metodo-vinificazione,
body.winefor-full-width.single-product #caratteristiche-terreno,
body.winefor-full-width.single-product #scheda-tecnica,
body.winefor-full-width.single-product #recensioni,
body.winefor-full-width.single-product #richiedi-informazioni,
body.winefor-full-width.single-product .contact-form,
body.winefor-full-width.single-product .inquiry-form {
    display: none !important;
}

/* =============================================================================
   WINEFOR - TEMPLATE PRODOTTO PERSONALIZZATO
   ============================================================================= */

.winefor-single-product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.winefor-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .winefor-product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Sezione Specifiche Vino */
.winefor-wine-specs {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.winefor-wine-specs h3 {
    color: #722f37;
    border-bottom: 2px solid #722f37;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.wine-specs-grid {
    display: grid;
    gap: 15px;
}

.spec-item {
    padding: 10px;
    background: #fff;
    border-left: 4px solid #722f37;
    border-radius: 4px;
}

.spec-item strong {
    color: #722f37;
    display: inline-block;
    min-width: 150px;
}

.spec-item p {
    margin: 5px 0 0 0;
    line-height: 1.6;
    color: #333;
}

/* Sezione Riconoscimenti */
.winefor-riconoscimenti {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
}

.winefor-riconoscimenti h3 {
    color: #722f37;
    border-bottom: 2px solid #722f37;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.riconoscimenti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.riconoscimento-item {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.riconoscimento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.riconoscimento-image {
    max-width: 80px;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.riconoscimento-info h4 {
    color: #722f37;
    margin: 10px 0 5px 0;
    font-size: 16px;
}

.riconoscimento-info .anno {
    font-weight: bold;
    color: #666;
    margin: 5px 0;
}

.riconoscimento-info .menzione {
    font-style: italic;
    color: #888;
    font-size: 14px;
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .riconoscimenti-grid {
        grid-template-columns: 1fr;
    }
    
    .spec-item strong {
        min-width: auto;
        display: block;
        margin-bottom: 5px;
    }
}

/* =============================================================================
   WINEFOR - TAB PRODOTTO PERSONALIZZATI
   ============================================================================= */

/* Tab Abbinamenti Gastronomici */
.winefor-abbinamenti-content {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.winefor-abbinamenti-content h3 {
    color: #722f37;
    margin-bottom: 15px;
    font-size: 20px;
}

.abbinamenti-text {
    line-height: 1.8;
    color: #333;
    font-size: 16px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #722f37;
}

/* Tab Specifiche Tecniche */
.winefor-specifiche-tecniche {
    padding: 20px;
}

.winefor-specifiche-tecniche h3 {
    color: #722f37;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid #722f37;
    padding-bottom: 10px;
}

.specs-grid {
    display: grid;
    gap: 12px;
}

.spec-row {
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
    border-left: 3px solid #722f37;
    display: flex;
    align-items: center;
}

.spec-row strong {
    color: #722f37;
    min-width: 200px;
    font-weight: 600;
}

.spec-row span {
    color: #333;
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    flex: 1;
}

.spec-row.solfiti {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.spec-row.solfiti strong {
    color: #856404;
}

.spec-row.solfiti span {
    background: #fff;
    color: #856404;
    border-color: #ffc107;
    font-weight: 600;
}

/* Responsive per i tab */
@media (max-width: 768px) {
    .spec-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .spec-row strong {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .spec-row span {
        width: 100%;
    }
}

/* =============================================================================
   WPC FLY CART - FIX POSIZIONAMENTO E VISUALIZZAZIONE
   ============================================================================= */

/* Forza il badge del carrello in basso a sinistra */
.woofc-count {
    position: fixed !important;
    bottom: 40px !important;
    left: 40px !important;
    top: auto !important;
    right: auto !important;
    z-index: 99999997 !important;
}

/* Assicura che l'area del carrello popup sia visibile */
#woofc-area {
    position: fixed !important;
    z-index: 99999998 !important;
}

/* Fix z-index overlay - deve essere basso per non coprire altri elementi */
.woofc-overlay {
    z-index: 1 !important;
}

/* Fix per popup che potrebbe avere problemi di overflow */
#woofc-area .woofc-area-mid {
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
}

/* Assicura visibilità dei contenuti nel popup */
#woofc-area .woofc-item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix per immagini prodotto nel popup */
#woofc-area .woofc-item-thumb img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* =============================================================================
   TRUSTINDEX - WIDGET STYLES
   ============================================================================= */

/* Trustindex gestisce il rendering automaticamente - nessun override necessario */

/* =============================================================================
   WINEFOR - NASCONDE SOLO LA GALLERIA NATIVA WOOCOMMERCE (non il template custom)
   ============================================================================= */

/* Nasconde la galleria immagini nativa WooCommerce (sostituita dal template Winefor) */
body.winefor-full-width.single-product .woocommerce-product-gallery,
body.winefor-full-width.single-product .woocommerce-product-gallery__image,
body.winefor-full-width.single-product .wp-post-image,
body.winefor-full-width.single-product img.attachment-woocommerce_single {
    display: none !important;
}

/* Nasconde form contatto CF7 nativo (non il form degustazione custom) */
body.winefor-full-width.single-product .wpcf7 {
    display: none !important;
}
