/*
 * Printbox AI — streamlined WooCommerce order flow.
 * Scoped to body classes from order-ux.php so the rest of the shop keeps its
 * existing Flatsome/NBDesigner presentation.
 */

/* --------------------------------------------------------------------------
 * Business-card product configurator
 * ----------------------------------------------------------------------- */

body.pb-order-ux .category-filtering,
body.pb-order-ux #product-sidebar,
body.pb-order-ux .product_meta,
body.pb-order-ux .related-products-wrapper,
body.pb-order-ux .next-prev-thumbs,
body.pb-order-ux .product-summary .social-icons,
body.pb-order-ux .product-summary .is-divider.small {
  display: none !important;
}

body.pb-order-ux .product-main {
  padding-top: 22px;
  padding-bottom: 42px;
}

body.pb-order-ux .product-main > .row.content-row {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  border: 0;
}

body.pb-order-ux .product-main > .row.content-row > .large-9 {
  width: 100%;
  max-width: 100%;
  flex-basis: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

body.pb-order-ux .product-main > .row.content-row > .large-9 > .row {
  align-items: flex-start;
  margin-left: -14px;
  margin-right: -14px;
}

body.pb-order-ux .product-gallery {
  width: 38%;
  max-width: 38%;
  flex-basis: 38%;
  padding: 8px 28px 0 14px;
}

body.pb-order-ux .product-info {
  width: 62%;
  max-width: 62%;
  flex-basis: 62%;
  padding: 0 14px 20px 28px;
}

body.pb-order-ux .product-info .breadcrumbs {
  margin-bottom: 7px;
  color: #788796;
  font-size: 12px;
  letter-spacing: .02em;
}

body.pb-order-ux .product-info .product-title {
  margin: 0 0 10px;
  color: #203040;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

body.pb-order-ux.pb-order-ux-ready .product-info > .price-wrapper {
  display: none;
}

body.pb-order-ux .product-info form.cart {
  width: 100%;
  margin: 0;
}

body.pb-order-ux .nbo-wrapper {
  margin-top: 12px;
}

body.pb-order-ux .nbo-wrapper select.nbo-dropdown,
body.pb-order-ux .nbo-wrapper select,
body.pb-order-ux .nbo-wrapper input[type="text"],
body.pb-order-ux .nbo-wrapper input[type="number"] {
  min-height: 48px;
  border: 1px solid #cfd9e3;
  border-radius: 9px;
  background-color: #fff;
  box-shadow: none;
  font-size: 15px;
}

body.pb-order-ux .nbo-wrapper select:focus,
body.pb-order-ux .nbo-wrapper input:focus {
  border-color: var(--primary-color, #1e73be);
  box-shadow: 0 0 0 3px rgba(30, 115, 190, .10);
}

body.pb-order-ux .nbo-wrapper .nbd-field-content,
body.pb-order-ux .nbo-wrapper .nbd-option-field {
  margin-bottom: 16px;
}

body.pb-order-ux .nbo-wrapper label,
body.pb-order-ux .nbo-wrapper .nbd-field-label {
  color: #2c3d4d;
  font-weight: 700;
}

body.pb-order-ux .nbo-wrapper .nbd-xlabel-wrap,
body.pb-order-ux .nbo-wrapper .nbo-quantity-wrapper {
  gap: 7px;
}

body.pb-order-ux .nbo-wrapper .nbd-xlabel,
body.pb-order-ux .nbo-wrapper label[for^="nbo-quantity"] {
  min-height: 38px;
  border-radius: 8px;
}

body.pb-order-ux .nbo-table-pricing-title {
  display: none !important;
}

body.pb-order-ux .pb-pricing-toggle {
  min-height: 44px;
  margin: 4px 0 18px;
  padding: 0 16px;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 700;
}

body.pb-order-ux .pb-price-table-collapsed {
  display: none !important;
}

body.pb-order-ux .nbo-table-pricing-wrap {
  margin: 0 0 20px;
}

body.pb-order-ux .nbo-table-pricing {
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid #e0e7ee;
  border-radius: 10px;
  font-size: 13px;
}

body.pb-order-ux .nbo-table-pricing th {
  padding: 10px 8px;
  background: #f4f7fa;
  color: #4b5b6a;
  font-size: 11px;
  letter-spacing: .02em;
}

body.pb-order-ux .nbo-table-pricing td {
  padding: 9px 8px;
}

.pb-order-summary {
  margin: 8px 0 18px;
  overflow: hidden;
  border: 1px solid #dce5ed;
  border-radius: 13px;
  background: #f8fafc;
}

.pb-order-summary__title {
  padding: 13px 16px 10px;
  color: #203040;
  font-size: 15px;
  font-weight: 800;
}

.pb-order-summary__rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid #e4eaf0;
  background: #e4eaf0;
}

.pb-order-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 13px;
  background: #fff;
  color: #617181;
  font-size: 13px;
}

.pb-order-summary__row strong {
  overflow: hidden;
  color: #263746;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
}

.pb-order-summary__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid #dce5ed;
  background: #eef6fc;
  color: #324556;
  font-weight: 700;
}

