/* =========================================================
   11) FABER CART — PATCH FINALE LEGGERA
   ========================================================= */

/* Intro Avada */
.faber-cart-intro h1,
.faber-cart-intro .fusion-title-heading {
  margin: 0 0 10px;
  font-family: "Source Serif 4", serif;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 400;
  color: #1d1d1b;
}

.faber-cart-intro p {
  max-width: 760px;
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(29, 29, 27, 0.78);
}

/* Nasconde la scritta inglese sopra al carrello */
.woocommerce-cart .woocommerce-content-box.full-width.clearfix:first-of-type > h2 {
  display: none !important;
}

/* Nasconde cross-sell / upsell nel carrello */
.woocommerce-cart .cross-sells,
.woocommerce-cart .cross-sells-products,
.woocommerce-cart .upsells,
.woocommerce-cart .related,
.woocommerce-cart .related-products {
  display: none !important;
}

/* Box coupon e totale più morbidi */
.woocommerce-cart .woocommerce-content-box,
.woocommerce-cart .cart_totals {
  border-radius: 24px;
}

/* Titoli box */
.woocommerce-cart .woocommerce-content-box h2,
.woocommerce-cart .cart_totals h2 {
  font-family: "Source Serif 4", serif;
  font-weight: 400;
  color: #1d1d1b;
}

/* Bottoni secondari: coupon + aggiorna */
.woocommerce-cart .coupon .button,
.woocommerce-cart button[name="update_cart"],
.woocommerce-cart input[name="update_cart"],
.woocommerce-cart button[name="apply_coupon"],
.woocommerce-cart input[name="apply_coupon"] {
  background: #fff !important;
  color: #1d1d1b !important;
  border: 1px solid rgba(17, 87, 64, 0.18) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.22s ease;
}

.woocommerce-cart .coupon .button:hover,
.woocommerce-cart button[name="update_cart"]:hover,
.woocommerce-cart input[name="update_cart"]:hover,
.woocommerce-cart button[name="apply_coupon"]:hover,
.woocommerce-cart input[name="apply_coupon"]:hover {
  background: rgba(17, 87, 64, 0.04) !important;
  color: #115740 !important;
  border-color: rgba(17, 87, 64, 0.3) !important;
}

/* CTA checkout primaria */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  border-radius: 12px !important;
  background: #115740 !important;
  border: 1px solid #115740 !important;
  color: #fff !important;
  margin-bottom: 20px !important;
  box-shadow: none !important;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: #0d4734 !important;
  border-color: #0d4734 !important;
  color: #fff !important;
}

/* Più spazio coi pagamenti rapidi */
.woocommerce-cart .wc-stripe-cart-checkout-container,
.woocommerce-cart .wc-stripe-payment-request-wrapper,
.woocommerce-cart #wc-stripe-payment-request-wrapper {
  margin-top: 18px !important;
}

.woocommerce-cart .payment_request_separator {
  margin-top: 14px !important;
  margin-bottom: 14px !important;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: rgba(29, 29, 27, 0.42);
}

/* Shipment -> Spedizione */
.woocommerce-cart .cart_totals table.shop_table .shipping th {
  font-size: 0;
}

.woocommerce-cart .cart_totals table.shop_table .shipping th::before {
  content: "Spedizione";
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: rgba(29, 29, 27, 0.72);
}

/* Riga spedizione più leggibile */
.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method {
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method li {
  margin: 0 0 8px;
  padding: 0;
}

.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method li label {
  display: inline !important;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(29, 29, 27, 0.74);
}

.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method li label br {
  display: none !important;
}

.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method li label .amount,
.woocommerce-cart .cart_totals table.shop_table .shipping ul#shipping_method li label .woocommerce-Price-amount {
  display: inline !important;
  margin-left: 4px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1b;
}

/* Destinazione spedizione più leggera */
.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(29, 29, 27, 0.56);
}

/* Rassicurazioni */
.faber-cart-reassurances h3,
.faber-cart-reassurances .fusion-title-heading,
.faber-cart-reassurances strong {
  display: block;
  margin: 0 0 8px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  color: #1d1d1b;
}

.faber-cart-reassurances p {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.68;
  color: rgba(29, 29, 27, 0.72);
}

/* Mobile */
@media (max-width: 767px) {
  .faber-cart-intro h1,
  .faber-cart-intro .fusion-title-heading {
    font-size: 30px;
  }

  .woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    margin-bottom: 18px !important;
  }
}

/* =========================================================
   12) FABER FREE SHIPPING — CART E CHECKOUT
   ========================================================= */

.faber-free-shipping-notice {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(17, 87, 64, 0.05);
  border: 1px solid rgba(17, 87, 64, 0.10);
}

