body.wqcp-lock { overflow: hidden; }
.wqcp-modal { position: fixed; inset: 0; z-index: 9999; display: none; }

.wqcp-modal.is-open { display: block; }
.wqcp-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
#wqcp-modal, #wqcp-modal * { pointer-events: auto; }

.wqcp-dialog {
  position: relative;
  width: min(var(--wqcp-dialog-width, 520px), calc(100% - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
}

.wqcp-head { padding: 14px 18px; border-bottom: 1px solid #eee; }
.wqcp-title { font-weight: 700; letter-spacing: .3px; color: #d21b1b; }

.wqcp-close {
  position: absolute; top: 8px; right: 10px;
  width: 38px; height: 38px;
  border: 0; border-radius: 8px;
  background: #f3f3f3;
  font-size: 22px; line-height: 38px;
  cursor: pointer;
}

.wqcp-body { padding: 12px 14px 14px; overflow: auto; }
.wqcp-loading { padding: 18px; background: #fafafa; border: 1px dashed #ddd; border-radius: 10px; }

#wqcp-modal .woocommerce-checkout { margin: 0; }
#wqcp-modal .woocommerce form .form-row { margin-bottom: 10px; }

#wqcp-modal #ship-to-different-address,
#wqcp-modal .shipping_address { display:none !important; }

#wqcp-modal .woocommerce-form-coupon-toggle,
#wqcp-modal form.checkout_coupon,
#wqcp-modal .checkout_coupon { display:none !important; }

#wqcp-modal form.checkout.woocommerce-checkout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#wqcp-modal .woocommerce-checkout-review-order-table { border-collapse: collapse; width: 100%; }
#wqcp-modal .woocommerce-checkout-review-order-table thead { display:none; }
#wqcp-modal .woocommerce-checkout-review-order-table tbody tr,
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr { border-bottom: 1px solid #eee; }
#wqcp-modal .woocommerce-checkout-review-order-table td,
#wqcp-modal .woocommerce-checkout-review-order-table th { padding: 10px 0; vertical-align: middle; }

#wqcp-modal .wqcp-prod-name-wrap { display:flex; align-items:center; gap:10px; }
#wqcp-modal .wqcp-prod-thumb { width:48px; height:48px; border-radius:8px; overflow:hidden; flex:0 0 48px; }
#wqcp-modal .wqcp-prod-thumb img { width:48px; height:48px; object-fit:cover; border-radius:8px; }

/* Remove item X button */
#wqcp-modal .wqcp-remove-item {
  margin-left: auto;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#wqcp-modal .wqcp-remove-item:hover {
  background: #d21b1b;
  color: #fff;
}

#wqcp-modal .woocommerce-checkout-review-order-table .product-name { font-size: 12px; line-height: 1.2; }
#wqcp-modal .woocommerce-checkout-review-order-table .product-total { text-align: right; white-space: nowrap; font-weight: 600; position: static; }

/* =============================
   POPUP CART LIST UX TWEAKS
   - hide qty controls
   - show qty as small badge
   - keep thumbnails small even after checkout refresh (Woodmart)
   ============================= */

/* Hide qty controls in the popup (client can remove items via X only) */
#wqcp-modal .quantity,
#wqcp-modal .buttons_added,
#wqcp-modal .minus,
#wqcp-modal .plus,
#wqcp-modal input.qty,
#wqcp-modal .product-quantity {
  display: none !important;
}

/* Qty badge on the product thumb (top-left corner) */
#wqcp-modal .wqcp-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

#wqcp-modal .wqcp-thumb-wrap .wqcp-prod-thumb {
  display: block;
}

#wqcp-modal .wqcp-qty-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #8b8b8b;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  pointer-events: none;
}

span#select2-billing_city-container {
  display: none;
}

/* Woodmart may replace fragments with its own markup (big image). Force it to 48px in modal. */
#wqcp-modal .wd-checkout-prod-img,
#wqcp-modal .wd-checkout-prod-img img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  border-radius: 8px !important;
}

#wqcp-modal .wd-checkout-prod-img img {
  object-fit: cover !important;
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper:before {
  content: "";
  font-family: "woodmart-font";
  font-weight: 400;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #e9e9e9;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #111;
  pointer-events: none;
}

