/* Checkout: cart, cart confirm, payment — new design */

.page.nd-checkout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 18px 110px;
  overflow-x: hidden;
}

/* Legacy cart view embeds its own search; header already provides search in ND */
.nd-checkout .ct-videoSection,
.nd-checkout .home-quick-search-wrap,
.nd-checkout .common-search,
.nd-checkout .home-mobile-search-wrap {
  display: none !important;
}

.nd-checkout-loading {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 29, 58, 0.45);
}

.nd-checkout-loading__panel {
  background: var(--white);
  border-radius: var(--radius, 12px);
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(7, 29, 58, 0.18);
}

.nd-checkout-loading__panel img {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
}

.nd-checkout .mainContent,
.nd-checkout .varify-submit-page {
  width: 100%;
  max-width: none;
  padding: 0 !important;
  float: none !important;
}

.nd-checkout .car-lists,
.nd-checkout .productlisting,
.nd-checkout .form-fill-cart,
.nd-checkout .cart-form-grid {
  float: none !important;
  width: 100%;
  max-width: 100%;
}

.nd-checkout .car-lists.productlisting,
.nd-checkout .car-lists.productbaselisting {
  background: var(--white);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  padding: 20px;
  margin: 0 0 20px !important;
  box-shadow: 0 8px 24px rgba(7, 29, 58, 0.04);
}

.nd-checkout .cart-user-form,
.nd-checkout h4.orderHistory {
  color: var(--blue-950);
  font-weight: 900;
}

.nd-checkout .form-control {
  min-height: 44px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  font: inherit;
}

.nd-checkout .control-label,
.nd-checkout label {
  color: var(--blue-800);
  font-weight: 700;
}

.nd-checkout .actn-btn,
.nd-checkout .btn.actn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.nd-checkout .actn-btn:hover,
.nd-checkout .btn.actn-btn:hover {
  filter: brightness(0.96);
}

.nd-checkout .sticky_bottom.productBtnsFixedBottom {
  display: block !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: var(--white);
  border-top: 1px solid var(--line, #e5e7eb);
  box-shadow: 0 -10px 28px rgba(7, 29, 58, 0.1);
}

.nd-checkout .sticky_bottom .btn2,
.nd-checkout .sticky_bottom .actn-btn2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 120px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: #fff !important;
}

.nd-checkout .nav-prex-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.nd-checkout .nav-prex-next .btn.actn-btn,
.nd-checkout .nav-prex-next .btn2.actn-btn2 {
  margin: 0;
}

/* Fallback cart action colors if dynamic_colors is unavailable */
.nd-checkout .cart_back_btn_color {
  background-color: #5b6777 !important;
  color: #fff !important;
}

.nd-checkout .cart_save_btn_color {
  background-color: var(--orange, #f97316) !important;
  color: #fff !important;
}

.nd-checkout .cart_submit_btn_color {
  background-color: var(--blue-900, #0f3b78) !important;
  color: #fff !important;
}

.nd-checkout .displaynon {
  display: none !important;
}

.nd-checkout .my-table,
.nd-checkout table.table {
  font-size: 14px;
}

.nd-checkout .my-table th,
.nd-checkout table.table th {
  background: rgba(15, 59, 120, 0.06);
  color: var(--blue-950);
  font-weight: 800;
}

.nd-checkout--confirm .varify-submit-page {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

/* Review timer — plain row like legacy confirm */
.nd-checkout--confirm .nd-confirm-timer {
  gap: 16px;
  padding: 0 0 12px !important;
  margin-bottom: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.nd-checkout--confirm .nd-confirm-timer .block-message {
  flex: 1 1 220px;
  margin: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

.nd-checkout--confirm .nd-confirm-timer .block-message h5 {
  margin: 0;
  font-size: 15px !important;
  line-height: 1.45;
  color: #000 !important;
  font-weight: 600 !important;
}

.nd-checkout--confirm .counter_msg_wrap_counter {
  flex: 0 0 auto;
}

.nd-checkout--confirm .counter_msg_wrap_counter .flip-clock-wrapper {
  margin: 0;
  transform: scale(0.82);
  transform-origin: right center;
}

/* Quotation document — single flat layout, no extra outer boxes */
.nd-checkout--confirm #sales_preview_order {
  margin-top: 0;
}

.nd-checkout--confirm #sales_preview_order .brandDetailInfo {
  display: table !important;
  width: 100% !important;
  border: 1px solid #000 !important;
  border-radius: 0 !important;
  padding: 10px !important;
  margin-bottom: 10px !important;
  background: transparent !important;
  gap: 0;
}

.nd-checkout--confirm #sales_preview_order .brandDetails {
  display: table-cell !important;
  vertical-align: top !important;
  padding: 10px !important;
  width: auto !important;
}

.nd-checkout--confirm #sales_preview_order .brandDetails img {
  max-width: 140px;
  height: auto;
}

.nd-checkout--confirm #sales_preview_order .invoiceDetails p {
  border-color: #000 !important;
  border-radius: 0;
}

