/*
    Theme Name: Jasci E-Commerce 2.0
    Theme URI: https://www.jasci.it/
    Description: This is the theme created for the Jasci.
    Author: Argoverse
    Author URI: https://argoverse.it
    Version: 2.0.1a
    Template: genesis
*/

/* Assicura che la scritta non vada a capo e azzera il padding interno di Elementor */
.fit-text .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  overflow: hidden;
}

.fit-text .elementor-heading-title {
  white-space: nowrap !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  visibility: hidden;
}

/********** TOC ************/
#ez-toc-container {
    background-color: #fbfbfa !important; /* Fondo beige muy claro */
    border: none !important;
    border-top: 2px solid #c3b091 !important; /* Línea superior dorada/marrón */
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 24px 28px !important;
    width: 100% !important;
    display: block !important;
    margin: 2em 0 !important;
}

.ez-toc-title-toggle,
#ez-toc-container .ez-toc-title-container span {
    display: none !important;
}

#ez-toc-container ul.ez-toc-list ul {
    display: none !important;
}

#ez-toc-container p.ez-toc-title {
    font-size: 0 !important; /* Oculta el texto "Contents" original */
    margin-bottom: 16px !important;
}

#ez-toc-container p.ez-toc-title::before {
    content: "IN QUESTO ARTICOLO" !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: #8c7355 !important; /* Color marrón dorado para el encabezado */
    text-transform: uppercase !important;
    font-family: inherit;
    display: block !important;
}

#ez-toc-container div.ez-toc-title-container + ul.ez-toc-list {
    margin-top: 0 !important;
    padding: 0 !important;
}

#ez-toc-container ul.ez-toc-list {
    counter-reset: toc-counter; /* Generador de números correlativos */
    list-style: none !important;
}

#ez-toc-container ul.ez-toc-list > li {
    counter-increment: toc-counter;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: baseline !important;
}

#ez-toc-container ul.ez-toc-list > li:last-child {
    margin-bottom: 0 !important;
}

#ez-toc-container ul.ez-toc-list > li a::before {
    content: counter(toc-counter) ". " !important;
    font-weight: 700 !important;
    color: #4a5d4e !important; /* Color verdoso/grisáceo para el número */
    margin-right: 8px !important;
    font-family: inherit;
}

#ez-toc-container a.ez-toc-link {
    color: #5b6f60 !important; /* Color verde grisáceo elegante para los enlaces */
    font-size: 16px !important;
    line-height: 1.5 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(91, 111, 96, 0.4) !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s ease;
}

#ez-toc-container a.ez-toc-link:hover {
    color: #2c3e30 !important;
    text-decoration: underline !important;
}


/********** WC CALL TO ACTION PRODOTTI ***********/
/* --- 1. CONTENITORE PRINCIPALE (Grid a 2 Colonne) --- */
.wc-block-featured-product {
    min-height: auto !important;
    background-color: #fbfaee !important;
    border: 1px solid #e8e6d9 !important;
    padding: 0 !important;
    margin: 2em 0 !important;
    overflow: hidden !important;
}

/* Rimuove l'overlay scuro nativo */
.wc-block-featured-product .background-dim__overlay {
    display: none !important;
}

/* Ristruttura il wrapper principale con CSS Grid per separare Immagine e Contenuto */
.wc-block-featured-product__wrapper {
    display: grid !important;
    grid-template-columns: 240px 1fr !important; /* Colonna sinistra fissa per bottiglia, destra flessibile */
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    position: relative !important;
}

/* Background beige per la sola colonna dell'immagine */
.wc-block-featured-product__wrapper::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 240px !important;
    background-color: #f3efe6 !important;
    z-index: 1 !important;
}

/* --- 2. COLONNA SINISTRA: IMMAGINE --- */
.wc-block-featured-product .wc-block-featured-product__background-image {
    grid-column: 1 !important;
    position: relative !important;
    width: 100% !important;
    max-width: 160px !important;
    height: auto !important;
    max-height: 280px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    padding: 25px 15px !important;
    z-index: 2 !important;
}