#wqcp-modal .woocommerce-terms-and-conditions-wrapper { margin-top: 10px; }
#wqcp-modal #place_order { width: 100%; }

.wqcp-buy-now-ico svg { display:block; }

@media (max-width: 520px) {
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row label,
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper {
    width: 100%;
  }
}

/* Icons mapping based on your list (WooCommerce form-row ids end with _field) */
#wqcp-modal .form-row#billing_first_name_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_last_name_field .woocommerce-input-wrapper:before { content: "\f124"; display:flex; }

#wqcp-modal .form-row#billing_address_1_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_address_2_field .woocommerce-input-wrapper:before { content: "\f183"; display:flex; }

#wqcp-modal .form-row#billing_email_field .woocommerce-input-wrapper:before { content: "\f125"; display:flex; }

#wqcp-modal .form-row#billing_postcode_field .woocommerce-input-wrapper:before { content: "\f182"; display:flex; }

/* No icons for Judet and Localitate */
#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper:before { content: ""; display:none; }

#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper input,
#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper select,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper input,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper select { padding-left: 12px !important; }

/* FORCE 2-column layout + icons in Woodmart (modal only) */
#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 10px !important;
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row > label {
  flex: 0 0 38% !important;
  width: 38% !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper {
  flex: 1 1 auto !important;
  width: auto !important;
  position: relative !important;
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper:before {
  font-family: "woodmart-font" !important;
  font-weight: 400 !important;
  display: none !important; /* enabled per-field below */
  content: "" !important;
  position: absolute !important;
  left: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 6px !important;
  background: #e9e9e9 !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  color: #111 !important;
  pointer-events: none !important;
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper input,
#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper select,
#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row .woocommerce-input-wrapper textarea {
  padding-left: 16px !important;
}

/* Per-field icons */
#wqcp-modal .form-row#billing_first_name_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_last_name_field .woocommerce-input-wrapper:before { content: "\\f124" !important; display:flex !important; }

#wqcp-modal .form-row#billing_address_1_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_address_2_field .woocommerce-input-wrapper:before { content: "\\f183" !important; display:flex !important; }

#wqcp-modal .form-row#billing_email_field .woocommerce-input-wrapper:before { content: "\\f125" !important; display:flex !important; }

#wqcp-modal .form-row#billing_postcode_field .woocommerce-input-wrapper:before { content: "\\f182" !important; display:flex !important; }

/* No icons for Judet + Localitate */
#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper:before,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper:before { content: "" !important; display:none !important; }

#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper input,
#wqcp-modal .form-row#billing_state_field .woocommerce-input-wrapper select,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper input,
#wqcp-modal .form-row#billing_city_field .woocommerce-input-wrapper select { padding-left: 12px !important; }

/* Mobile: stack */
@media (max-width: 520px) {
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row > label {
    width: 100% !important;
    flex: 0 0 auto !important;
  }
}

/* Modal custom field rows (HTML structure) */
#wqcp-modal .wqcp-field-row{
  display:flex !important;
  flex-direction:row !important;
  gap:10px !important;
  align-items:center !important;
}
#wqcp-modal .wqcp-col-label{
  flex:0 0 38% !important;
  width:38% !important;
}
#wqcp-modal .wqcp-col-label label{
  margin:0 !important;
  font-size:12px !important;
  font-weight:600 !important;
}
#wqcp-modal .wqcp-col-input{
  flex:1 1 auto !important;
  width:auto !important;
}
#wqcp-modal .wqcp-input-group{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:stretch !important;
}
#wqcp-modal .wqcp-input-group-text{
  flex:0 0 40px !important;
  width:40px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:#e9e9e9 !important;
  border:1px solid rgba(0,0,0,.08) !important;
  border-right:0 !important;
  border-radius:8px 0 0 8px !important;
}
#wqcp-modal .wqcp-input-group-text:before{
  font-family:"woodmart-font" !important;
  font-weight:400 !important;
  font-size:16px !important;
  line-height:1 !important;
  color:#111 !important;
  content:"" !important;
}
#wqcp-modal .wqcp-input-group input,
#wqcp-modal .wqcp-input-group select,
#wqcp-modal .wqcp-input-group textarea{
  border-radius:0 8px 8px 0 !important;
}
#wqcp-modal .wqcp-input-group input,
#wqcp-modal .wqcp-input-group select{
  height:42px !important;
}
#wqcp-modal .wqcp-input-group textarea{
  min-height:42px !important;
  max-height:42px !important;
  resize: none !important;
  overflow: hidden !important;
}

