/* ════════════════════════════════════════════════════════════════
   FMW · Pagina unica carrello + checkout (v7.25.0)
   CSS aggressivo per battere Flatsome: body.woocommerce-* + !important
   sui punti dove il tema lotta (place_order, layout 2-col, pulsanti).
   ════════════════════════════════════════════════════════════════ */

.fmw-shop-page {
  --fmw-s-brand:   #2A2F3A;
  --fmw-s-brand-d: #1a1d24;
  --fmw-s-brand-l: #3a4050;
  --fmw-s-line:    #e8eaf0;
  --fmw-s-line-2:  #d8dbe4;
  --fmw-s-bg:      #f7f8fb;
  --fmw-s-text:    #1f2330;
  --fmw-s-muted:   #5a5e6a;
  --fmw-s-radius:  10px;
  --fmw-s-radius-sm: 6px;

  font-family: -apple-system, "Inter", system-ui, sans-serif;
  color: var(--fmw-s-text);
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 24px 48px;
  line-height: 1.5;
}
.fmw-shop-page,
.fmw-shop-page * {
  box-sizing: border-box;
}

/* ═══ Grid 2-col globale ═══════════════════════════════════════ */
.fmw-shop-page .fmw-uc-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  gap: 32px;
  align-items: start;
}
@media (max-width: 980px) {
  .fmw-shop-page .fmw-uc-grid {
    grid-template-columns: 1fr !important;
  }
}
.fmw-shop-page .fmw-uc-grid-main { min-width: 0; }
.fmw-shop-page .fmw-uc-grid-side {
  position: sticky;
  top: 84px;
  align-self: start;
}
@media (max-width: 980px) {
  .fmw-shop-page .fmw-uc-grid-side { position: static; }
}

/* ═══ Stepper ════════════════════════════════════════════════ */
.fmw-shop-page .fmw-uc-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 0 36px;
  max-width: 760px;
  margin: 0 auto;
}
.fmw-shop-page .fmw-uc-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--fmw-s-muted);
  text-decoration: none !important;
  font-size: .9rem;
  transition: background .15s, color .15s;
  white-space: nowrap;
  border: none;
}
.fmw-shop-page .fmw-uc-step.active {
  background: var(--fmw-s-brand);
  color: #fff;
}
.fmw-shop-page .fmw-uc-step:hover:not(.active) { color: var(--fmw-s-text); }
.fmw-shop-page .fmw-uc-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.08);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600;
}
.fmw-shop-page .fmw-uc-step.active .fmw-uc-step-num { background: rgba(255,255,255,.22); }
.fmw-shop-page .fmw-uc-step-sep { flex: 1; height: 1px; background: var(--fmw-s-line); }