.faber-free-shipping-notice strong {
  display: block;
  margin: 0 0 4px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #115740;
}

.faber-free-shipping-notice > span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(29, 29, 27, 0.78);
}

.faber-free-shipping-notice .woocommerce-Price-amount,
.faber-free-shipping-notice .woocommerce-Price-currencySymbol,
.faber-free-shipping-notice .amount {
  display: inline !important;
  white-space: nowrap;
}

.faber-free-shipping-notice--reached {
  background: rgba(17, 87, 64, 0.07);
}

.faber-free-shipping-notice--not-available {
  background: rgba(29, 29, 27, 0.03);
  border-color: rgba(29, 29, 27, 0.08);
}

.faber-free-shipping-notice--not-available strong {
  color: #1d1d1b;
}

/* =========================================================
   13) FABER BAG ICONS
   - Torna al negozio
   - View Cart in My Account / Checkout
   - Nessun impatto sull’header
   ========================================================= */

/* Torna al negozio */
.woocommerce .return-to-shop a,
.woocommerce-cart .return-to-shop a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.woocommerce .return-to-shop a::before,
.woocommerce-cart .return-to-shop a::before {
  content: "\e903";
  font-family: "bag" !important;
  font-style: normal;
  font-weight: normal;
  speak: never;
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  color: currentColor;
  vertical-align: middle;
  transform: translateY(-1px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.woocommerce .return-to-shop a i,
.woocommerce-cart .return-to-shop a i,
.woocommerce .return-to-shop a svg,
.woocommerce-cart .return-to-shop a svg {
  display: none !important;
}

/* ---------------------------------------------------------
   Variante View Cart — My Account + Checkout
   --------------------------------------------------------- */

.woocommerce-account #main a[href*="cart"],
.woocommerce-account #main a[href*="carrello"],
.woocommerce-checkout #main a[href*="cart"],
.woocommerce-checkout #main a[href*="carrello"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.woocommerce-account #main a[href*="cart"]::before,
.woocommerce-account #main a[href*="carrello"]::before,
.woocommerce-checkout #main a[href*="cart"]::before,
.woocommerce-checkout #main a[href*="carrello"]::before {
  content: "\e903";
  font-family: "bag" !important;
  font-style: normal;
  font-weight: normal;
  speak: never;
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  color: currentColor;
  vertical-align: middle;
  transform: translateY(-1px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.woocommerce-account #main a[href*="cart"] i,
.woocommerce-account #main a[href*="cart"] svg,
.woocommerce-account #main a[href*="carrello"] i,
.woocommerce-account #main a[href*="carrello"] svg,
.woocommerce-checkout #main a[href*="cart"] i,
.woocommerce-checkout #main a[href*="cart"] svg,
.woocommerce-checkout #main a[href*="carrello"] i,
.woocommerce-checkout #main a[href*="carrello"] svg {
  display: none !important;
}

/* =========================================================
   14) FABER ORGANIC — CHECKOUT AVADA
   CSS definitivo unico — checkout classico
   ========================================================= */

/* -----------------------------------------
   1. TITOLI E TESTI
----------------------------------------- */

body.woocommerce-checkout h2,
body.woocommerce-checkout h3,
body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout #order_review_heading {
  margin: 0 0 22px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
  color: #1f241f;
}

body.woocommerce-checkout form .form-row label {
  display: block;
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: #2f342f;
}

body.woocommerce-checkout .required {
  color: inherit;
}

/* -----------------------------------------
   2. CAMPI FORM
----------------------------------------- */

body.woocommerce-checkout form .form-row {
  margin: 0 0 16px;
}

body.woocommerce-checkout form input.input-text,
body.woocommerce-checkout form textarea,
body.woocommerce-checkout form select,
body.woocommerce-checkout .select2-container--default .select2-selection--single {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid #dcd6cb;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.5;
  color: #2f342f;
}

body.woocommerce-checkout form textarea {
  min-height: 120px;
  resize: vertical;
}

body.woocommerce-checkout form input.input-text:focus,
body.woocommerce-checkout form textarea:focus,
body.woocommerce-checkout form select:focus,
body.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single,
body.woocommerce-checkout .select2-container--default.select2-container--open .select2-selection--single {
  outline: none;
  border-color: #cfc6b8;
  box-shadow: none;
}

body.woocommerce-checkout ::placeholder {
  color: #8a8a84;
  opacity: 1;
}

/* Select2 */
body.woocommerce-checkout .select2-container {
  width: 100% !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding: 0;
  line-height: 1.5;
  color: #2f342f;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 10px;
}

/* -----------------------------------------
   3. BILLING: tutto pieno
   tranne Nome e Cognome
----------------------------------------- */

body.woocommerce-checkout .woocommerce-billing-fields .form-row {
  float: none;
  width: 100%;
  clear: both;
}

body.woocommerce-checkout #billing_first_name_field,
body.woocommerce-checkout #billing_last_name_field {
  width: 48%;
  clear: none;
}