/* Icon codes */
#wqcp-modal .wqcp-ico-user:before{ content:"\f124" !important; }
#wqcp-modal .wqcp-ico-address:before{ content:"\f183" !important; }
#wqcp-modal .wqcp-ico-email:before{ content:"\f125" !important; }
#wqcp-modal .wqcp-ico-postcode:before{ content:"\f182" !important; }
#wqcp-modal .wqcp-ico-notes:before{ content:"\f145" !important; }

/* Requested layout: field row uses display: contents and the form-row becomes a 2-col grid */
#wqcp-modal .wqcp-field-row {
  display: contents !important;
  flex-direction: row !important;
  gap: 10px !important;
  align-items: center !important;
}

#wqcp-modal .wqcp-col-label { width: auto !important; flex: none !important; }
#wqcp-modal .wqcp-col-input { width: auto !important; flex: none !important; }

/* Notes field single-line styling */
#wqcp-modal .wqcp-notes-single {
  height: 42px !important;
}

/* Requested: wqcp-field-row always display: contents (desktop + mobile) */
#wqcp-modal .wqcp-field-row { 
  display: contents !important; 
  flex-direction: row !important; 
  gap: 10px !important; 
  align-items: center !important; 
}

/* Phone icon */
#wqcp-modal .wqcp-ico-phone:before{ content:"\f12c" !important; font-family:"woodmart-font" !important; font-weight:400 !important; }

/* Requested: form-row built uses display: contents */
#wqcp-modal .form-row.wqcp-row-built {
  display: contents;
  flex-direction: row !important;
  gap: 10px !important;
  align-items: center !important;
}

/* Desktop layout: align labels left and inputs right like reference */
@media (min-width: 521px) {
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper,
  #wqcp-modal .woocommerce-additional-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: 38% 1fr !important;
    column-gap: 10px !important;
    row-gap: 12px !important;
    align-items: center !important;
  }

  #wqcp-modal .wqcp-input-group-text {
    height: 42px !important;
    border-radius: 8px 0 0 8px !important;
  }
  #wqcp-modal .wqcp-input-group input,
  #wqcp-modal .wqcp-input-group select {
    height: 42px !important;
  }
}

/* Mobile: keep natural flow */
@media (max-width: 520px) {
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper,
  #wqcp-modal .woocommerce-additional-fields__field-wrapper {
    display: block !important;
  }
  #wqcp-modal .wqcp-col-label,
  #wqcp-modal .wqcp-col-input {
    display: block !important;
    width: 100% !important;
  }
  #wqcp-modal .wqcp-col-label { margin-bottom: 6px !important; }
  #wqcp-modal .wqcp-input-group { width: 100% !important; }
}

/* Desktop layout like reference (Bootstrap-like row) */
#wqcp-modal .wqcp-field-row{
  --wqcp-gutter-x: 1.5rem;
  --wqcp-gutter-y: 0;
}

/* Mobile default: stacked */
@media (max-width: 575px){
  #wqcp-modal .wqcp-field-row{
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  #wqcp-modal .wqcp-col-label,
  #wqcp-modal .wqcp-col-input{
    width: 100% !important;
    flex: 0 0 auto !important;
  }
}

