/* --- Importazione Font (da design Figma) --- */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&family=Forum&family=Manrope:wght@300&family=Questrial&display=swap");
/* NOTA: Il font "Tanker" non è su Google Fonts. 
  Assicurati che sia caricato nel tuo tema, ad esempio:
  @font-face {
    font-family: 'Tanker';
    src: url('/path/to/tanker-regular.woff2') format('woff2');
  }
*/

/* --- Variabili Colore (da design Figma e originali) --- */
:root {
  --green: #8fbc8f;
  --seage: #788f56;
  --gold: #dbab60;
  --grey: #b5b5b5;
  --light-grey: rgba(181, 181, 181, 0.2);
  --dark: #0a0a0a;
  --white: #fff;
  --ivory: #f5f5f5;

  /* Mantenimento variabili originali se usate altrove */
  --bianco: #fff;
  --avorio: #f5f5f5;
  --nero: #2d2d2d;
  --oro: #dbab60;
  --grigio: #b5b5b5;
  --verde: #8fbc8f;
}

/* --- Override Contenitore Offcanvas --- */
.offcanvas.offcanvas-end {
  width: 549px !important; /* Larghezza da Figma */
  background: var(--white);
  color: var(--dark);
  /* Rimuoviamo il padding globale e lo applichiamo alle sezioni */
}

/* --- Override Header --- */
.offcanvas-header {
  padding: 40px 40px 16px 40px; /* Padding da Figma */
  border-bottom: none; /* Niente bordi nel nuovo design */
  justify-content: space-between;
  align-items: flex-start;
}

#offcanvasCartLabel {
  font-family: "Tanker", sans-serif;
  font-size: 40px;
  color: var(--dark);
  font-weight: 400;
}
#offcanvasCartLabel i {
  display: none; /* Nasconde l'icona carrello originale */
}

.offcanvas-header .btn-close {
  width: 30px;
  height: 30px;
  background: none;
  opacity: 1;
  position: relative;
  margin-top: 10px; /* Allineamento con titolo */
  transition: transform 0.3s ease;
}

.offcanvas-header .btn-close::before,
.offcanvas-header .btn-close::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  width: 20px;
  height: 2px;
  background-color: var(--dark);
  transform: rotate(45deg);
}
.offcanvas-header .btn-close::after {
  transform: rotate(-45deg);
}
.offcanvas-header .btn-close:focus {
  box-shadow: none;
}

/* --- Override Body --- */
.offcanvas-body {
  padding: 0 40px 40px 40px; /* Padding laterale e inferiore */
  display: flex;
  flex-direction: column;
  gap: 17px;
}

/* --- Stile Stato Vuoto (Adattato) --- */
#mini-cart-empty {
  padding: 40px 0;
  text-align: center;
}
#mini-cart-empty i {
  font-size: 3rem;
  color: var(--grey);
}
#mini-cart-empty h6 {
  font-family: "Tanker", sans-serif;
  font-size: 20px;
  color: var(--grey);
  font-weight: 400;
}
#mini-cart-empty p {
  font-family: "DM Sans", sans-serif;
  color: var(--grey);
}
#mini-cart-empty .btn-bianco {
  display: inline-flex; /* Per centrare */
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 12px;
  height: 50px;
  font-family: "Tanker", sans-serif;
  font-size: 16px;
  font-weight: 400;
  padding: 10px 29px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
#mini-cart-empty .btn-bianco:hover {
  background: var(--seage);
  color: var(--white);
}

/* --- Stile Stato Caricamento (Adattato) --- */
#mini-cart-loading {
  padding: 40px 0;
}
#mini-cart-loading .spinner-border {
  color: var(--green);
}

/* --- Stile Lista Articoli --- */
#mini-cart-items {
  display: none; /* Mantiene la logica JS originale */
  flex-direction: column;
  gap: 16px;
}
/* IMPORTANTE: Aggiungi questo titolo nel tuo HTML
  dentro #mini-cart-items, prima di #cart-items-list 
*/
.mini-cart-items-title {
  font-family: "Tanker", sans-serif;
  font-size: 20px;
  color: var(--green);
  font-weight: 400;
}

#cart-items-list {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px; /* Spazio tra gli articoli */
}

/* IMPORTANTE: Questa è la nuova struttura per UN Articolo
  che il tuo JS deve generare dentro #cart-items-list
*/
.cart-item {
  display: flex;
  align-items: center;
  gap: 29px;
  padding-bottom: 10px;
  border-bottom: 1px var(--grey) solid;
}
.cart-item-image img {
  width: 44px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}
.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cart-item-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cart-item-name {
  font-family: "Tanker", sans-serif;
  font-size: 18px;
  color: var(--dark);
  font-weight: 400;
}
.cart-item-remove {
  background: none;
  border: none;
  padding: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  color: var(--dark);
}
/* Esempio con SVG inline per icona cestino */
.cart-item-remove svg {
  width: 100%;
  height: 100%;
}