/* ═══ Sezioni ════════════════════════════════════════════════ */
.fmw-shop-page .fmw-uc-section {
  padding: 28px 0 40px;
  border-top: 1px solid var(--fmw-s-line);
  margin-top: 12px;
  scroll-margin-top: 80px;
}
.fmw-shop-page .fmw-uc-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.fmw-shop-page .fmw-uc-section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.fmw-shop-page .fmw-uc-section-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--fmw-s-brand);
  color: #fff;
  font-size: .95rem; font-weight: 600;
  flex-shrink: 0;
}
.fmw-shop-page .fmw-uc-section-title {
  font-size: 1.35rem; font-weight: 500; margin: 0;
  color: var(--fmw-s-text);
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.fmw-shop-page .fmw-uc-section-meta {
  margin-left: auto;
  font-size: .85rem;
  color: var(--fmw-s-muted);
}

/* ═══ Cart items ═════════════════════════════════════════════ */
.fmw-shop-page .fmw-uc-cart-items {
  display: flex; flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.fmw-shop-page .fmw-uc-item {
  display: grid;
  grid-template-columns: 88px 1fr 120px 100px 40px;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--fmw-s-line);
  border-radius: var(--fmw-s-radius);
}
.fmw-shop-page .fmw-uc-item-thumb img {
  width: 88px; height: 88px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  background: var(--fmw-s-bg);
}
.fmw-shop-page .fmw-uc-item-name a {
  color: var(--fmw-s-text) !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.4;
}
.fmw-shop-page .fmw-uc-item-name a:hover { color: var(--fmw-s-brand) !important; }
.fmw-shop-page .fmw-uc-item-meta {
  font-size: .8rem;
  color: var(--fmw-s-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.fmw-shop-page .fmw-uc-item-meta p,
.fmw-shop-page .fmw-uc-item-meta dl { margin: 0; }
.fmw-shop-page .fmw-uc-item-price {
  font-size: .84rem;
  color: var(--fmw-s-muted);
  margin-top: 5px;
}
.fmw-shop-page .fmw-uc-item-qty .quantity {
  display: inline-flex !important;
  border: 1px solid var(--fmw-s-line) !important;
  border-radius: 6px !important;
  overflow: hidden;
  background: #fff;
}
.fmw-shop-page .fmw-uc-item-qty input.qty {
  width: 60px; height: 38px;
  padding: 0 6px;
  border: none !important;
  text-align: center;
  font-size: .9rem;
  background: #fff !important;
  color: var(--fmw-s-text);
  -moz-appearance: textfield;
  box-shadow: none !important;
}
.fmw-shop-page .fmw-uc-item-qty input.qty::-webkit-outer-spin-button,
.fmw-shop-page .fmw-uc-item-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fmw-shop-page .fmw-uc-item-subtotal {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fmw-s-text);
  text-align: right;
}
.fmw-shop-page .fmw-uc-item-actions { text-align: center; }
.fmw-shop-page .fmw-uc-item-actions .remove,
.fmw-shop-page .fmw-uc-item-actions a.remove {
  color: var(--fmw-s-muted) !important;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none !important;
  background: transparent !important;
  width: auto !important;
  height: auto !important;
}
.fmw-shop-page .fmw-uc-item-actions .remove:hover { color: #ef4444 !important; }
.fmw-shop-page .fmw-uc-icon-btn {
  display: inline-flex !important;
  width: 36px !important; height: 36px !important;
  align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--fmw-s-muted) !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: color .15s, background .15s;
}
.fmw-shop-page .fmw-uc-icon-btn:hover { background: #fef2f2 !important; color: #ef4444 !important; }

/* ═══ Cart bottom actions ═════════════════════════════════════ */
.fmw-shop-page .fmw-uc-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 8px;
  margin-bottom: 20px;
}
.fmw-shop-page .fmw-uc-link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fmw-s-muted) !important;
  text-decoration: none !important;
  font-size: .88rem;
  padding: 8px 0;
}
.fmw-shop-page .fmw-uc-link-back:hover { color: var(--fmw-s-text) !important; }
.fmw-shop-page .fmw-uc-btn-update {
  padding: 9px 18px !important;
  background: #fff !important;
  color: var(--fmw-s-muted) !important;
  border: 1px solid var(--fmw-s-line) !important;
  border-radius: 6px !important;
  font-size: .84rem !important;
  cursor: pointer;
  text-shadow: none !important;
  box-shadow: none !important;
  font-weight: 500;
  font-family: inherit;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.4;
  height: auto !important;
}
.fmw-shop-page .fmw-uc-btn-update:hover {
  color: var(--fmw-s-text) !important;
  border-color: var(--fmw-s-text) !important;
  background: #fff !important;
}