/* --- 3. COLONNA DESTRA: CONTENUTI TEXT/CTA --- */
/* Raggruppa o posiziona tutti gli elementi di testo nella colonna 2 */
.wc-block-featured-product__title,
.wc-block-featured-product__description,
.wc-block-featured-product__price,
.wc-block-featured-product__inner-blocks {
    grid-column: 2 !important;
    text-align: left !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
}

/* Categoria / Antetitolo sopra al Titolo */
.wc-block-featured-product__title::before {
    content: "VINO BIOLOGICO · IL NOSTRO CONSIGLIO" !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    color: #8c7355 !important;
    text-transform: uppercase !important;
    margin-bottom: 8px !important;
}

/* Titolo */
.wc-block-featured-product .wc-block-featured-product__title {
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #1a1a1a !important;
    text-transform: uppercase !important;
    padding: 30px 40px 10px 40px !important;
    margin: 0 !important;
}

/* Descrizione / Estratto (se abilitata) */
.wc-block-featured-product__description {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #4a4a4a !important;
    padding: 0 40px 15px 40px !important;
    margin: 0 !important;
}

/* --- 4. RIGA PREZZO + BOTTONE ACQUISTA (Affiancati e Allineati a Sinistra) --- */
.wc-block-featured-product__price {
    display: inline-block !important;
    width: auto !important;
    padding: 0 25px 30px 40px !important;
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    vertical-align: middle !important;
    text-align: left !important;
}

.wc-block-grid__product-price.has-text-align-center {
    text-align: left !important;
}

.wc-block-featured-product__inner-blocks {
    display: inline-block !important;
    width: auto !important;
    padding: 30px !important;
    margin: 0 !important;
    vertical-align: middle !important;
    color: #000 !important;
}

.wc-block-featured-product .wp-block-buttons {
    justify-content: flex-start !important;
    margin: 0 !important;
}

.wc-block-featured-product .wp-block-button {
    margin: 0 !important;
}