.cart-item-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-item-price {
  font-family: "Tanker", sans-serif;
  font-size: 16px;
  color: var(--green);
  font-weight: 400;
}
.quantity-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 20px;
  padding: 10px;
  border-radius: 10px;
  outline: 1px var(--grey) solid;
  outline-offset: -1px;
}
.quantity-stepper .qty-btn,
.quantity-stepper .qty-display {
  font-family: "Manrope", sans-serif;
  font-weight: 300;
  color: var(--dark);
  font-size: 16px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.quantity-stepper .qty-display {
  font-size: 18px;
  min-width: 20px; /* "01" */
  text-align: center;
  cursor: default;
}

/* --- Stile Cross-Sells (Richiede HTML aggiuntivo) --- */
.mini-cart-cross-sells {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cross-sells-title {
  color: var(--gold);
  font-size: 20px;
  font-family: Forum;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 20px;
}
.cross-sells-container {
  display: flex;
  gap: 17px;
  overflow-x: auto; /* Per lo scroll orizzontale se non ci stanno */
  padding-bottom: 10px;
}
/* ... (Stili per le card cross-sell, se necessario) ... */

/* --- Override Footer --- */
.offcanvas-footer {
  padding: 40px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 17px; /* Gap da Figma */
}

/* Totale */
.offcanvas-footer .d-flex.flex-column {
  gap: 2px;
}
.offcanvas-footer .d-flex.flex-column .forum {
  /* Label "TOTALE" */
  font-family: "Tanker", sans-serif;
  font-size: 20px;
  color: var(--dark);
  font-weight: 400;
  text-transform: none; /* Rimuove uppercase originale */
  line-height: 1.2;
}
.offcanvas-footer .etinet-cart-total {
  font-family: "Tanker", sans-serif;
  font-size: 35px;
  color: var(--green);
  font-weight: 400;
  line-height: 1;
}
/* Pulisce stili woocommerce */
.etinet-cart-total .woocommerce-Price-amount,
.etinet-cart-total .woocommerce-Price-currencySymbol {
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  text-decoration: none;
  bdi {
    font-weight: inherit;
  }
}

/* Pulsanti Footer */
.offcanvas-footer .d-grid {
  gap: 10px; /* Gap tra i pulsanti */
}
/* Pulsante "Vai al carrello" */
.offcanvas-footer .btn-avorio {
  background: var(--ivory);
  color: var(--green);
  border: 1px solid var(--white);
  border-radius: 12px;
  height: 50px;
  font-family: "Tanker", sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: none;
  margin-top: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.offcanvas-footer .btn-avorio:hover {
  background: #e0e0e0; /* Leggermente più scuro */
  color: var(--seage);
  border-color: var(--white);
}

/* Pulsante "Procedi al checkout" (Acquista come ospite) */
.offcanvas-footer .btn-nero {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 12px;
  height: 50px;
  font-family: "Tanker", sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: none;
  margin-top: 0;
  transition: background-color 0.3s ease;
}
.offcanvas-footer .btn-nero:hover {
  background: var(--seage);
  color: var(--white);
}

/* --- Widget Spedizione Gratuita --- */
.etinet-fs-widget-container {
  margin-top: 10px; /* Spazio extra */
}
.etinet-free-shipping-widget {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
/* Totale attuale (es. "20€") */
.etinet-free-shipping-widget h3 {
  font-family: "Tanker", sans-serif;
  font-size: 25px;
  color: var(--green);
  font-weight: 400;
  letter-spacing: 0.75px;
  margin: 0;
  padding: 0;
  line-height: 1;
  text-align: left; /* Assicura allineamento */
}
/* Barra di progresso */
.free-shipping-bar {
  background: var(--light-grey);
  border-radius: 3px;
  height: 8px;
  margin: 0;
  overflow: hidden;
  width: 100%;
}
.free-shipping-fill {
  background: var(--seage); /* Nuovo colore fill */
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  /* Rimuove vecchia animazione shimmer */
}
.free-shipping-fill:after {
  display: none;
}
/* Messaggio (es. "Spendi ancora...") */
.etinet-free-shipping-widget p {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: var(--green);
  font-weight: 400;
  margin: 0;
}
.etinet-free-shipping-widget p strong {
  font-weight: 700;
}
/* Messaggio fisso (es. "Gli ordini superiori a...") */
.etinet-free-shipping-widget .d-flex {
  padding-top: 10px;
  gap: 10px;
  margin-top: 0;
  align-items: center;
}
.etinet-free-shipping-widget .d-flex span {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: var(--dark);
  line-height: 1.3;
}
.etinet-free-shipping-widget .d-flex img {
  width: 25px;
  height: 25px;
}

.etinet-cart-count {
  color: white;
}

.header-action.cart-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  gap: 4px;
}

.mini-cart-remove {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  text-decoration: none;
  display: inline-block;
}
