/* Burke standard Magento PDP quantity picker and total calculator. */
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 16px;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
  box-sizing: border-box;
  text-align: left;
}

/* On this Porto/QuantityDropdown storefront, Product Total, .qty-box and
   .actions are direct children of the fieldset. Keep total on row one and put
   quantity plus Add to Cart together on row two. */
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-areas:
    "total total"
    "qty actions" !important;
  gap: 8px 12px !important;
  align-items: stretch !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .burke-product-total {
  grid-area: total !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .mqty-tooltip,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .my-tooltip {
  display: none !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box {
  grid-area: qty !important;
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box .qtyminus,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box .qtyplus {
  display: inline-flex !important;
  flex: 0 0 40px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f6f7f9 !important;
  color: inherit !important;
  cursor: pointer !important;
  font-size: 18px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box input.qty {
  flex: 1 1 auto !important;
  width: 178px !important;
  min-width: 0 !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: center !important;
  line-height: 46px !important;
  box-sizing: border-box !important;
  appearance: textfield !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box input.qty::-webkit-outer-spin-button,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box input.qty::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .actions {
  grid-area: actions !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .actions .action.tocart {
  display: inline-flex !important;
  flex: 1 1 auto !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout {
    grid-template-columns: 220px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }

  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .qty-box input.qty {
    width: 138px !important;
  }
}


/* Quantity input width for both Porto quantity DOM variants. The
   QuantityDropdown module can render either a direct .qty-box or Magento's
   standard .field.qty > .control structure. */
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty {
  grid-area: qty !important;
  display: flex !important;
  align-items: stretch !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .label {
  display: none !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control > input.qty {
  order: 2 !important;
  flex: 1 1 178px !important;
  width: 178px !important;
  min-width: 178px !important;
  max-width: 178px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0 !important;
  box-shadow: none !important;
  text-align: center !important;
  line-height: 46px !important;
  box-sizing: border-box !important;
  appearance: textfield !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control > .qty-changer {
  display: contents !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qtyminus,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qty-dec {
  order: 1 !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qtyplus,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qty-inc {
  order: 3 !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qtyminus,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qtyplus,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qty-dec,
body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control .qty-inc {
  display: inline-flex !important;
  flex: 0 0 40px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #f6f7f9 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty,
  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }

  body.catalog-product-view:not([class*="printq"]) .product-add-form .box-tocart .fieldset.burke-product-total-layout > .field.qty > .control > input.qty {
    flex-basis: 138px !important;
    width: 138px !important;
    min-width: 138px !important;
    max-width: 138px !important;
  }
}

/* Keep the Product Total price-break control below Porto navigation, account,
   minicart and other site-wide dropdown overlays. The price-break popover may
   layer above the product card itself, but must not create a page-wide high
   stacking context. */
body.catalog-product-view:not([class*="printq"]) .product-add-form .burke-product-total {
  position: relative !important;
  z-index: 1 !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .burke-product-total__price-breaks,
body.catalog-product-view:not([class*="printq"]) .product-add-form .burke-product-total__price-breaks-trigger {
  position: relative !important;
  z-index: auto !important;
}

body.catalog-product-view:not([class*="printq"]) .product-add-form .burke-product-total__price-breaks-popover {
  z-index: 20 !important;
}

/* Porto's global overlays must always remain above the product calculator. */
.page-header .nav-sections,
.page-header .navigation,
.page-header .navigation .submenu,
.page-header .minicart-wrapper .block-minicart,
.page-header .block-search,
.page-header .header.links,
.fotorama__fullscreen,
.modal-popup,
.modals-wrapper {
  z-index: 1000;
}
