/* Cart / Checkout fixes
   Goals:
   - preserve current visual style
   - keep selectors scoped to cart / checkout areas
   - avoid class duplication and unnecessary overrides
   - respect global fonts
   - improve maintainability and performance safely
*/

/* ===== Prețuri în coș (doar pe pagina de 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: "Înlătură" -> X ===== */
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 50/50 table fix ===== */
@media (max-width: 768px) {
  .awb-cart-totals-table th,
  .awb-cart-totals-table td {
    display: table-cell;
    width: 50% !important;
    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;
    table-layout: fixed !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_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;
}

.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 ===== */
.woocommerce-shipping-methods label .amount {
  font-weight: 600 !important;
}

.woocommerce-shipping-methods label {
  letter-spacing: 0.2px;
}

.woocommerce-shipping-methods label span.amount {
  margin-left: 6px !important;
}

/* TITLU cross-sell / upsell in cart */
.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;
}

@media (max-width: 767px) {
  .woocommerce-shipping-methods li {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }
}

/* ===== Benefits checkout ===== */
.pinolli-checkout-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid #cfc3b2;
  border-radius: 6px;
  background: #fdfbf8;
  font-family: inherit;
  font-size: 12px;
  color: #2e2e2e;
}

.pinolli-checkout-benefits span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}