/* ═══ Coupon ═════════════════════════════════════════════════ */
.fmw-shop-page .fmw-uc-coupon {
  padding: 18px 20px;
  background: var(--fmw-s-bg);
  border-radius: var(--fmw-s-radius);
  margin-bottom: 4px;
}
.fmw-shop-page .fmw-uc-coupon label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--fmw-s-text);
  text-transform: none;
  letter-spacing: 0;
}
.fmw-shop-page .fmw-uc-coupon-row { display: flex; gap: 8px; }
.fmw-shop-page .fmw-uc-coupon-row input {
  flex: 1;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--fmw-s-line) !important;
  border-radius: 6px !important;
  font-size: .9rem;
  background: #fff !important;
  color: var(--fmw-s-text);
  box-shadow: none !important;
}
.fmw-shop-page .fmw-uc-coupon-row input:focus {
  outline: none;
  border-color: var(--fmw-s-brand) !important;
}
.fmw-shop-page .fmw-uc-btn-primary,
.fmw-shop-page .fmw-uc-coupon-row button {
  padding: 0 20px !important;
  height: 40px !important;
  background: var(--fmw-s-brand) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: .9rem !important;
  cursor: pointer;
  text-shadow: none !important;
  box-shadow: none !important;
  font-weight: 500;
  font-family: inherit;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.fmw-shop-page .fmw-uc-btn-primary:hover,
.fmw-shop-page .fmw-uc-coupon-row button:hover { background: var(--fmw-s-brand-d) !important; color: #fff !important; }

/* ═══ Sidebar: Riepilogo carrello ════════════════════════════ */
.fmw-shop-page .fmw-uc-summary {
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--fmw-s-line);
  border-radius: var(--fmw-s-radius);
}
.fmw-shop-page .fmw-uc-summary-title {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 18px !important;
  color: var(--fmw-s-text);
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: inherit;
}
.fmw-shop-page .fmw-uc-summary .cart_totals h2,
.fmw-shop-page .fmw-uc-summary .cart_totals > h2 { display: none !important; }
.fmw-shop-page .fmw-uc-summary table.shop_table,
.fmw-shop-page .fmw-uc-summary table.shop_table_responsive {
  width: 100%;
  border-collapse: collapse;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
}
.fmw-shop-page .fmw-uc-summary table th,
.fmw-shop-page .fmw-uc-summary table td {
  border: none !important;
  background: transparent !important;
  padding: 10px 0 !important;
  text-align: right;
}
.fmw-shop-page .fmw-uc-summary table th {
  text-align: left;
  font-weight: 500;
  font-size: .88rem;
  color: var(--fmw-s-muted) !important;
  width: 50%;
}
.fmw-shop-page .fmw-uc-summary table td {
  font-size: .92rem;
  color: var(--fmw-s-text);
}
.fmw-shop-page .fmw-uc-summary tr.cart-subtotal,
.fmw-shop-page .fmw-uc-summary tr.shipping,
.fmw-shop-page .fmw-uc-summary tr.tax-rate,
.fmw-shop-page .fmw-uc-summary tr.fee {
  border-bottom: 1px solid var(--fmw-s-line);
}
.fmw-shop-page .fmw-uc-summary tr.order-total th,
.fmw-shop-page .fmw-uc-summary tr.order-total td {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--fmw-s-text) !important;
  padding-top: 14px !important;
}
.fmw-shop-page .fmw-uc-summary tr.shipping ul,
.fmw-shop-page .fmw-uc-summary tr.shipping li { list-style: none !important; padding: 0; margin: 0; font-size: .85rem; }
.fmw-shop-page .fmw-uc-summary tr.shipping label { font-weight: normal; font-size: .85rem; }

.fmw-shop-page .fmw-uc-btn-proceed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px !important;
  background: var(--fmw-s-brand) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: .98rem !important;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  width: 100%;
  margin-top: 18px;
  text-shadow: none !important;
  box-shadow: none !important;
  font-family: inherit;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.fmw-shop-page .fmw-uc-btn-proceed:hover { background: var(--fmw-s-brand-d) !important; color: #fff !important; }
.fmw-shop-page .fmw-uc-btn-proceed svg { transition: transform .15s; }
.fmw-shop-page .fmw-uc-btn-proceed:hover svg { transform: translateX(2px); }

.fmw-shop-page .fmw-uc-shipping-toggle {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--fmw-s-muted);
}
.fmw-shop-page .fmw-uc-shipping-toggle summary { cursor: pointer; padding: 8px 0; }
.fmw-shop-page .fmw-uc-shipping-toggle[open] summary { color: var(--fmw-s-text); font-weight: 500; }

/* ═══ Badges (header checkout) ═══════════════════════════════ */
.fmw-shop-page .fmw-uc-badges {
  display: flex; gap: 10px;
  flex-wrap: wrap;
  margin: -10px 0 24px;
}
.fmw-shop-page .fmw-uc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--fmw-s-bg);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--fmw-s-text);
  font-weight: 500;
}
.fmw-shop-page .fmw-uc-badge svg { color: var(--fmw-s-brand); }

