/**
* Theme Name: Printec Child
* Description: Child theme of Printec (Kromaline)
* Template: printec
* Version: 1.4.8
*/

/* ——— Layout base sito ——— */
:root { --container: 100vw !important; }
.site, .site-content, .wrap, .content-area, .container, .col-full{
  max-width: 100vw !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/* ===================================================================
   1) (RIMOSSO) HO TOLTO LE REGOLE CHE BLOCCAVANO POSIZIONE/OFFSET
   =================================================================== */
/* (non c’è più il vecchio blocco con .kroma-menu { --position ... } e
   .kroma-menu .e-n-menu-content [data-element_type="container"]{ ... }) */

/* ===================================================================
   4) MINI-CARRELLO – skin
   =================================================================== */
.kx-mini-cart{
  --gap: 0.6vw;                /* spazio tra aree */
  --thumb: 10vw;             /* lato immagine (sx) */
  --rad: 20px;                /* raggio angoli immagine */
  --border: 3px;              /* bordo immagine */
  --divider: 3px;             /* separatore nero tra prodotti */
  --remove-size: 2vw;       /* ⭕ misura icona rimozione */
  --remove-col: calc(var(--remove-size) + 12px);
  --c1:#FF00D4; --c2:#00D2FF;

  /* Totale (rettangolo) */
  --total-bg: #000;
  --total-color: #fff;
  --total-pad-y: .1vw;       /* ⭕ padding verticale del rettangolo Totale */
  --total-pad-x: 0vw;        /* ⭕ padding orizzontale del rettangolo Totale */
  --total-radius: 0;          /* ⭕ angoli: 0 = non arrotondati */
  --total-mt: 0vw;          /* ⭕ margine sopra */
  --total-mb: 0vw;          /* ⭕ margine sotto */
  --total-mx: 0;              /* ⭕ margini laterali */
  --total-font-size: 0.9vw;       /* ⭕ grandezza testo “Totale …” */
  --total-letter-spacing: 0.2vw;    /* ⭕ spaziatura lettere */
  --total-amount-font-size: 0.9vw;  /* ⭕ font-size importo */

  /* Label IVA personalizzabile */
  --tax-gap: 0.05vw;                    /* ⭕ spazio tra importo e (IVA inclusa) */
  --tax-font-size: var(--total-font-size); /* ⭕ dimensione label IVA */
  --tax-font-family: inherit;          /* ⭕ font label IVA */
  --tax-font-weight: 700;              /* ⭕ peso label IVA */
  --tax-shift-y: 0;                    /* ⭕ nudge verticale (negativo = su) */
  --tax-mb: 0;                         /* ⭕ margine sotto label IVA */

  /* Bottone “Visualizza carrello” (padding separato) */
  --view-btn-font-size: 1vw; /* ⭕ font-size bottone */
  --view-btn-pt: .8rem;          /* ⭕ padding-top */
  --view-btn-pb: .8rem;          /* ⭕ padding-bottom */
  --view-btn-px: 1.6rem;         /* ⭕ padding-left/right */
}

/* Lista prodotti + scrollbar “precoce” */
.kx-mini-cart .elementor-menu-cart__products{
  max-height: clamp(340px, 42vh, 42vw);
  overflow-y: auto;
  padding-right: .25rem;
}
.kx-mini-cart .elementor-menu-cart__products::-webkit-scrollbar{ width: 3px; }
.kx-mini-cart .elementor-menu-cart__products::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.22); border-radius: 8px; }

/* Griglia riga prodotto */
.kx-mini-cart .elementor-menu-cart__product{
  display: grid !important;
  grid-template-columns: var(--thumb) 1fr var(--remove-col);
  grid-template-areas:
    "img name remove"
    "img extra remove";
  align-items: start;
  gap: var(--gap);
  padding: 1rem 0;
  border-bottom: var(--divider) solid #000;
}
.kx-mini-cart .elementor-menu-cart__product-image{ grid-area: img; }
.kx-mini-cart .elementor-menu-cart__product-name{  grid-area: name; align-self:start; margin:0; }
.kx-mini-cart .elementor-menu-cart__product-price{ grid-area: extra; align-self:start; }
.kx-mini-cart .elementor-menu-cart__product-remove{ grid-area: remove; align-self:start; }