/* Desktop/tablet: row, label 25%, input flex */
@media (min-width: 576px){
  #wqcp-modal .wqcp-field-row{
    display: flex !important;
    flex-wrap: wrap !important;
    margin-top: calc(var(--wqcp-gutter-y) * -1) !important;
    margin-right: calc(var(--wqcp-gutter-x) * -0.5) !important;
    margin-left: calc(var(--wqcp-gutter-x) * -0.5) !important;
    align-items: center !important;
    gap: 0 !important;
  }

  #wqcp-modal .wqcp-col-label,
  #wqcp-modal .wqcp-col-input{
    padding-right: calc(var(--wqcp-gutter-x) * 0.5) !important;
    padding-left: calc(var(--wqcp-gutter-x) * 0.5) !important;
  }

  #wqcp-modal .wqcp-col-label{
    flex: 0 0 auto !important;
    width: 25% !important;
  }

  #wqcp-modal .wqcp-col-input{
    flex: 1 1 0 !important;
    width: auto !important;
  }
}

/* Keep form-row wrapper from breaking layout */
#wqcp-modal .form-row.wqcp-row-built{
  display: block !important;
}

/* Buy now button styling (product page) */
body.woocommerce div.product form.cart button.button.wqcp-buy-now,
body button.button.wqcp-buy-now{
  background-color: var(--wqcp-button-bg, #0b0b0f) !important;
  background-image: var(--wqcp-button-image, linear-gradient(315deg, #0b0b0f 0%, #b00020 74%)) !important;
  border-radius: var(--wqcp-button-radius, 8px) !important;
  border: 0 !important;
  color: var(--wqcp-button-color, #fff) !important;
  font-size: var(--wqcp-button-font-size, 16px) !important;
  line-height: 1.3 !important;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: normal !important;
  width: var(--wqcp-button-width, 100%) !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: var(--wqcp-button-height, 48px) !important;
  height: auto !important;
  padding: var(--wqcp-button-padding-y, 13px) var(--wqcp-button-padding-x, 22px) !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin-top: 10px;
  cursor: pointer;
  text-decoration: none !important;
}
.wqcp-buy-now .wqcp-buy-now-text{
  min-width: 0;
  overflow-wrap: anywhere;
}
.wqcp-buy-now:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.wqcp-buy-now:hover{
  filter: brightness(0.98);
}

/* Requested desktop rules */
@media (min-width: 521px) {
  #wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper,
  #wqcp-modal .woocommerce-additional-fields__field-wrapper {
    display: block !important;
    align-items: center !important;
  }
}

#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row {
  display: block !important;
  align-items: center !important;
  margin-bottom: 10px !important;
}

/* Header: title + close on same row */
#wqcp-modal .wqcp-head{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

#wqcp-modal .wqcp-title{
  margin: 0 !important;
  min-width: 0;
  overflow-wrap: anywhere;
}

#wqcp-modal .wqcp-close{
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin-left: auto !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

/* Buy now icon span always visible */
.wqcp-buy-now .wqcp-buy-now-ico{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* Buy now icon sizing */
.wqcp-buy-now .wqcp-buy-now-ico{
  width: var(--wqcp-button-icon-size, 24px) !important;
  height: var(--wqcp-button-icon-size, 24px) !important;
  flex: 0 0 auto;
}
.wqcp-buy-now .wqcp-buy-now-ico svg{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}
.wqcp-buy-now .wqcp-buy-now-ico:empty{
  display: none !important;
}

/* Buy now inner wrapper: allow icon + text to align perfectly */
span.wqcp-buy-now-inner{
  display: contents !important;
}

/* Force-hide rows even when we use display: contents for layout */

/* Force-hide rows even when we use display: contents for layout */
#wqcp-modal .form-row.wqcp-force-hide{
  display: none !important;
}

/* Ensure hidden rows always stay hidden (beats any layout rules) */
#wqcp-modal .form-row.wqcp-force-hide,
#wqcp-modal .form-row.wqcp-row-built.wqcp-force-hide,
#wqcp-modal .form-row.wqcp-row-built[style*="display: none"],
#wqcp-modal .form-row[style*="display: none"]{
  display: none !important;
}

/* ========================================
   SMARTBILL INTEGRATION - PF/PJ FIELDS FIX
   ======================================== */

/* Forțează ascunderea câmpurilor cu clasa wqcp-force-hide */
#wqcp-modal .wqcp-force-hide {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Asigură că câmpurile SmartBill ascunse nu ocupă spațiu */
#wqcp-modal .form-row.wqcp-force-hide,
#wqcp-modal p.wqcp-force-hide {
  display: none !important;
}