body.woocommerce-checkout #billing_first_name_field {
  float: left;
}

body.woocommerce-checkout #billing_last_name_field {
  float: right;
}

body.woocommerce-checkout .woocommerce-billing-fields::after {
  content: "";
  display: block;
  clear: both;
}

/* spazio corretto tra telefono e plugin fiscale */
body.woocommerce-checkout #billing_phone_field {
  margin-bottom: 16px !important;
}

body.woocommerce-checkout #billing_phone_field + .form-row,
body.woocommerce-checkout #billing_phone_field + p,
body.woocommerce-checkout #billing_phone_field + div {
  margin-top: 16px !important;
}

/* -----------------------------------------
   4. RADIO E CHECKBOX NATIVI
----------------------------------------- */

body.woocommerce-checkout input[type="radio"],
body.woocommerce-checkout input[type="checkbox"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  accent-color: #0f6a52 !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: static !important;
  transform: none !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  margin: 2px 8px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-checkout input[type="radio"]::before,
body.woocommerce-checkout input[type="radio"]::after,
body.woocommerce-checkout input[type="checkbox"]::before,
body.woocommerce-checkout input[type="checkbox"]::after {
  content: none !important;
  display: none !important;
}

/* -----------------------------------------
   5. SPEDIRE A UN INDIRIZZO DIVERSO
----------------------------------------- */

body.woocommerce-checkout #ship-to-different-address {
  margin: 10px 0 0;
  padding: 0;
}

body.woocommerce-checkout #ship-to-different-address label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

body.woocommerce-checkout #ship-to-different-address span {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: #4a4e4a;
}

body.woocommerce-checkout .shipping_address {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #e6dfd3;
  border-radius: 8px;
  background: #fcfbf8;
}

/* -----------------------------------------
   6. CHECKBOX SECONDARIE
----------------------------------------- */

body.woocommerce-checkout .woocommerce-account-fields,
body.woocommerce-checkout .create-account,
body.woocommerce-checkout .mailchimp-newsletter,
body.woocommerce-checkout .mc4wp-checkbox {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eee7dc;
}

body.woocommerce-checkout .woocommerce-account-fields label,
body.woocommerce-checkout .create-account label,
body.woocommerce-checkout .mailchimp-newsletter label,
body.woocommerce-checkout .mc4wp-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: #5d615d;
}

/* -----------------------------------------
   9. NOTE ORDINE
----------------------------------------- */

body.woocommerce-checkout .woocommerce-additional-fields {
  margin: 18px 0 20px;
  padding: 20px 22px;
  border: 1px solid #e8e2d7;
  border-radius: 8px;
  background: #fff;
}

body.woocommerce-checkout .woocommerce-additional-fields h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  color: #1f241f;
}

body.woocommerce-checkout .woocommerce-additional-fields textarea,
body.woocommerce-checkout textarea#order_comments {
  width: 100%;
  min-height: 120px;
}

/* -----------------------------------------
   10. MESSAGGIO SPEDIZIONE GRATUITA
----------------------------------------- */

body.woocommerce-checkout #payment > .woocommerce-info,
body.woocommerce-checkout .shop_table + .woocommerce-info {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid #d7e3da;
  border-radius: 8px;
  background: #f8fbf8;
  color: #465247;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: none;
}

/* -----------------------------------------
   11. PAGAMENTI
----------------------------------------- */

body.woocommerce-checkout #payment {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.woocommerce-checkout #payment ul.payment_methods {
  margin: 8px 0 0;
  padding: 0;
  border-top: 1px solid #e8e2d7;
  border-bottom: 0;
  background: transparent;
}

body.woocommerce-checkout #payment ul.payment_methods > li {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #eee7dc;
  list-style: none;
  line-height: 1.3;
}

body.woocommerce-checkout #payment ul.payment_methods > li:last-child {
  border-bottom: 0;
}

body.woocommerce-checkout #payment ul.payment_methods > li > label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  min-height: 16px;
}

body.woocommerce-checkout #payment div.payment_box {
  margin: 6px 0 0;
  padding: 14px 16px;
  border: 1px solid #e8e2d7;
  border-radius: 8px;
  background: #fff;
  color: #5d615d;
  font-size: 14px;
  line-height: 1.6;
}

body.woocommerce-checkout #payment div.payment_box::before {
  display: none;
}

/* -----------------------------------------
   12. PRIVACY / TERMINI / CTA
----------------------------------------- */