/* Immagine a sinistra */
.kx-mini-cart .elementor-menu-cart__product-image a{
  display:block; width: var(--thumb); height: var(--thumb);
  border: var(--border) solid #000; border-radius: var(--rad); overflow: hidden;
}
.kx-mini-cart .elementor-menu-cart__product-image img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Titolo nero + link (modifica) con hover a gradiente */
.kx-mini-cart .elementor-menu-cart__product-name a:first-child{
  color:#000; text-decoration:none; font-weight:600; font-size:.8vw;
}
.kx-mini-cart .elementor-menu-cart__product-name .wapf-edit-cartitem,
.kx-mini-cart .elementor-menu-cart__product-name .kx-modifica{
  margin-left:0; font-weight:600; text-decoration:none; color:#000;
  background-image: linear-gradient(90deg, var(--c1), var(--c2));
  background-size:100% 100%; background-repeat:no-repeat;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:#000;
  transition: -webkit-text-fill-color 0s ease, color 0s ease; font-size:.8vw;
}
.kx-mini-cart .elementor-menu-cart__product-name .wapf-edit-cartitem:hover,
.kx-mini-cart .elementor-menu-cart__product-name .kx-modifica:hover{
  -webkit-text-fill-color:transparent; color:transparent;
}

/* Meta specifiche (due colonne: etichetta | valore) */
.kx-mini-cart .variation{
  display:grid; grid-template-columns:max-content 1fr; column-gap:.8em; row-gap:.25em;
  font-size:.7vw; line-height:1.25; color:#4c4c4c; margin:.35rem 0 0 0;
}
.kx-mini-cart .variation dt{ grid-column:1; margin:0; font-weight:600; }
.kx-mini-cart .variation dd{ grid-column:2; margin:0; }
.kx-mini-cart .variation dd p{ margin:0; display:inline; }