/* Bottone Verde */
.wc-block-featured-product .wp-block-button__link {
    background-color: #557c67 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 12px 26px !important;
    border-radius: 0px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.wc-block-featured-product .wp-block-button__link:hover {
    background-color: #416251 !important;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 650px) {
    .wc-block-featured-product__wrapper {
        grid-template-columns: 1fr !important;
    }

    .wc-block-featured-product__wrapper::before {
        width: 100 !important;
        height: 200px !important;
    }

    .wc-block-featured-product .wc-block-featured-product__background-image {
        grid-column: 1 !important;
    }

    .wc-block-featured-product__title,
    .wc-block-featured-product__description,
    .wc-block-featured-product__price,
    .wc-block-featured-product__inner-blocks {
        grid-column: 1 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .wc-block-featured-product__price {
        display: block !important;
        padding-bottom: 10px !important;
    }

    .wc-block-featured-product__inner-blocks {
        display: block !important;
        padding-bottom: 25px !important;
    }
}

/************ AGGIUNGI AL CARRELLO - PAGINA PRODOTTO ***************/
.woocommerce div.product .add-to-cart-styled form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 2em !important;
}

.woocommerce div.product .add-to-cart-styled form.cart::before,
.woocommerce div.product .add-to-cart-styled form.cart::after {
    display: none !important;
}

.woocommerce div.product .add-to-cart-styled form.cart div.quantity {
    float: none !important;
    margin: 0 !important;
}

.woocommerce div.product .add-to-cart-styled form.cart .tc-quantity--buttons {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background-color: #6c8f7a !important;
    border-radius: 0 !important;
    padding: 0 5px !important;
    height: 48px !important;
    min-width: 130px !important;
    box-sizing: border-box !important;
}

.woocommerce div.product .add-to-cart-styled form.cart .tc-quantity--button {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    padding: 0 12px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
}

.woocommerce div.product .add-to-cart-styled form.cart .tc-quantity--button:hover {
    opacity: 0.8;
}

.woocommerce div.product .add-to-cart-styled form.cart input.qty {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    width: 35px !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
}

.woocommerce div.product .add-to-cart-styled form.cart input.qty::-webkit-outer-spin-button,
.woocommerce div.product .add-to-cart-styled form.cart input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.woocommerce div.product .add-to-cart-styled form.cart .single_add_to_cart_button {
    float: none !important;
    flex-grow: 1 !important;
    height: 48px !important;
    background-color: #ffffff !important;
    border: 1px solid #6c8f7a !important;
    color: #6c8f7a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    padding: 0 20px 0 45px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    position: relative !important;
    box-shadow: none !important;
}


.woocommerce div.product .add-to-cart-styled form.cart .single_add_to_cart_button::before {
    content: "" !important;
    width: 17px !important;
    height: 21px !important;
    background-image: url("data:image/svg+xml,%3Csvg width='17' height='21' viewBox='0 0 17 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.85563 5.12195H2.55406C1.65468 5.12195 0.908132 5.84876 0.84396 6.7871L0.00434331 19.0798C-0.0294571 19.5761 0.135129 20.0647 0.459417 20.4289C0.784195 20.7931 1.2383 21 1.71445 21H15.2856C15.7617 21 16.2158 20.7931 16.5406 20.4289C16.8649 20.0647 17.0295 19.5761 16.9957 19.0798L16.156 6.7871C16.0919 5.84876 15.3453 5.12195 14.4459 5.12195H13.1537V4.86585C13.1537 2.17837 11.0703 0 8.5 0C6.02375 0 3.73512 2.0621 3.84632 4.86585C3.84975 4.95088 3.85269 5.03641 3.85563 5.12195ZM13.1537 6.65854V10.5C13.1537 10.9241 12.8245 11.2683 12.4189 11.2683C12.0133 11.2683 11.6841 10.9241 11.6841 10.5V6.65854H5.3159V10.5C5.3159 10.9241 4.98672 11.2683 4.58111 11.2683C4.17551 11.2683 3.84632 10.9241 3.84632 10.5C3.84632 10.5 3.91 8.70476 3.88894 6.65854H2.55406C2.42572 6.65854 2.31894 6.76251 2.31012 6.89619L1.47 19.1889C1.4651 19.2601 1.48862 19.3297 1.53516 19.382C1.5817 19.4337 1.64636 19.4634 1.71445 19.4634H15.2856C15.3536 19.4634 15.4183 19.4337 15.4648 19.382C15.5114 19.3297 15.5349 19.2601 15.53 19.1889L14.6899 6.89619C14.6811 6.76251 14.5743 6.65854 14.4459 6.65854H13.1537ZM11.6841 5.12195V4.86585C11.6841 3.02707 10.2586 1.53659 8.5 1.53659C6.7414 1.53659 5.3159 3.02707 5.3159 4.86585V5.12195H11.6841Z' fill='%236C8F7A'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}


.woocommerce div.product .add-to-cart-styled form.cart .single_add_to_cart_button:hover {
    background-color: #f4f7f5 !important;
    color: #537260 !important;
}

@media (max-width: 480px) {
    .woocommerce div.product .add-to-cart-styled form.cart {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .woocommerce div.product .add-to-cart-styled form.cart .tc-quantity--buttons {
        width: 100% !important;
    }

    .woocommerce div.product .add-to-cart-styled form.cart .single_add_to_cart_button {
        width: 100% !important;
    }
}


/* =========================================================
   Notifiche WooCommerce — stile Jasci
   WooCommerce 9.x+ · Elementor Pro 4.3.x (widget "WooCommerce Notices")
   Limitato a .e-woocommerce-notices-wrapper: il widget nasconde con display:none
   le notifiche standard del tema; allargare il selettore le farebbe ricomparire
   come doppioni.
   ========================================================= */

.e-woocommerce-notices-wrapper{
  --jn-bg:      var(--e-global-color-61b7193, #FBF7EF);   /* CREMA_CHIARO */
  --jn-text:    var(--e-global-color-accent, #3A3A3A);    /* GRIGIO_SCURO */
  --jn-ok:      #557866;   /* VERDE_SALVIA scurito: #6C8F7A con testo bianco non raggiunge 4.5:1 */
  --jn-error:   #7A2E3A;   /* rosso vino, al posto del #b81c23 di WooCommerce */
  --jn-info:    var(--e-global-color-secondary, #B29B52); /* ORO_BRONZATO */
  --jn-line:    #E4DFD1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2em;
}

/* ---------- Box ---------- */
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info){
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 20px 24px;
  background: var(--jn-bg);
  color: var(--jn-text);
  border: 1px solid var(--jn-line);
  border-top: 2px solid var(--jn-accent, var(--jn-info));
  border-radius: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  list-style: none;
  animation: jn-in .45s cubic-bezier(.22,.61,.36,1) both;
}
.e-woocommerce-notices-wrapper .woocommerce-message{ --jn-accent: var(--jn-ok); }
.e-woocommerce-notices-wrapper .woocommerce-error  { --jn-accent: var(--jn-error); }
.e-woocommerce-notices-wrapper .woocommerce-info   { --jn-accent: var(--jn-info); }

/* Clearfix di WooCommerce inutile con flex */
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::after{
  display: none;
}

/* ---------- Icona: font WooCommerce, nel flusso flex invece che absolute ---------- */
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::before{
  position: static;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: .15em;
  font-size: 20px;
  line-height: 1;
  color: var(--jn-accent);
}

/* ---------- Errore: <ul><li> ---------- */
.e-woocommerce-notices-wrapper .woocommerce-error li{
  flex: 1 1 0;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}
/* Più messaggi nella stessa notifica: un po' di aria tra le righe */
.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li{
  margin-bottom: 6px;
}
.woocommerce-error li:last-child,
.woocommerce-info li:last-child,
.woocommerce-message li:last-child{
  margin-bottom: 0;
}
/* Il messaggio arriva tutto in <strong>: peso medio per leggibilità */
.e-woocommerce-notices-wrapper .woocommerce-error li strong{
  font-weight: 500;
}
/* <strong> vuoto fuori dal <li>, generato dal plugin quantità (HTML non valido) */
.e-woocommerce-notices-wrapper .woocommerce-error > strong{
  display: none;
}

/* ---------- Link testuale (es. "Continua lo shopping") ---------- */
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) a:not(.button){
  color: var(--jn-ok);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
  transition: color .2s;
}
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) a:not(.button):hover{
  color: var(--jn-text);
}

/* ---------- Bottone (es. "Visualizza carrello"), come i CTA del sito ---------- */
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) .button{
  float: none;
  order: 2;
  margin-left: auto;
  min-width: 220px;
  min-height: 48px;
  padding: 12px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--jn-ok);
  color: #FFFFFF;
  border: 0;
  border-radius: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .3s, transform .3s;
}
.e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) .button:hover{
  background: var(--jn-text);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ---------- Entrata ---------- */
@keyframes jn-in{
  from{ opacity: 0; transform: translateY(-6px); }
  to  { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px){
  .e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info){
    padding: 16px;
    font-size: 15px;
  }
  .e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) .button{
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce){
  .e-woocommerce-notices-wrapper *,
  .e-woocommerce-notices-wrapper :is(.woocommerce-message, .woocommerce-error, .woocommerce-info){
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Errore inline sotto i campi del checkout ----------
   form.checkout: specificità più alta della regola di woocommerce.css (caricato dopo, font-size .75em) */
.woocommerce-checkout form.checkout .checkout-inline-error-message{
  font-size: 1em;
}

/****** BANNER COOKIES *******/
.wcc-consent-bar .wcc-notice-btn-wrapper .wcc-btn {
	font-size: 14px;
	padding: 8px;
    	font-weight: 500;
}