.pb-order-summary__total strong {
  color: var(--primary-color, #1e73be);
  font-size: 25px;
  line-height: 1;
}

body.pb-order-ux .nbdesign-button,
body.pb-order-ux button.single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin: 0 0 10px;
  padding: 0 22px;
  border-radius: 9px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  font-weight: 800;
}

body.pb-order-ux .nbdesign-button {
  border: 1px solid #b9c9d8;
  background: #fff !important;
  color: #263746 !important;
  box-shadow: none;
}

body.pb-order-ux button.single_add_to_cart_button {
  min-width: 230px;
  margin-left: 10px;
}

body.pb-order-ux .pb-upload-help {
  margin: -2px 0 15px;
  color: #6a7987;
  font-size: 13px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
 * Cart
 * ----------------------------------------------------------------------- */

body.pb-cart-ux .nbo-clear-cart-button,
body.pb-cart-ux .woocommerce-shipping-calculator,
body.pb-cart-ux #wc-stripe-express-checkout-element {
  display: none !important;
}

body.pb-cart-ux .cart-container,
body.pb-cart-ux .woocommerce-cart-form,
body.pb-cart-ux .cart-collaterals {
  border-radius: 14px;
}

body.pb-cart-ux .woocommerce-cart-form .shop_table {
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 13px;
  background: #fff;
}

body.pb-cart-ux .woocommerce-cart-form .product-thumbnail img {
  border-radius: 10px;
}

body.pb-cart-ux .woocommerce-cart-form .product-name > a:first-child {
  color: #203040;
  font-size: 17px;
  font-weight: 800;
}

body.pb-cart-ux .nbd-upload-design,
body.pb-cart-ux .nbo-edit-option-cart,
body.pb-checkout-ux .nbd-upload-design,
body.pb-checkout-ux .nbo-edit-option-cart {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 8px 7px 2px 0;
  padding: 0 11px;
  border: 1px solid #ccd8e3;
  border-radius: 7px;
  background: #fff !important;
  color: #2d4255 !important;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

body.pb-cart-ux .pb-cart-config,
body.pb-checkout-ux .pb-checkout-config {
  max-width: 520px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #e1e8ef;
  border-radius: 9px;
}

.pb-order-summary__rows--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 0;
}

.pb-order-summary__rows--compact .pb-order-summary__row {
  padding: 7px 9px;
  font-size: 11px;
}

body.pb-cart-ux .cart-collaterals .cart-sidebar {
  padding: 20px;
  border: 1px solid #dce5ed;
  border-radius: 13px;
  background: #f8fafc;
}

body.pb-cart-ux .cart-collaterals .wc-proceed-to-checkout .checkout-button {
  min-height: 52px;
  border-radius: 9px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  font-weight: 800;
}

body.pb-cart-ux .pb-coupon-toggle {
  width: 100%;
  min-height: 42px;
  margin: 14px 0 0;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

body.pb-cart-ux .pb-coupon-panel {
  display: none;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid #e1e7ed;
  border-radius: 9px;
  background: #fff;
}

body.pb-cart-ux .pb-coupon-panel.is-open {
  display: block;
}

/* --------------------------------------------------------------------------
 * Checkout
 * ----------------------------------------------------------------------- */

body.pb-checkout-ux form.checkout > .row > .large-7,
body.pb-checkout-ux form.checkout > .row > .large-5 {
  padding-left: 12px;
  padding-right: 12px;
}

body.pb-checkout-ux .woocommerce-billing-fields,
body.pb-checkout-ux .woocommerce-shipping-fields,
body.pb-checkout-ux .woocommerce-additional-fields,
body.pb-checkout-ux #order_review {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #dce5ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 35, 55, .04);
}

body.pb-checkout-ux .woocommerce-billing-fields > h3,
body.pb-checkout-ux .woocommerce-shipping-fields h3,
body.pb-checkout-ux .woocommerce-additional-fields > h3,
body.pb-checkout-ux .checkout-sidebar h3 {
  margin-top: 0;
  color: #203040;
  text-transform: none;
  letter-spacing: 0;
  font-size: 20px;
  line-height: 1.2;
}

body.pb-checkout-ux form.checkout input.input-text,
body.pb-checkout-ux form.checkout select,
body.pb-checkout-ux form.checkout textarea {
  min-height: 48px;
  border: 1px solid #cdd8e2;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body.pb-checkout-ux form.checkout textarea {
  min-height: 96px;
  padding-top: 10px;
}

body.pb-checkout-ux form.checkout input.input-text:focus,
body.pb-checkout-ux form.checkout select:focus,
body.pb-checkout-ux form.checkout textarea:focus {
  border-color: var(--primary-color, #1e73be);
  box-shadow: 0 0 0 3px rgba(30, 115, 190, .10);
}

body.pb-checkout-ux #ship-to-different-address {
  margin: 2px 0 12px;
  padding: 12px 14px;
  border: 1px solid #e0e7ee;
  border-radius: 9px;
  background: #f8fafc;
  font-size: 14px;
}