/* Previne orice display: block sau display: flex pe câmpurile ascunse */
#wqcp-modal .wqcp-force-hide * {
  display: none !important;
}

/* CSS specific pentru câmpurile SmartBill când sunt ascunse */
#wqcp-modal #smartbill_billing_cif_field[style*="display: none"],
#wqcp-modal #smartbill_billing_company_name_field[style*="display: none"],
#wqcp-modal #smartbill_billing_nr_reg_com_field[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Asigură vizibilitatea câmpurilor când sunt afișate */
#wqcp-modal #smartbill_billing_cif_field[style*="display: block"],
#wqcp-modal #smartbill_billing_company_name_field[style*="display: block"],
#wqcp-modal #smartbill_billing_nr_reg_com_field[style*="display: block"],
#wqcp-modal #smartbill_billing_cnp_field[style*="display: block"],
#wqcp-modal #billing_company_field[style*="display: block"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ascunde câmpurile de persoană juridică când nu sunt necesare */
#wqcp-modal .form-row#smartbill_billing_cif_field.wqcp-force-hide,
#wqcp-modal .form-row#smartbill_billing_company_name_field.wqcp-force-hide,
#wqcp-modal .form-row#smartbill_billing_nr_reg_com_field.wqcp-force-hide {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ascunde câmpurile de shipping pentru persoană juridică când nu sunt necesare */
#wqcp-modal .form-row#smartbill_shipping_cif_field.wqcp-force-hide,
#wqcp-modal .form-row#smartbill_shipping_company_name_field.wqcp-force-hide,
#wqcp-modal .form-row#smartbill_shipping_nr_reg_com_field.wqcp-force-hide {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* tfoot ramane normal, fara contents */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot{
  display: block !important;
  width: 100% !important;
  background: transparent;
  border: 0;
  padding: 0;
}

/* stil pe randuri - display flex pentru a alinia label si valoare pe aceeasi linie */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr{
  background: #f9f9f9;
  display: flex !important;
  width: 100% !important;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #d3d3d3;
}

/* padding + border pe celule */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot th,
#wqcp-modal .woocommerce-checkout-review-order-table tfoot td{
  padding: 10px !important;
  display: inline-block !important;
  border: none !important;
}

/* th (label) la stanga */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot th {
  text-align: left;
  font-weight: 600;
  flex: 0 0 auto;
}

/* td (valoare) la dreapta */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
}

/* optional: bordura sus pe primul rand */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr:first-child{
  border-top: 1px solid #d3d3d3;
}

/* bordura jos pe ultimul rand */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr:last-child{
  border-bottom: 1px solid #d3d3d3;
}

/* Asigura-te ca randul de Total este bine evidentiat */
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr.order-total {
  background: #fafafa;
  font-weight: 700;
}
/* =========================
   WQCP modal: FORCE review table to stay on one line
   (override Woodmart responsive stacked table)
   ========================= */

#wqcp-modal .woocommerce-checkout-review-order-table{
  display: block !important;
  width:100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

#wqcp-modal .woocommerce-checkout-review-order-table tbody {
  display: table !important;
  width: 100% !important;
  table-layout: auto;
}