.nd-checkout--confirm #sales_preview_order .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 10px;
  padding-top: 10px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.nd-checkout--confirm #sales_preview_order table {
  width: 100% !important;
  border-color: #000 !important;
  border-collapse: collapse;
  font-size: 12px;
  margin: 0;
}

.nd-checkout--confirm #sales_preview_order table td,
.nd-checkout--confirm #sales_preview_order table th {
  border-color: #000 !important;
  padding: 8px 10px !important;
  vertical-align: top;
}

.nd-checkout--confirm #sales_preview_order thead th {
  background: transparent !important;
  color: inherit;
  position: static;
}

.nd-checkout--confirm #sales_preview_order thead p,
.nd-checkout--confirm #sales_preview_order tbody p {
  margin: 4px 0;
  line-height: 1.35;
  font-size: 12px;
}

/* Captcha — single horizontal row */
.nd-checkout--confirm .nd-confirm-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 20px 0 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.nd-checkout--confirm .nd-confirm-captcha__label {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.nd-checkout--confirm .nd-confirm-captcha__image {
  flex: 0 0 auto;
  line-height: 0;
}

.nd-checkout--confirm .nd-confirm-captcha__image img {
  display: block;
  max-height: 50px;
  width: auto;
}

.nd-checkout--confirm .nd-confirm-captcha__input {
  flex: 1 1 180px;
  width: auto;
  max-width: 260px;
  min-width: 160px;
  min-height: 44px;
  margin: 0;
}

.nd-checkout--confirm .nd-confirm-captcha .trynewcaptcha {
  flex: 0 0 auto;
  margin: 0 !important;
  min-height: 44px;
  padding: 0 20px;
  white-space: nowrap;
}

/* Action buttons — left aligned */
.nd-checkout--confirm .nd-confirm-actions {
  margin-top: 4px;
  margin-bottom: 8px;
}

.nd-checkout--confirm .nd-confirm-actions__bar {
  text-align: left;
}

.nd-checkout--confirm .nd-confirm-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.nd-checkout--confirm .nd-confirm-actions .nav-prex-next {
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nd-checkout--confirm .nd-confirm-btn {
  width: auto !important;
  max-width: 100%;
  min-width: 110px;
  min-height: 44px;
  padding: 0 20px;
  margin: 0 !important;
  border-radius: 8px !important;
}

.nd-checkout--confirm .nd-confirm-btn--primary,
.nd-checkout--confirm .nd-confirm-btn--print,
.nd-checkout--confirm .nd-confirm-btn--secondary,
.nd-checkout--confirm .nd-confirm-btn--outline,
.nd-checkout--confirm .nd-confirm-captcha .nd-confirm-btn {
  background: var(--orange, #f97316) !important;
  color: var(--white) !important;
  border: 0 !important;
}

.nd-checkout--confirm .nd-confirm-btn--outline:hover,
.nd-checkout--confirm .nd-confirm-captcha .nd-confirm-btn:hover {
  filter: brightness(0.96);
  background: var(--orange, #f97316) !important;
}

/* Override legacy cart-confirm.css forcing all buttons red */
.nd-checkout--confirm .car-lists .btn.actn-btn,
.nd-checkout--confirm .col-md-12 .btn.actn-btn,
.nd-checkout--confirm .nav-prex-next .btn.actn-btn {
  background-color: var(--orange, #f97316) !important;
  color: #fff !important;
}

.nd-checkout--confirm .block-message.warning h5 {
  color: var(--blue-950) !important;
  font-weight: 700 !important;
}

.nd-checkout--payment .mainContent,
.nd-checkout--payment .payment-page-wrap {
  background: var(--white);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  padding: 24px;
}

.nd-checkout--payment #payment-panels.paymentPanel {
  max-width: 100%;
  margin: 2rem 0 !important;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.nd-checkout--payment #payment-panels .nd-payment-panel__heading {
  padding: 20px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.nd-checkout--payment #payment-panels .nd-payment-panel__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.nd-checkout--payment #payment-panels .nd-payment-panel__amount {
  float: none;
  font-size: 14px;
  font-weight: 400;
  color: #000;
  white-space: nowrap;
}

.nd-checkout--payment .nd-payment-credit-term {
  margin-bottom: 1rem;
}

.nd-checkout--payment .nd-payment-credit-term__limit {
  margin: 0 0 1rem;
  font-weight: 600;
  color: #333;
}

.nd-checkout--payment .nd-payment-credit-term__question {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #333;
}

.nd-checkout--payment .nd-payment-credit-term__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.nd-checkout--payment .nd-payment-credit-term__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nd-checkout--payment .nd-payment-credit-term input[type="radio"] {
  accent-color: var(--orange, #f97316);
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.nd-checkout--payment .nd-payment-credit-term__radio label {
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}

.nd-checkout--payment .nd-payment-credit-term .cart_asterisk {
  color: #dc2626;
}

.nd-checkout--payment #payment-panels .panel-body {
  float: none !important;
  width: 100%;
  padding: 20px;
}

.nd-checkout--payment #payment-panels .form-group.row {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.nd-checkout--payment #payment-panels .form-control {
  padding: 10px 12px !important;
  margin-bottom: 8px;
  min-height: 44px;
  border: 1px solid var(--border, #e5e7eb) !important;
  border-radius: 10px;
  box-shadow: none !important;
}

.nd-checkout--payment #payment-panels .nd-payment-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.nd-checkout--payment #payment-panels .nd-payment-actions__buttons .btn,
.nd-checkout--payment #payment-panels .nd-payment-actions__buttons .actn-btn {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 28px !important;
  border-radius: 999px !important;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  z-index: auto !important;
}

.nd-checkout--payment #payment-panels .btn-cancel,
.nd-checkout--payment #payment-panels .btn-pay {
  margin-top: 0 !important;
}

.nd-checkout--payment #payment-panels .nd-payment-accept {
  margin-top: 20px;
}

.nd-checkout--payment #payment-panels .trynewcaptcha {
  display: inline-block;
  margin-top: 8px;
  cursor: pointer;
}

.nd-checkout .width50px {
  width: 50px !important;
  min-width: 50px;
  max-width: 50px;
  box-sizing: border-box;
}

.nd-checkout .help-block.blink_error {
  color: #dc2626;
  font-size: 13px;
  display: block;
  font-weight: 600;
}

.nd-checkout .incoterms_block.has-error {
  border: 2px solid #dc2626;
  border-radius: 10px;
  padding: 12px;
  background: rgba(220, 38, 38, 0.04);
}

.nd-checkout .incoterms_block.has-error .control-label {
  color: #dc2626;
}

/* Legacy cart.css forces p { color: #000 } — restore new-design footer text */
.nd-layout .footer .nd-footer-follow,
.nd-layout .nd-footer .nd-footer-follow {
  color: var(--yellow) !important;
}

.nd-layout .footer p:not(.nd-footer-follow),
.nd-layout .nd-footer p:not(.nd-footer-follow),
.nd-layout .nd-footer li,
.nd-layout .nd-footer .nd-footer-links a {
  color: rgba(255, 255, 255, 0.92);
}

.nd-layout .nd-footer .nd-footer-heading {
  color: var(--yellow) !important;
}

/* Cart line item header: keep remove (X) and collapse controls visible */
.nd-checkout .prod-detail .prod-header {
  flex-wrap: nowrap;
  gap: 10px;
}

.nd-checkout .prod-detail .prod-header > .d-flex.w-100 {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
}

.nd-checkout .prod-detail .prod-header .childparent-arrow,
.nd-checkout .prod-detail .prod-header a.black1,
.nd-checkout .prod-detail .prod-header input.minimize_block {
  flex: 0 0 auto;
}

.nd-checkout .prod-detail .prod-header a.black1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Comments field: full-width stacked layout (legacy cart.css behavior) */
.nd-checkout .prod-descp p:has(.user_comment) > span {
  display: block;
  width: 100%;
  max-width: 100%;
}

.nd-checkout .prod-descp .user_comment {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  float: none;
  min-height: 96px;
  margin-top: 6px;
}

.nd-checkout .prod-descp p:has(.user_comment) small {
  display: block;
  float: none;
  margin-top: 6px;
}

@media (max-width: 767px) {
  .page.nd-checkout {
    padding: 20px 14px 36px;
  }

  .nd-checkout .car-lists.productlisting {
    padding: 14px !important;
  }

  .nd-checkout--confirm .nd-confirm-timer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .nd-checkout--confirm .counter_msg_wrap_counter .flip-clock-wrapper {
    transform: scale(0.75);
    transform-origin: center center;
    margin: 0 auto;
  }

  .nd-checkout--confirm .nd-confirm-captcha {
    gap: 10px 12px;
  }

  .nd-checkout--confirm .nd-confirm-captcha__label {
    width: 100%;
  }

  .nd-checkout--confirm .nd-confirm-captcha__input {
    flex: 1 1 100%;
    max-width: none;
  }

  .nd-checkout--confirm .nd-confirm-actions__buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .nd-checkout--confirm .nd-confirm-btn {
    width: auto !important;
  }

  .nd-checkout--payment #payment-panels .col-md-8.offset-md-4 {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .nd-checkout--payment #payment-panels .nd-payment-actions__buttons {
    justify-content: flex-start;
  }

  /* Cart sticky action bar — stack full-width buttons on mobile */
  .nd-checkout .sticky_bottom .nav-prex-next,
  .nd-checkout .sticky_bottom .sticky_button_next {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .nd-checkout .sticky_bottom .productActionBtns {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start !important;
    gap: 10px;
    width: 100%;
  }

  .nd-checkout .sticky_bottom .btn2,
  .nd-checkout .sticky_bottom .actn-btn2,
  .nd-checkout #cart_buttons .btn.actn-btn,
  .nd-checkout #cart_buttons .btn2.actn-btn2 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: normal;
    line-height: 1.35;
    padding: 12px 16px !important;
    text-align: center;
  }

  .nd-checkout .cart_back_btn_color,
  .nd-checkout .cart_save_btn_color,
  .nd-checkout .cart_submit_btn_color {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .nd-checkout .nav-prex-next.removebuttons#cart_buttons,
  .nd-checkout #cart_buttons.nav-prex-next {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nd-checkout .sticky_bottom.productBtnsFixedBottom {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .page.nd-checkout {
    padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px));
  }

  .nd-checkout--payment #payment-panels .nd-payment-actions__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .nd-checkout--payment #payment-panels .nd-payment-actions__buttons .btn,
  .nd-checkout--payment #payment-panels .nd-payment-actions__buttons .actn-btn {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal;
    line-height: 1.35;
  }
}
