/* Cart / Checkout fixes */

/* ===== Prețuri în coș ===== */
body.woocommerce-cart td.product-price .bs-cart-price-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  line-height: 1.4;
  color: #6d6c6c;
  font-weight: 600 !important;
}

body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-regular {
  font-size: 13px;
  color: #6d6c6c;
}

body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-sale {
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
}

body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-discount {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  background: #fcebea;
  border-radius: 3px;
}

@media (max-width: 768px) {
  body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-sale {
    font-size: 14px;
  }

  body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-regular {
    font-size: 12px;
  }

  body.woocommerce-cart td.product-price .bs-cart-price-centered .bs-discount {
    font-size: 11px;
  }
}

/* ===== Link cupon ===== */
body.woocommerce-cart tr.cart-discount td {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body.woocommerce-cart tr.cart-discount td .amount {
  white-space: nowrap;
}

body.woocommerce-cart tr.cart-discount td a.woocommerce-remove-coupon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  font-size: 0;
  text-decoration: none;
}

body.woocommerce-cart tr.cart-discount td a.woocommerce-remove-coupon::before {
  content: "x";
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: #f67e4a;
}

body.woocommerce-cart tr.cart-discount td a.woocommerce-remove-coupon:hover::before {
  color: #f45c25;
}

.woocommerce-cart-form .shop_table .product-remove a {
  font-size: 32px;
}

/* ===== Checkout table fix mobile ===== */
@media (max-width: 768px) {
  .awb-cart-totals-table th,
  .awb-cart-totals-table td {
    display: table-cell;
    vertical-align: top;
    text-align: left !important;
    white-space: normal !important;
    word-wrap: break-word;
    hyphens: auto;
  }

  .awb-cart-totals-table,
  .woocommerce-checkout-review-order-table,
  .woocommerce-checkout-review-order-table table {
    width: 100% !important;
    max-width: 100% !important;
  }

  .shipping-pickup-store th {
    width: auto !important;
  }

  button#select_locker,
  button.sameday_select_locker {
    touch-action: manipulation !important;
    position: relative !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
  }
}

/* ===== Cart / checkout general ===== */
.awb-cart-totals-table th,
.awb-cart-totals-table td,
.awb-cart-totals-table .amount,
.awb-cart-totals-table .payment_method_cod {
  text-align: left !important;
}

.awb-cart-totals-table .amount {
  font-weight: 500 !important;
}

.awb-cart-totals-table .woocommerce-shipping-methods {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.awb-cart-totals-table .woocommerce-shipping-methods li {
  list-style: none;
  text-align: left;
}

/* ===== Sameday locker button ===== */
.sameday_select_locker {
  display: inline-block !important;
  width: auto !important;
  padding: 6px 14px !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  position: relative !important;
  z-index: 20 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.shipping-pickup-store strong {
  display: none;
}

/* ===== Terms & validation ===== */
.woocommerce-terms-and-conditions-wrapper,
.woocommerce-terms-and-conditions-wrapper label {
  color: #2e2e2e !important;
}

.woocommerce-terms-and-conditions-wrapper input[type="checkbox"]:checked + label,
.woocommerce-terms-and-conditions-wrapper input[type="checkbox"]:checked ~ label {
  color: #2e2e2e !important;
}

.woocommerce-terms-and-conditions-wrapper a,
.woocommerce-terms-and-conditions-wrapper a:visited {
  color: #f67e4a !important;
}

.woocommerce-terms-and-conditions-wrapper a:hover {
  color: #d4af37 !important;
}

.validate-required.woocommerce-validated .select2-selection--single,
.validate-required.woocommerce-validated input,
.woocommerce form .form-row.validate-required.woocommerce-validated input,
.validate-required.woocommerce-invalid .select2-selection--single,
.validate-required.woocommerce-invalid input,
.woocommerce form .form-row.validate-required.woocommerce-invalid input,
.woocommerce form .form-row.woocommerce-validated input,
.woocommerce form .form-row.woocommerce-invalid input {
  box-shadow: none !important;
  border-color: #cfc3b2 !important;
}

.woocommerce form .form-row.woocommerce-validated::after,
.woocommerce form .form-row.woocommerce-invalid::after {
  display: none !important;
}

#terms_description,
#terms_description.checkout-inline-error-message {
  color: #f67e4a !important;
}

#terms_description.checkout-inline-error-message {
  font-style: italic !important;
}