body.woocommerce-checkout #payment .woocommerce-privacy-policy-text,
body.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-checkout #payment .terms {
  margin-top: 12px;
}

body.woocommerce-checkout #payment .woocommerce-privacy-policy-text,
body.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper label,
body.woocommerce-checkout #payment .terms label {
  font-size: 13px;
  line-height: 1.6;
  color: #66685f;
}

body.woocommerce-checkout #payment #place_order {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

/* -----------------------------------------
   13. COUPON
----------------------------------------- */

body.woocommerce-checkout .woocommerce-form-coupon-toggle {
  margin-bottom: 18px;
}

body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
  padding: 14px 18px;
  border: 1px solid #e8e3db;
  background: #fcfbf8;
  font-size: 14px;
  line-height: 1.5;
  color: #2f342f;
  box-shadow: none;
}

body.woocommerce-checkout form.checkout_coupon {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #e8e3db;
  background: #fff;
}

/* -----------------------------------------
   14. WALLET / EXPRESS
----------------------------------------- */

body.woocommerce-checkout .wc-stripe-express-checkout-element,
body.woocommerce-checkout .wc-stripe-payment-request-wrapper,
body.woocommerce-checkout .wc_payment_request {
  margin-bottom: 6px;
}

body.woocommerce-checkout .payment_request_separator,
body.woocommerce-checkout .wc-stripe-checkout-button-separator {
  margin: 6px 0 14px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c7f78;
}

/* -----------------------------------------
   15. RESPONSIVE
----------------------------------------- */

@media (max-width: 1024px) {
  body.woocommerce-checkout h2,
  body.woocommerce-checkout h3,
  body.woocommerce-checkout .woocommerce-billing-fields > h3,
  body.woocommerce-checkout #order_review_heading {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  body.woocommerce-checkout h2,
  body.woocommerce-checkout h3,
  body.woocommerce-checkout .woocommerce-billing-fields > h3,
  body.woocommerce-checkout #order_review_heading {
    font-size: 24px;
    margin-bottom: 18px;
  }

  body.woocommerce-checkout form input.input-text,
  body.woocommerce-checkout form textarea,
  body.woocommerce-checkout form select,
  body.woocommerce-checkout .select2-container--default .select2-selection--single {
    min-height: 50px;
    font-size: 16px;
  }

  body.woocommerce-checkout .woocommerce-additional-fields {
    padding: 18px 16px;
  }

  body.woocommerce-checkout .woocommerce-additional-fields textarea,
  body.woocommerce-checkout textarea#order_comments {
    min-height: 140px;
    height: 140px;
    overflow-y: hidden;
    resize: none;
  }

  body.woocommerce-checkout #billing_first_name_field,
  body.woocommerce-checkout #billing_last_name_field {
    float: none;
    width: 100%;
  }

}

/* =========================================================
   15) FABER — CHECKOUT COUPON BAR
   Blocco unico definitivo
   ========================================================= */

body.woocommerce-checkout .faber-checkout-coupon-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 26px 0 30px;
  padding: 24px 0;
  border-top: 1px solid #e8e2d7;
  border-bottom: 1px solid #e8e2d7;
}

body.woocommerce-checkout .faber-checkout-coupon-text {
  flex: 0 0 auto;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  color: #2f342f;
  white-space: nowrap;
}

body.woocommerce-checkout .faber-checkout-coupon-form {
  flex: 1 1 auto;
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) auto;
  gap: 14px;
  align-items: center;
  margin: 0 !important;
}

body.woocommerce-checkout .faber-checkout-coupon-form .form-row {
  margin: 0 !important;
  width: auto !important;
  float: none !important;
}

body.woocommerce-checkout .faber-checkout-coupon-form .form-row-first,
body.woocommerce-checkout .faber-checkout-coupon-form .form-row-last {
  width: auto !important;
}

body.woocommerce-checkout .faber-checkout-coupon-form input.input-text {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.woocommerce-checkout .faber-checkout-coupon-form button.button {
  min-height: 52px;
  margin: 0 !important;
  padding: 0 24px;
  white-space: nowrap;
}

body.woocommerce-checkout .faber-checkout-coupon-form .clear {
  display: none !important;
}

@media (max-width: 767px) {
  body.woocommerce-checkout .faber-checkout-coupon-bar {
    display: block;
    margin: 22px 0 24px;
    padding: 18px 0;
  }

  body.woocommerce-checkout .faber-checkout-coupon-text {
    display: block;
    margin: 0 0 12px;
    white-space: normal;
  }

  body.woocommerce-checkout .faber-checkout-coupon-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.woocommerce-checkout .faber-checkout-coupon-form button.button {
    width: 100%;
  }
}