/* ═══ Checkout form (form-checkout.php override) ═════════════ */
.fmw-shop-page .fmw-uc-checkout-form .fmw-uc-grid {
  margin-top: 8px;
}
.fmw-shop-page #customer_details,
.fmw-shop-page .fmw-uc-customer-details {
  background: #fff;
  border: 1px solid var(--fmw-s-line);
  border-radius: var(--fmw-s-radius);
  padding: 24px 28px;
}
.fmw-shop-page .woocommerce-billing-fields > h3,
.fmw-shop-page .woocommerce-shipping-fields > h3,
.fmw-shop-page .woocommerce-additional-fields > h3 {
  font-size: 1rem !important;
  font-weight: 500 !important;
  margin: 0 0 16px !important;
  padding: 0 0 10px !important;
  color: var(--fmw-s-text) !important;
  border-bottom: 1px solid var(--fmw-s-line);
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: inherit !important;
}
.fmw-shop-page .woocommerce-billing-fields,
.fmw-shop-page .woocommerce-shipping-fields,
.fmw-shop-page .woocommerce-additional-fields { margin-bottom: 20px; }

.fmw-shop-page .form-row {
  margin-bottom: 14px !important;
  padding: 0 !important;
}
.fmw-shop-page .form-row label {
  display: block !important;
  font-size: .82rem !important;
  margin-bottom: 6px !important;
  color: var(--fmw-s-text) !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.fmw-shop-page input.input-text,
.fmw-shop-page textarea.input-text,
.fmw-shop-page textarea,
.fmw-shop-page select,
.fmw-shop-page .select2-container .select2-selection,
.fmw-shop-page .select2-container--default .select2-selection--single {
  border: 1px solid var(--fmw-s-line) !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  font-size: .92rem !important;
  background: #fff !important;
  color: var(--fmw-s-text) !important;
  height: auto !important;
  min-height: 42px;
  box-shadow: none !important;
  font-family: inherit !important;
}
.fmw-shop-page input.input-text:focus,
.fmw-shop-page textarea.input-text:focus,
.fmw-shop-page select:focus {
  outline: none !important;
  border-color: var(--fmw-s-brand) !important;
}

/* ═══ Sidebar: Il tuo ordine (review-order) ═════════════════ */
.fmw-shop-page .fmw-uc-order-card {
  background: #fff;
  border: 1px solid var(--fmw-s-line);
  border-radius: var(--fmw-s-radius);
  padding: 24px 26px;
}
.fmw-shop-page .fmw-uc-order-title,
.fmw-shop-page #order_review_heading {
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border-bottom: none !important;
  color: var(--fmw-s-text) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: inherit !important;
}
.fmw-shop-page .woocommerce-checkout-review-order-table {
  width: 100%;
  border: none !important;
  margin-bottom: 18px !important;
  background: transparent !important;
}
.fmw-shop-page .woocommerce-checkout-review-order-table th,
.fmw-shop-page .woocommerce-checkout-review-order-table td {
  border: none !important;
  border-bottom: 1px solid var(--fmw-s-line) !important;
  padding: 12px 0 !important;
  font-size: .9rem !important;
  background: transparent !important;
  text-align: right;
}
.fmw-shop-page .woocommerce-checkout-review-order-table th { font-weight: 500; text-align: left; color: var(--fmw-s-muted); }
.fmw-shop-page .woocommerce-checkout-review-order-table tr.order-total th,
.fmw-shop-page .woocommerce-checkout-review-order-table tr.order-total td {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--fmw-s-text) !important;
  border-bottom: none !important;
  padding-top: 14px !important;
}
.fmw-shop-page .woocommerce-checkout-review-order-table thead th { color: var(--fmw-s-muted) !important; font-size: .75rem !important; text-transform: uppercase; letter-spacing: .04em; padding-top: 0 !important; }