body.pb-checkout-ux #ship-to-different-address label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-weight: 700;
}

body.pb-checkout-ux #ship-to-different-address input {
  width: 19px;
  height: 19px;
  margin: 0;
}

body.pb-checkout-ux #order_review {
  position: sticky;
  top: 92px;
}

body.pb-checkout-ux #order_review .shop_table {
  margin-bottom: 16px;
}

body.pb-checkout-ux #shipping_method.shipping__list,
body.pb-checkout-ux .wc_payment_methods {
  margin: 8px 0 0;
}

body.pb-checkout-ux #shipping_method .shipping__list_item,
body.pb-checkout-ux .wc_payment_methods > li {
  margin: 0 0 8px;
  padding: 11px 12px;
  border: 1px solid #dfe6ed;
  border-radius: 9px;
  background: #fff;
}

body.pb-checkout-ux #shipping_method .shipping__list_label,
body.pb-checkout-ux .wc_payment_methods > li > label {
  color: #2b3e50;
  font-size: 14px;
  font-weight: 700;
}

body.pb-checkout-ux .wc_payment_methods .payment_box {
  margin: 10px -2px 0;
  padding: 10px 0 0;
  background: transparent;
  color: #5d6d7c;
}

body.pb-checkout-ux .wc_payment_methods .payment_box::before {
  display: none;
}

body.pb-checkout-ux #place_order {
  width: 100%;
  min-height: 54px;
  border-radius: 9px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  font-weight: 800;
}

body.pb-checkout-ux .woocommerce-privacy-policy-text {
  color: #687785;
  font-size: 12px;
  line-height: 1.5;
}

body.pb-cart-ux #footer .footer-widgets,
body.pb-cart-ux #footer .footer-1,
body.pb-checkout-ux #footer .footer-widgets,
body.pb-checkout-ux #footer .footer-1 {
  display: none !important;
}

@media (max-width: 849px) {
  body.pb-order-ux .product-main {
    padding-top: 8px;
    padding-bottom: 28px;
  }

  body.pb-order-ux .product-main > .row.content-row > .large-9 {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.pb-order-ux .product-gallery,
  body.pb-order-ux .product-info {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  body.pb-order-ux .product-gallery {
    margin-bottom: 18px;
  }

  body.pb-order-ux .product-gallery .product-images {
    max-width: 225px;
    margin: 0 auto;
  }

  body.pb-order-ux .product-gallery .flickity-viewport {
    height: 225px !important;
  }

  body.pb-order-ux .product-gallery .product-thumbnails,
  body.pb-order-ux .product-gallery .product-thumbnails-thumbnails {
    display: none !important;
  }

  body.pb-order-ux .product-info .breadcrumbs {
    display: none;
  }

  body.pb-order-ux .product-info .product-title {
    margin-bottom: 14px;
    font-size: 30px;
  }

  body.pb-order-ux .nbo-wrapper select.nbo-dropdown,
  body.pb-order-ux .nbo-wrapper select {
    min-height: 50px;
    font-size: 16px;
  }

  .pb-order-summary__rows,
  .pb-order-summary__rows--compact {
    grid-template-columns: 1fr;
  }

  body.pb-order-ux .pb-pricing-toggle,
  body.pb-order-ux .nbdesign-button,
  body.pb-order-ux button.single_add_to_cart_button {
    width: 100%;
    min-height: 50px;
    margin-left: 0;
    margin-right: 0;
  }

  body.pb-order-ux .nbo-table-pricing {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  body.pb-cart-ux .woocommerce-cart-form .cart_item {
    border: 1px solid #e0e7ee;
    border-radius: 12px;
    background: #fff;
  }

  body.pb-cart-ux .woocommerce-cart-form .product-thumbnail {
    width: 82px;
  }

  body.pb-cart-ux .woocommerce-cart-form .product-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
  }

  body.pb-cart-ux .cart-collaterals .cart-sidebar {
    margin-top: 14px;
    padding: 17px;
  }

  body.pb-checkout-ux form.checkout > .row > .large-7,
  body.pb-checkout-ux form.checkout > .row > .large-5 {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
    padding-left: 7px;
    padding-right: 7px;
  }

  body.pb-checkout-ux .woocommerce-billing-fields,
  body.pb-checkout-ux .woocommerce-shipping-fields,
  body.pb-checkout-ux .woocommerce-additional-fields,
  body.pb-checkout-ux #order_review {
    padding: 17px 15px;
    border-radius: 12px;
    box-shadow: none;
  }

  body.pb-checkout-ux #order_review {
    position: static;
  }

  body.pb-checkout-ux .form-row-first,
  body.pb-checkout-ux .form-row-last {
    width: 100%;
    float: none;
  }

  body.pb-checkout-ux form.checkout input.input-text,
  body.pb-checkout-ux form.checkout select {
    min-height: 50px;
    font-size: 16px;
  }
}