/* Riga “Quantità | € cad. + iva” (nera) */
.kx-mini-cart .kx-item-extra{
  margin-top: -0.5vw;
  display:flex; gap:0; align-items:baseline;
  font-size:.7vw; color:#000 !important;
  font-family:"Futura PT","Futura-PT","Futura PT Demi","Futura","Avenir",system-ui,sans-serif;
  font-weight:600;
}
.kx-mini-cart .kx-item-extra .woocommerce-Price-amount{ color:#000 !important; }
.kx-mini-cart .kx-item-extra .kx-dot{ opacity:.55; padding:0 .6em; }

/* ❌ Rimozione: usa SOLO il link Elementor e mostra i tuoi SVG con dimensione regolabile */
.kx-mini-cart .elementor-menu-cart__product-remove .remove_from_cart_button:not(.elementor_remove_from_cart_button){
  display:none !important;
}
.kx-mini-cart .elementor-menu-cart__product-remove .elementor_remove_from_cart_button{
  width: var(--remove-size); height: var(--remove-size);
  display:inline-block; text-decoration:none; background:#000; border:0; padding:0; cursor:pointer;
  -webkit-mask: url('https://kromaline.it/wp-content/uploads/rimuovi-icona.svg') center/contain no-repeat;
          mask: url('https://kromaline.it/wp-content/uploads/rimuovi-icona.svg') center/contain no-repeat;
  text-indent:-9999px; overflow:hidden;
}
.kx-mini-cart .elementor-menu-cart__product-remove .elementor_remove_from_cart_button:hover{
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-mask-image: url('https://kromaline.it/wp-content/uploads/rimuovi-icona-hover.svg');
          mask-image: url('https://kromaline.it/wp-content/uploads/rimuovi-icona-hover.svg');
}

/* Totale in rettangolo nero, testo bianco, con tipografia controllabile */
.kx-mini-cart .elementor-menu-cart__subtotal{
  position: relative;
  text-align:center;
  background: var(--total-bg);
  color: var(--total-color);
  border-radius: var(--total-radius);
  padding: var(--total-pad-y) var(--total-pad-x) !important;
  margin: var(--total-mt) var(--total-mx) var(--total-mb) var(--total-mx);
  border: 0 !important;
  font-size: 1.1vw!important;
  letter-spacing: var(--total-letter-spacing) !important;
  line-height: 1vw !important;
}

/* Cambia etichetta “Subtotale:” in “Totale:” */
.kx-mini-cart .elementor-menu-cart__subtotal strong{ display:none !important; }
.kx-mini-cart .elementor-menu-cart__subtotal::before{
  content:"Totale:"; color:var(--total-color); margin-right:.5ch;
  letter-spacing: inherit;
}

/* Importo e label IVA (gap e allineamento regolabili) */
.kx-mini-cart .elementor-menu-cart__subtotal .woocommerce-Price-amount{
  color: var(--total-color) !important;
  font-size: 0.9vw !important;
  letter-spacing: inherit !important;
}
.kx-mini-cart .elementor-menu-cart__subtotal .tax_label{
  font-size: 0 !important;
  margin-left: var(--tax-gap) !important;
  visibility: visible !important;
  position: relative !important;
  display: inline-block !important;
  vertical-align: baseline !important;
}
.kx-mini-cart .elementor-menu-cart__subtotal .tax_label::after{
  content:"(IVA inclusa)";
  position: relative; top: var(--tax-shift-y);
  margin-bottom: var(--tax-mb);
  display:inline-block;
  font-size: 0.9vw;
  color: var(--total-color);
  font-family: var(--tax-font-family, inherit);
  font-weight: var(--tax-font-weight, 700);
  letter-spacing: var(--total-letter-spacing);
  line-height: 1;
}

/* SOLO “Visualizza carrello” centrato con dimensioni regolabili (padding top/bottom separati) */
.kx-mini-cart .elementor-menu-cart__footer-buttons .elementor-button--checkout{ display:none !important; }
.kx-mini-cart .elementor-menu-cart__footer-buttons{
  display:flex; justify-content:center; padding-top:.6rem;
}
.kx-mini-cart .elementor-menu-cart__footer-buttons .elementor-button--view-cart{
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
  border-radius:999px; background:transparent; border:3px solid #000; color:#000 !important;
  font-family:"Nasalization","nasalization","Nasalization Rg",system-ui,sans-serif; font-weight:600;
  font-size: var(--view-btn-font-size) !important;
  padding: var(--view-btn-pt) var(--view-btn-px) var(--view-btn-pb) var(--view-btn-px) !important;
  width:auto !important; line-height:1 !important;
}
.kx-mini-cart .elementor-menu-cart__footer-buttons .elementor-button--view-cart .elementor-button-text{
  font-size: inherit !important; line-height: inherit !important;
}
.kx-mini-cart .elementor-menu-cart__footer-buttons .elementor-button--view-cart:hover{
  color:#fff !important; background:linear-gradient(90deg,#FF00D4,#00D2FF); border-color:#000;
}

/* Nascondi “Nessun prodotto nel carrello.” SOLO nel nostro mini-carrello */
.kx-mini-cart .woocommerce-mini-cart__empty-message{ display:none !important; }

/* Responsive */
@media (max-width: 1280px){ .kx-mini-cart{ --thumb: 120px; } }
@media (max-width: 1024px){ .kx-mini-cart{ --thumb: 100px; } }

/* ——— Override rapido (modifica liberamente) ——— */
.kx-mini-cart{
  /* Bottone */
  --view-btn-font-size: 1vw;
  --view-btn-pt: 0.3vw;
  --view-btn-pb: 0.6vw;
  --view-btn-px: 6vw;

  /* Totale */
  --total-font-size: 1.4vw;
  --total-amount-font-size: 1.2vw;
  --total-letter-spacing: 0.03vw;
  --total-radius: 0;

  /* Label IVA */
  --tax-gap: 0vw;
  --tax-font-weight: 700;
  --tax-shift-y: -0.06em; /* alza leggermente la label */
  --tax-mb: 0; /* margine sotto label */
}
/* ===== CART BADGE (numero articoli sul pulsante carrello) ===== */

#icon-cart .e-n-menu-title-container{
  position: relative;          /* gancio per il posizionamento assoluto del badge */
  overflow: visible;
}

/* Bolla/Badge in alto a destra dell’icona */
#icon-cart .kx-cart-count{
  position: absolute;
  top: -2vw;                   /* 🔧 regola se serve */
  right: -10px;                /* 🔧 regola se serve */
  z-index: 10;

  /* forza il layout del badge, ignorando inline strani */
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  /* dimensioni fluide: cerchio per 1 cifra, “pill” per 2+ */
  --badge-h: clamp(18px, 1.6vw, 28px);
  height: var(--badge-h);
  min-width: var(--badge-h);
  padding-inline: .35em;

  /* look & feel */
  background: linear-gradient(135deg,#ff33cc,#00ddff);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);

  line-height: 1;
  font-weight: 700;
  font-size: clamp(11px,.9vw,14px) !important; /* batte la size inline */
}

/* Il numero eredita la size dal badge (batte la inline) */
#icon-cart .kx-cc-num{
  font-size: inherit !important;
  line-height: 1;
}

/* Nascondi quando è 0 o non inizializzato */
#icon-cart .kx-cart-count[data-count="0"],
#icon-cart .kx-cart-count:empty{
  display: none !important;
}

/* Fine-tuning opzionale per alcuni laptop */
@media (min-width:1280px) and (max-width:1536px){
  #icon-cart .kx-cart-count{ top:-2vw; right:-8px; }
}