.fmw-shop-page #payment {
  background: transparent !important;
  border-radius: 0 !important;
  margin-top: 16px;
}
.fmw-shop-page #payment ul.payment_methods {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
}
.fmw-shop-page #payment ul.payment_methods li {
  background: #fff !important;
  border: 1px solid var(--fmw-s-line) !important;
  border-radius: 6px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  list-style: none !important;
}
.fmw-shop-page #payment ul.payment_methods li label { font-weight: 500 !important; font-size: .9rem !important; color: var(--fmw-s-text) !important; }
.fmw-shop-page #payment .payment_box {
  background: var(--fmw-s-bg) !important;
  border-radius: 6px !important;
  padding: 14px !important;
  margin-top: 10px !important;
  font-size: .85rem !important;
  color: var(--fmw-s-muted) !important;
}
.fmw-shop-page #payment .payment_box::before { display: none !important; }

.fmw-shop-page .woocommerce-terms-and-conditions-wrapper {
  background: transparent !important;
  padding: 12px 0 !important;
}

/* ═══ ✦ Pulsante "Effettua ordine" — grafite forzato ═══════ */
body.woocommerce-cart .fmw-shop-page #place_order,
body.woocommerce-checkout .fmw-shop-page #place_order,
body.woocommerce .fmw-shop-page #place_order,
.fmw-shop-page form.checkout #place_order,
.fmw-shop-page form.woocommerce-checkout #place_order,
.fmw-shop-page button#place_order {
  background-color: var(--fmw-s-brand) !important;
  background: var(--fmw-s-brand) !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 14px 32px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: inherit !important;
  width: 100% !important;
  height: auto !important;
  line-height: 1.4 !important;
  margin-top: 16px !important;
  cursor: pointer;
}
body.woocommerce-cart .fmw-shop-page #place_order:hover,
body.woocommerce-checkout .fmw-shop-page #place_order:hover,
.fmw-shop-page #place_order:hover {
  background-color: var(--fmw-s-brand-d) !important;
  background: var(--fmw-s-brand-d) !important;
  color: #fff !important;
}

/* ═══ Avvisi (notice) ═══════════════════════════════════════ */
.fmw-shop-page .woocommerce-message,
.fmw-shop-page .woocommerce-info {
  background: #f0f6ff !important;
  border-left: 3px solid var(--fmw-s-brand) !important;
  color: var(--fmw-s-text) !important;
  padding: 12px 16px !important;
  margin-bottom: 16px !important;
  border-radius: 0 6px 6px 0 !important;
}
.fmw-shop-page .woocommerce-error {
  background: #fef2f2 !important;
  border-left: 3px solid #ef4444 !important;
  color: #991b1b !important;
}

/* ═══ Responsive ═════════════════════════════════════════════ */
@media (max-width: 820px) {
  .fmw-shop-page { padding: 4px 14px 32px; }
  .fmw-shop-page .fmw-uc-item {
    grid-template-columns: 72px 1fr 36px;
    gap: 12px;
    grid-template-areas:
      "thumb body remove"
      "thumb qty subtotal";
  }
  .fmw-shop-page .fmw-uc-item-thumb { grid-area: thumb; }
  .fmw-shop-page .fmw-uc-item-thumb img { width: 72px; height: 72px; }
  .fmw-shop-page .fmw-uc-item-body { grid-area: body; }
  .fmw-shop-page .fmw-uc-item-qty { grid-area: qty; }
  .fmw-shop-page .fmw-uc-item-subtotal { grid-area: subtotal; text-align: right; align-self: end; }
  .fmw-shop-page .fmw-uc-item-actions { grid-area: remove; align-self: start; }
  .fmw-shop-page .fmw-uc-stepper { padding: 18px 0 28px; }
  .fmw-shop-page .fmw-uc-step-label { display: none; }
  .fmw-shop-page .fmw-uc-step { padding: 8px 12px; }
  .fmw-shop-page #customer_details,
  .fmw-shop-page .fmw-uc-customer-details { padding: 18px 20px; }
  .fmw-shop-page .fmw-uc-summary,
  .fmw-shop-page .fmw-uc-order-card { padding: 18px 20px; }
  .fmw-shop-page .fmw-uc-cart-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .fmw-shop-page .fmw-uc-section-title { font-size: 1.15rem; }
}