/* ===== CTA finalizare comandă ===== */
.woocommerce-cart a.fusion-button.button-2[href*="finalizare-comanda"] {
  background-color: #f67e4a !important;
  border: none !important;
  color: #fff !important;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.woocommerce-cart a.fusion-button.button-2[href*="finalizare-comanda"]:hover {
  background-color: #d4af37 !important;
  color: #fff !important;
  transform: translateY(-2px);
}

/* ===== Shipping methods ===== */
.woocommerce-checkout .woocommerce-shipping-methods label {
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0.2px;
}

/* ===== Metode plată ===== */
.woocommerce-checkout .wc_payment_methods li {
  padding: 6px 0 !important;
  border-bottom: 0.5px solid #f0ebe4;
  list-style: none;
}

.woocommerce-checkout .wc_payment_methods li:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.woocommerce-checkout .wc_payment_methods label {
  font-size: 14px !important;
}


/* ===== TITLU cross-sell / upsell ===== */
.woocommerce-cart .fusion-woo-cross-sells .fusion-title h3,
.woocommerce-cart .fusion-woo-upsells .fusion-title h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px !important;
  font-weight: 500;
  line-height: 1.15 !important;
  letter-spacing: 0.2px;
}

/* ===== Benefits checkout ===== */
.pinolli-checkout-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 12px 0;
}

.pinolli-checkout-benefits span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  background: #FBF8F3;
  border: 0.5px solid #cfc3b2;
  border-radius: 8px;
  font-size: 13px;
  color: #2e2e2e;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* ===== Badge Recomandat premium ===== */
.pinolli-badge-recomandat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 3px 9px;

  background: #FBF8F3;
  border: 1px solid #E8DED1;
  border-radius: 999px;

  color: #8A6A2F;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;

  vertical-align: middle;
  white-space: nowrap;
}

/* ===== Gratuit premium ===== */
.pinolli-free-shipping {
  color: #8A6A2F !important;
  font-weight: 600;
}

/* ===== Total auriu ===== */
.woocommerce-checkout .order-total .amount {
  color: #D4AF37 !important;
  font-weight: 600 !important;
}

/* ===== Checkout container unic ===== */
.woocommerce-checkout .fusion-woo-checkout-order-review-tb,
.woocommerce-checkout .fusion-woo-checkout-payment-tb {
  background: #fff;
  border-radius: 12px;
  border: 0.5px solid #e8e0d5;
  margin-bottom: 10px;
}

/* ===== Mobile checkout ===== */
@media (max-width: 767px) {
  .woocommerce-checkout .fusion-woo-checkout-order-review-tb,
  .woocommerce-checkout .fusion-woo-checkout-payment-tb {
    padding: 16px;
  }

  .woocommerce-checkout .order-total .amount {
    font-size: 18px !important;
  }

  .woocommerce-checkout .woocommerce-shipping-totals th {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888 !important;
    font-weight: 500 !important;
    padding-bottom: 6px;
  }

  .woocommerce-checkout #place_order {
    width: 100% !important;
    background: #F67E4A !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #fff !important;
    margin-top: 8px;
  }

  .woocommerce-checkout #place_order:hover {
    background: #D4AF37 !important;
  }

  .pinolli-checkout-benefits {
    gap: 5px;
  }

  .pinolli-checkout-benefits span {
    font-size: 12px;
    padding: 8px 4px;
  }
}

/* ===== Desktop checkout ===== */
@media (min-width: 1025px) {
  .woocommerce-checkout .fusion-woo-checkout-order-review-tb,
  .woocommerce-checkout .fusion-woo-checkout-payment-tb {
    padding: 20px;
  }

  .woocommerce-checkout {
    background: #FBF8F3;
  }
}

/* ===== Mobile shipping text fix only ===== */
@media (max-width: 767px) {
  .woocommerce-checkout .woocommerce-shipping-methods label {
    font-size: 14px !important;
    line-height: 1.35 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }

  .woocommerce-checkout .woocommerce-shipping-methods label .amount {
    white-space: nowrap !important;
  }
}


/* ===== Pickup link force underline desktop/mobile ===== */
.woocommerce-checkout .woocommerce-shipping-methods a.pinolli-pickup-link,
.woocommerce-checkout .woocommerce-shipping-methods a.pinolli-pickup-link:visited,
.woocommerce-checkout .woocommerce-shipping-methods a.pinolli-pickup-link:hover,
.woocommerce-checkout .woocommerce-shipping-methods a.pinolli-pickup-link:focus {
  color: #2E2E2E !important;
  text-decoration-line: underline !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
}