#wqcp-modal .woocommerce-checkout-review-order-table tfoot td::before { content: none !important; }
#wqcp-modal .woocommerce-checkout-review-order-table tfoot td[colspan] { width: 100% !important; flex-basis: 100%; box-sizing: border-box; }
#wqcp-modal .woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals { flex-direction: column; align-items: stretch; }
#wqcp-modal .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > th,
#wqcp-modal .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td { width: 100% !important; box-sizing: border-box; text-align: left !important; }
#wqcp-modal .woocommerce-shipping-totals ul#shipping_method,
#wqcp-modal .woocommerce-shipping-totals ul.woocommerce-shipping-methods { display: block !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; list-style: none !important; }
#wqcp-modal .woocommerce-shipping-totals ul#shipping_method li,
#wqcp-modal .woocommerce-shipping-totals ul.woocommerce-shipping-methods li { display: flex !important; align-items: flex-start !important; gap: 10px; width: 100% !important; box-sizing: border-box; margin: 0 0 8px !important; padding: 12px !important; border: 1px solid #ddd; border-radius: 6px; background: #fff; list-style: none !important; text-align: left; }
#wqcp-modal .woocommerce-shipping-totals li::marker { content: ''; }
#wqcp-modal .woocommerce-shipping-totals li input[type="radio"] { flex: 0 0 auto; width: 16px !important; height: 16px !important; margin: 3px 0 0 !important; }
#wqcp-modal .woocommerce-shipping-totals ul#shipping_method li label,
#wqcp-modal .woocommerce-shipping-totals ul.woocommerce-shipping-methods li label { display: block !important; flex: 1 1 auto; min-width: 0; margin: 0 !important; white-space: normal !important; font-size: 14px; font-weight: 400; line-height: 1.5; text-align: left; }
#wqcp-modal .woocommerce-shipping-totals label .amount { white-space: nowrap; }
#wqcp-modal .woocommerce-shipping-totals select { width: 100%; max-width: 100%; }
#wqcp-modal .form-row.wqcp-invoice-hidden,
#wqcp-modal #customer_details .woocommerce-billing-fields__field-wrapper .form-row.wqcp-invoice-hidden { display: none !important; }
#wqcp-modal [name="billing_tip_facturare"],
#wqcp-modal [name="smartbill_billing_type"] { width: 100% !important; min-width: 0 !important; max-width: 100%; }
#wqcp-modal .wqcp-invoice-control { width: 100% !important; max-width: 100%; min-width: 0 !important; min-height: 42px; box-sizing: border-box; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; background-color: #fff; color: inherit; font: inherit; }

/* IMPORTANT: anuleaza display:block pe td (care iti muta pretul sub titlu) */
#wqcp-modal .woocommerce-checkout-review-order-table tbody tr.cart_item,
#wqcp-modal .woocommerce-checkout-review-order-table tbody tr.cart_item td{
  display: table-row !important;
}

#wqcp-modal .woocommerce-checkout-review-order-table tbody tr.cart_item td{
  display: table-cell !important;
  vertical-align: middle !important;
  padding:10px 0 !important;
}

/* latimi coloane */
#wqcp-modal .woocommerce-checkout-review-order-table td.product-name{
  width: auto !important;
  padding-right: 12px !important;
}

#wqcp-modal .woocommerce-checkout-review-order-table td.product-total{
  width: 1% !important;
  text-align: right !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
}

/* aliniere imagine + titlu pe aceeasi linie */
#wqcp-modal .wqcp-prod-name-wrap{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-width:0 !important;
}

/* imagine 48x48 (UNA singura) */
#wqcp-modal img.wqcp-prod-thumb{
  width:48px !important;
  height:48px !important;
  max-width:48px !important;
  max-height:48px !important;
  border-radius:8px !important;
  object-fit:cover !important;
  flex:0 0 48px !important;
  display:block !important;
}

/* daca tema mai afiseaza thumbnail separat (dublura), il ascundem */
#wqcp-modal .product-thumbnail,
#wqcp-modal td.product-thumbnail{
  display:none !important;
}

/* titlu clamp 2 randuri, fara sa rupa layout-ul */
#wqcp-modal .wqcp-prod-name{
  min-width:0 !important;
  display:-webkit-box !important;
  -webkit-line-clamp:2 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  line-height:1.2 !important;
}

/* --- WQCP: Woodmart review-order (wd-checkout-prod) compatibility --- */
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod-img{position:relative;d: 0 0 auto;display: none;}
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod-img img{
  width:48px !important;
  height:48px !important;
  max-width:48px !important;
  max-height:48px !important;
  object-fit:cover;
  display: none;
}

/* Ensure qty badge stays visible over Woodmart image wrapper */
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod-img .wqcp-qty-badge{
  position:absolute;
  top:-6px;
  right:-6px;
}

/* Hide any Woodmart qty controls inside the modal order review */
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod .quantity,
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod .buttons_added,
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod .minus,
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod .plus,
#wqcp-modal .woocommerce-checkout-review-order-table .wd-checkout-prod input.qty{
  display:none !important;
}
span.wqcp-prod-name {
    width: 55% !important;
}
