/* ==========================================================================
   Slide carrello (mini-cart) — Impreza w-cart pannello destro
   Figma "My SpaceWork" node 220:7947 (Chart modal).
   Server-render header/footer (pmc-mini-cart-figma.php) + JS item via Store API.
   Auto-caricato dal loader ricorsivo Impreza. Scope: .w-cart.
   Token Figma:
     Dark charcoal #080707 · Charcoal #3F3A35 · Light charcoal #766F67
     Ashes (bordo) #DCD4CD · Sfondo #F9F1E3
     Navy gradient #41476F → #262A42 · Light blue #E6EDFF
   ========================================================================== */

/* ---- Pannello: crema, 450px, flex column con footer pinned ----
   NB: NON impostare position/height: il tema mette .w-cart-content in
   position:fixed height:100% quando il pannello è aperto (contenitore per la
   × absolute). Aggiungo solo flex column + scroll + larghezza/sfondo. */
.w-cart.layout_right_panel .w-cart-content {
  width: 450px;
  max-width: 92vw;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #F9F1E3;
  overflow-y: auto;
}
.w-cart .widget.woocommerce.widget_shopping_cart {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 0;
  background: transparent;
}
.w-cart .widget_shopping_cart_content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}
.w-cart ul.woocommerce-mini-cart.cart_list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* ---- Close × (nativo Impreza): allineato all'header ---- */
.w-cart .w-cart-closer {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 24px;
  height: 24px;
  color: #080707;
  z-index: 2;
}
.w-cart .w-cart-closer:hover { opacity: .6; }

/* ---- Header "Shopping chart" ---- */
.w-cart .pmc-mc-head {
  display: flex;
  align-items: center;
  padding: 24px 72px 24px 32px; /* spazio a destra per la × */
  border-bottom: 1px solid #766F67;
}
.w-cart .pmc-mc-head .pmc-mc-title {
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  color: #080707;
}

/* ---- Item: [img 72] [nome + (stepper · prezzo)] [×] ---- */
.w-cart li.woocommerce-mini-cart-item.mini_cart_item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 32px;
  border-bottom: 1px solid #DCD4CD;
  list-style: none;
}
.w-cart li.mini_cart_item::before { display: none; }

.w-cart .pmc-mc-img {
  flex: 0 0 72px;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.w-cart .pmc-mc-img img {
  max-width: 72px;
  max-height: 72px;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
}

.w-cart .pmc-mc-mid {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Nome: Lora Bold Italic 16 #3F3A35, ellissi su una riga */
.w-cart .pmc-mc-name {
  display: block;
  max-width: 100%;
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: #3F3A35 !important;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-cart .pmc-mc-name:hover { opacity: .75; }

/* Riga stepper + prezzo */
.w-cart .pmc-mc-line {
  display: flex;
  align-items: center;
  gap: 24px;
}
.w-cart .pmc-mc-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.w-cart .pmc-mc-stepper .pmc-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #080707;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: none;
}
.w-cart .pmc-mc-stepper .pmc-qty-btn svg { display: block; width: 100%; height: 100%; }
.w-cart .pmc-mc-stepper .pmc-qty-btn:hover { opacity: .7; }
.w-cart .pmc-mc-stepper .pmc-mc-qtynum {
  min-width: 22px;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: #080707;
  text-align: center;
}
/* Prezzo riga: Helvetica Medium 16 */
.w-cart .pmc-mc-price {
  font-family: "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #080707;
  white-space: nowrap;
}
.w-cart .pmc-mc-price .amount { color: #080707; }

/* Remove × item (16px) */
.w-cart li.mini_cart_item a.remove.remove_from_cart_button {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1;
  color: #080707 !important;
  background: transparent !important;
  border-radius: 0;
}
.w-cart li.mini_cart_item a.remove.remove_from_cart_button:hover { opacity: .6; }

/* ---- Native total + buttons: nascosti (rimpiazzati dal footer custom) ---- */
.w-cart p.woocommerce-mini-cart__total.total,
.w-cart p.woocommerce-mini-cart__buttons.buttons { display: none !important; }

/* ---- Footer pinned in basso ---- */
.w-cart .pmc-mc-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid #766F67;
}
.w-cart .pmc-mc-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-family: "Lora", serif;
  font-style: italic;
  color: #080707;
}
.w-cart .pmc-mc-subtotal .pmc-mc-sub-lbl { font-weight: 600; font-size: 18px; line-height: 1.2; }
.w-cart .pmc-mc-subtotal .pmc-mc-sub-val { font-weight: 700; font-size: 24px; line-height: 1.2; }
.w-cart .pmc-mc-subtotal .pmc-mc-sub-val .amount { color: #080707; }

.w-cart .pmc-mc-btns {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 32px;
}
.w-cart .pmc-mc-btns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 10px 24px;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  text-decoration: none;
  border-radius: 999px;
}
/* View cart = azzurrino */
.w-cart .pmc-mc-btns a.pmc-mc-viewcart {
  color: #262A42 !important;
  background: #E6EDFF;
  border: 1px solid rgba(37, 57, 112, .16);
  box-shadow: none;
}
/* Checkout = navy gradient, testo crema-gradient, bordo bianco + shadow */
.w-cart .pmc-mc-btns a.pmc-mc-checkout {
  background: linear-gradient(96.18deg, #41476F 0%, #262A42 100%);
  border: 1px solid #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .16);
}
.w-cart .pmc-mc-btns a.pmc-mc-checkout span {
  background: linear-gradient(180deg, #FFF3DD 0%, #E1CFAC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.w-cart .pmc-mc-btns a.pmc-mc-checkout:hover { filter: brightness(1.08); }

/* ---- Carrello vuoto ---- */
.w-cart .woocommerce-mini-cart__empty-message,
.w-cart p.woocommerce-mini-cart__empty-message {
  padding: 24px 32px;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 15px;
  color: #3F3A35;
}
