/* PFX1 Site Studio 2.3.5 — stable course Mini Cart contract */

/* Canonical server/JS marker. */
.pfx1-course-mini-cart-row :where(
  .wc-block-components-product-metadata,
  .wc-block-components-product-details,
  .wc-block-components-product-details__item,
  .variation,
  .elementor-menu-cart__product-variation,
  .woocommerce-mini-cart-item__variation,
  .pfx1-course-plan-item,
  .pfx1-course-plan-summary
) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* CSS fallback for fragments rendered before the row marker is attached. */
:where(
  .wc-block-mini-cart__drawer .wc-block-cart-items__row,
  .wc-block-mini-cart__drawer .wc-block-components-order-summary-item,
  .wc-block-mini-cart__items .wc-block-cart-items__row,
  .elementor-menu-cart__product,
  .woocommerce-mini-cart-item,
  .mini_cart_item
):has(.pfx1-course-plan-summary) :where(
  .wc-block-components-product-metadata,
  .wc-block-components-product-details,
  .wc-block-components-product-details__item,
  .variation,
  .elementor-menu-cart__product-variation,
  .woocommerce-mini-cart-item__variation,
  .pfx1-course-plan-item,
  .pfx1-course-plan-summary
) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.pfx1-course-mini-cart-row {
  min-height: 0 !important;
  height: auto !important;
  align-content: start !important;
}

.pfx1-course-mini-cart-row :where(
  .wc-block-components-product-name,
  .elementor-menu-cart__product-name,
  .woocommerce-mini-cart-item__name
) {
  margin-top: 0 !important;
  margin-bottom: 5px !important;
  line-height: 1.75 !important;
}

.pfx1-course-mini-cart-row :where(
  .wc-block-components-product-price,
  .wc-block-components-product-line-price,
  .elementor-menu-cart__product-price,
  .woocommerce-mini-cart-item__price,
  .quantity
) {
  margin-top: 0 !important;
  line-height: 1.7 !important;
}

/* The item itself must not inherit the tall plan card dimensions. */
:where(
  .elementor-menu-cart__container,
  .widget_shopping_cart_content,
  .woocommerce.widget_shopping_cart,
  .wc-block-mini-cart__drawer
) .pfx1-course-mini-cart-row {
  max-height: none !important;
  overflow: visible !important;
}

/* 2.4.0: absolute compact contract for dynamically refreshed drawers. */
:where(
  .elementor-menu-cart__container,
  .widget_shopping_cart_content,
  .woocommerce.widget_shopping_cart,
  .wc-block-mini-cart__drawer,
  .wc-block-mini-cart__items
) :where(.pfx1-mini-cart-detail-hidden, [hidden][aria-hidden="true"]) {
  display: none !important;
}

:where(
  .elementor-menu-cart__container,
  .widget_shopping_cart_content,
  .woocommerce.widget_shopping_cart,
  .wc-block-mini-cart__drawer
) .pfx1-course-mini-cart-row--compact {
  min-height: 82px !important;
  height: auto !important;
  max-height: 150px !important;
  overflow: hidden !important;
  padding-block: 10px !important;
}

:where(
  .elementor-menu-cart__container,
  .widget_shopping_cart_content,
  .woocommerce.widget_shopping_cart,
  .wc-block-mini-cart__drawer
) .pfx1-course-mini-cart-row--compact :where(
  .pfx1-course-plan-summary,
  .pfx1-course-plan-item,
  .wc-block-components-product-metadata,
  .wc-block-components-product-details,
  .variation,
  dl.variation,
  .elementor-menu-cart__product-variation,
  .woocommerce-mini-cart-item__variation
) {
  display: none !important;
}


/* =========================================================
   PFX1 Site Studio 2.8.15 — Bundle Mini-Cart layout contract
   ========================================================= */

/* Desktop: enough width for three bundle rows without compressed titles. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
  width: min(340px, calc(100vw - 24px)) !important;
  min-width: min(340px, calc(100vw - 24px)) !important;
  max-width: min(340px, calc(100vw - 24px)) !important;
}

body.pfx1-frontend-field-contract .elementor-menu-cart__products {
  padding-inline: 10px !important;
}

/* Course parent + its two dependency gifts fit as a compact three-row stack. */
body.pfx1-frontend-field-contract :is(
  .pfx1-course-mini-cart-row--compact,
  .pfx1-course-bundle-gift-mini-cart-row
) {
  min-height: 70px !important;
  height: auto !important;
  max-height: 92px !important;
  padding: 8px 6px !important;
  gap: 8px !important;
  overflow: hidden !important;
}

body.pfx1-frontend-field-contract :is(
  .pfx1-course-mini-cart-row--compact,
  .pfx1-course-bundle-gift-mini-cart-row
) :is(
  .elementor-menu-cart__product-image img,
  img.attachment-woocommerce_thumbnail
) {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

body.pfx1-frontend-field-contract :is(
  .pfx1-course-mini-cart-row--compact,
  .pfx1-course-bundle-gift-mini-cart-row
) :is(
  .elementor-menu-cart__product-name,
  .woocommerce-mini-cart-item__name
) {
  margin: 0 0 2px !important;
  font-size: 11.5px !important;
  line-height: 1.55 !important;
}

body.pfx1-frontend-field-contract :is(
  .pfx1-course-mini-cart-row--compact,
  .pfx1-course-bundle-gift-mini-cart-row
) :is(
  .elementor-menu-cart__product-price,
  .woocommerce-mini-cart-item__price,
  .quantity
) {
  margin: 0 !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
}

/* Gift dependency metadata belongs in Cart/Checkout, not the header drawer. */
body.pfx1-frontend-field-contract .pfx1-course-bundle-gift-mini-cart-row :is(
  .elementor-menu-cart__product-variation,
  .woocommerce-mini-cart-item__variation,
  .variation,
  dl.variation,
  .wc-block-components-product-metadata,
  .wc-block-components-product-details,
  .pfx1-course-plan-summary,
  .pfx1-course-plan-item
) {
  display: none !important;
}

/* A bundled gift is not independently removable. */
body.pfx1-frontend-field-contract .pfx1-course-bundle-gift-mini-cart-row :is(
  .elementor_remove_from_cart_button,
  .remove_from_cart_button,
  .elementor-menu-cart__remove-button,
  a.remove,
  a[href*="remove_item"]
) {
  display: none !important;
}

/* Three/four items stay scrollbar-free; larger carts may scroll. */
body.pfx1-frontend-field-contract .elementor-menu-cart__products:not(:has(> :nth-child(5))) {
  max-height: none !important;
  overflow-y: visible !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__products:has(> :nth-child(5)) {
  max-height: min(420px, calc(100vh - 250px)) !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
}

@media (max-width: 767px) {
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
    width: min(330px, calc(100vw - 16px)) !important;
    min-width: min(330px, calc(100vw - 16px)) !important;
    max-width: min(330px, calc(100vw - 16px)) !important;
  }
}

/* =========================================================
   PFX1 Site Studio 2.8.17 — Atomic Cart UI + compact bundle
   ========================================================= */

/* Dependency gifts never expose independent delete controls — classic Cart,
   Blocks Cart and every Elementor/Woo Mini Cart markup variant. */
body .pfx1-course-bundle-gift-cart-row :is(
  .product-remove a,
  .wc-block-cart-item__remove-link,
  a.remove,
  a[href*="remove_item"]
),
body .pfx1-course-bundle-gift-mini-cart-row :is(
  .elementor_remove_from_cart_button,
  .remove_from_cart_button,
  .elementor-menu-cart__remove-button,
  .wc-block-cart-item__remove-link,
  a.remove,
  a[href*="remove_item"]
),
body .pfx1-course-bundle-gift-cart-row [hidden][aria-hidden="true"],
body .pfx1-course-bundle-gift-mini-cart-row [hidden][aria-hidden="true"] {
  display: none !important;
}

body .pfx1-course-bundle-gift-mini-cart-row .pfx1-course-bundle-gift-badge {
  width: fit-content !important;
  margin: 3px 0 0 !important;
  padding: 2px 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(0, 224, 197, .24) !important;
  border-radius: 999px !important;
  background: rgba(0, 224, 197, .055) !important;
  color: rgba(190, 248, 240, .82) !important;
  font-size: 9.5px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
}

/* 5.7.66 — Cart visual ownership cleanup.
   Cart geometry, gift price placement and card styling are owned solely by
   commerce-composition.css. This integration file keeps only dependency
   semantics (gift remove suppression / Mini Cart behavior). */

/* Optimistic remove: the row vanishes immediately while the canonical server
   mutation and in-place Cart surface replacement finish in the background. */
body.woocommerce-cart .cart_item.is-pfx1-inline-removing,
body.woocommerce-cart .wc-block-cart-items__row.is-pfx1-inline-removing {
  opacity: 0 !important;
  transform: translateY(-4px) !important;
  pointer-events: none !important;
  transition: opacity 90ms ease, transform 90ms ease !important;
}

/* Strengthen the <=4 item Mini Cart no-scroll contract without depending on a
   theme/body helper class. */
body .elementor-menu-cart__products:not(:has(> :nth-child(5))) {
  max-height: none !important;
  overflow-y: visible !important;
}
body .elementor-menu-cart__products:has(> :nth-child(5)) {
  max-height: min(420px, calc(100vh - 250px)) !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
}

/* =========================================================
   PFX1 Site Studio 2.8.17 — Gift slot + stable atomic Cart
   ========================================================= */

/* Elementor's current Menu Cart renders its X as the outer
   .elementor-menu-cart__product-remove node. Hide that legacy control on gift
   rows even before JS swaps it with the dependency badge. */
body .pfx1-course-bundle-gift-mini-cart-row .elementor-menu-cart__product-remove {
  display: none !important;
}

/* JS replaces the former X slot itself with this compact status. The badge is
   intentionally short — the product title already explains the dependency. */
body .pfx1-course-bundle-gift-mini-cart-row .pfx1-course-bundle-gift-badge--mini-slot {
  width: auto !important;
  min-width: 34px !important;
  min-height: 22px !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  border: 1px solid rgba(0, 224, 197, .28) !important;
  border-radius: 999px !important;
  background: rgba(0, 224, 197, .07) !important;
  color: rgba(190, 248, 240, .88) !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

/* When the last Cart bundle is removed, the locally-rendered canonical empty
   card uses the same approved Commerce empty-state contract immediately. */
body.woocommerce-cart.pfx1-commerce-surface.pfx1-cart-inline-empty
.wp-block-woocommerce-empty-cart-block.pfx1-empty-cart-clean {
  display: block !important;
}

/* =========================================================
   PFX1 Site Studio 2.8.18 — contained gift slot + canonical empty state
   ========================================================= */

/* The Gift status occupies the former remove-control area, but it is anchored
   to the product row itself rather than inheriting Elementor's X transforms.
   Reserve an internal left slot so the badge can never protrude outside the
   drawer border. */
body.pfx1-frontend-field-contract .pfx1-course-bundle-gift-mini-cart-row {
  position: relative !important;
  padding-left: 52px !important;
  overflow: hidden !important;
}

body.pfx1-frontend-field-contract .pfx1-course-bundle-gift-mini-cart-row .pfx1-course-bundle-gift-badge--mini-slot {
  position: absolute !important;
  left: 8px !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  z-index: 5 !important;

  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 21px !important;
  margin: 0 !important;
  padding: 2px 4px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: 1px solid rgba(0, 224, 197, .30) !important;
  border-radius: 999px !important;
  background: rgba(0, 224, 197, .08) !important;
  color: rgba(190, 248, 240, .90) !important;
  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
}

/* A canonical empty mutation must also clear the old subtotal/action shell.
   Elementor has !important display rules on some themes, therefore the hidden
   attribute alone is not strong enough. */
body.pfx1-mini-cart-forced-empty :is(
  .elementor-menu-cart__subtotal,
  .woocommerce-mini-cart__total,
  .elementor-menu-cart__footer-buttons,
  .elementor-menu-cart__buttons,
  .woocommerce-mini-cart__buttons
),
body .pfx1-mini-cart-forced-empty-root :is(
  .elementor-menu-cart__subtotal,
  .woocommerce-mini-cart__total,
  .elementor-menu-cart__footer-buttons,
  .elementor-menu-cart__buttons,
  .woocommerce-mini-cart__buttons
) {
  display: none !important;
}

body.pfx1-mini-cart-forced-empty .elementor-menu-cart__products,
body .pfx1-mini-cart-forced-empty-root .elementor-menu-cart__products {
  max-height: none !important;
  overflow: visible !important;
}

body .pfx1-mini-cart-canonical-empty {
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 10px !important;
  text-align: center !important;
}


/* =========================================================
   PFX1 Site Studio 5.9.29 — TRUE SINGLE-SCROLL MINI CART
   Exactly one element owns vertical scrolling: the product list.
   Elementor dialog/main/widget wrappers must never create a second scrollbar.
   ========================================================= */
body.pfx1-frontend-field-contract .elementor-menu-cart__container,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper {
  overflow: hidden !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior: none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* Elementor product list is the only scroll owner. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products {
  min-height: 0 !important;
  max-height: min(52vh, 430px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(42,198,238,.78) rgba(4,18,31,.50) !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar {
  width: 7px !important;
  height: 0 !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar-track {
  background: rgba(4,18,31,.50) !important;
  border-radius: 999px !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar-thumb {
  border: 1px solid rgba(4,18,31,.65) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg,rgba(34,211,238,.88),rgba(59,130,246,.78)) !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg,rgba(103,232,249,.96),rgba(96,165,250,.92)) !important;
}

/* If Woo's classic UL exists *inside* Elementor's product scroller, it must
   never become a second nested scroll owner. */
body.pfx1-frontend-field-contract .elementor-menu-cart__products .woocommerce-mini-cart,
body.pfx1-frontend-field-contract .elementor-menu-cart__products .woocommerce-mini-cart.cart {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__products .woocommerce-mini-cart::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Small carts do not need any scrollbar at all. */
body.pfx1-frontend-field-contract .elementor-menu-cart__products:not(:has(> :nth-child(5))) {
  max-height: none !important;
  overflow-y: visible !important;
  scrollbar-gutter: auto !important;
}


/* =========================================================
   PFX1 Site Studio 5.9.30 — SINGLE SCROLL + FIXED MINI-CART FOOTER
   5.9.29 correctly removed the nested scroller but an Elementor constrained
   ancestor could clip subtotal/actions below the product list. In 5.9.30 the
   product list remains the only scroll owner while subtotal/actions always
   stay in normal flow and visible below it.
   ========================================================= */
body.pfx1-frontend-field-contract .elementor-menu-cart__container,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message {
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  max-height: none !important;
  scrollbar-width: none !important;
}

body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
  display: flex !important;
  flex-direction: column !important;
  width: min(340px, calc(100vw - 24px)) !important;
  min-width: min(340px, calc(100vw - 24px)) !important;
  max-width: min(340px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: min(76vh, 610px) !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
}

body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  box-sizing: border-box !important;
}

/* The product region alone scrolls. Keep enough vertical budget for subtotal
   and the two canonical action buttons below it. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products {
  flex: 0 1 auto !important;
  min-height: 0 !important;
  max-height: min(45vh, 385px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  scrollbar-gutter: stable !important;
}

/* Woo classic UL inside Elementor must never become a nested scroller. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products :is(
  .woocommerce-mini-cart,
  .woocommerce-mini-cart.cart
) {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  scrollbar-width: none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products :is(
  .woocommerce-mini-cart,
  .woocommerce-mini-cart.cart
)::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Footer is never allowed to shrink or be swallowed by the products area. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container :is(
  .elementor-menu-cart__subtotal,
  .woocommerce-mini-cart__total,
  .elementor-menu-cart__footer-buttons,
  .elementor-menu-cart__buttons,
  .woocommerce-mini-cart__buttons
) {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 3 !important;
}

/* Restore Elementor action shell whenever the cart really has products.
   This also protects against a stale `hidden` state after AJAX fragments. */
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__subtotal,.woocommerce-mini-cart__total) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__footer-buttons,.elementor-menu-cart__buttons) {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) .woocommerce-mini-cart__buttons {
  display: flex !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Small carts remain scrollbar-free. */
body.pfx1-frontend-field-contract .elementor-menu-cart__products:not(:has(> :nth-child(5))) {
  max-height: none !important;
  overflow-y: visible !important;
  scrollbar-gutter: auto !important;
}

@media (max-width: 767px) {
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
    width: min(330px, calc(100vw - 16px)) !important;
    min-width: min(330px, calc(100vw - 16px)) !important;
    max-width: min(330px, calc(100vw - 16px)) !important;
    max-height: min(78vh, 590px) !important;
  }
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products {
    max-height: min(46vh, 360px) !important;
  }
}


/* =========================================================
   PFX1 Site Studio 5.9.31 — WHOLE-CONTENT SINGLE-SCROLL MINI CART
   One and only one vertical scroll owner: widget_shopping_cart_content.
   Products, subtotal and both action buttons move together in the same scroll.
   This intentionally supersedes 5.9.29/5.9.30 product-only scrolling.
   ========================================================= */
body.pfx1-frontend-field-contract .elementor-menu-cart__container,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper {
  overflow: hidden !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior: none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
  display: block !important;
  width: min(340px, calc(100vw - 24px)) !important;
  min-width: min(340px, calc(100vw - 24px)) !important;
  max-width: min(340px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: min(76vh, 610px) !important;
  box-sizing: border-box !important;
}

/* THE ONLY SCROLL OWNER. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: min(70vh, 560px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(42,198,238,.82) rgba(4,18,31,.50) !important;
  padding-inline-end: 3px !important;
  box-sizing: border-box !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar {
  display: block !important;
  width: 7px !important;
  height: 0 !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar-track {
  background: rgba(4,18,31,.50) !important;
  border-radius: 999px !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar-thumb {
  border: 1px solid rgba(4,18,31,.65) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg,rgba(34,211,238,.90),rgba(59,130,246,.80)) !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg,rgba(103,232,249,.98),rgba(96,165,250,.94)) !important;
}

/* Products never own scrolling — regardless of item count. This overrides all
   historical :has(:nth-child(5)) product-list scroll contracts. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart.cart {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  scrollbar-gutter: auto !important;
  scrollbar-width: none !important;
  overscroll-behavior: auto !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Subtotal and actions participate in the exact same document flow/scroll. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container :is(
  .elementor-menu-cart__subtotal,
  .woocommerce-mini-cart__total,
  .elementor-menu-cart__footer-buttons,
  .elementor-menu-cart__buttons,
  .woocommerce-mini-cart__buttons
) {
  position: static !important;
  inset: auto !important;
  flex: none !important;
  z-index: auto !important;
}

/* Keep footer/actions present after Woo/Elementor AJAX reconciliation. */
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__subtotal,.woocommerce-mini-cart__total) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__footer-buttons,.elementor-menu-cart__buttons) {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.pfx1-frontend-field-contract .widget_shopping_cart_content:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) .woocommerce-mini-cart__buttons {
  display: flex !important;
  gap: 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
    width: min(330px, calc(100vw - 16px)) !important;
    min-width: min(330px, calc(100vw - 16px)) !important;
    max-width: min(330px, calc(100vw - 16px)) !important;
    max-height: min(78vh, 590px) !important;
  }
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content {
    max-height: min(72vh, 540px) !important;
  }
}


/* =========================================================
   PFX1 Site Studio 5.9.32 — ELEMENTOR MAIN AS THE SINGLE SCROLL OWNER
   Real Elementor DOM: footer-buttons are siblings of widget_shopping_cart_content
   inside elementor-menu-cart__main. Therefore the main shell itself must own
   the only scrollbar if products + subtotal + actions are to move together.
   ========================================================= */
body.pfx1-frontend-field-contract .elementor-menu-cart__container,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper {
  overflow: hidden !important;
  overflow-y: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior: none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-widget-content::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .dialog-message::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__wrapper::-webkit-scrollbar {
  display:none !important;
  width:0 !important;
  height:0 !important;
}

/* The ONE vertical scroll owner. It contains the close control, products,
   subtotal and Elementor footer-buttons in one natural document flow. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
  display:block !important;
  width:min(340px,calc(100vw - 24px)) !important;
  min-width:min(340px,calc(100vw - 24px)) !important;
  max-width:min(340px,calc(100vw - 24px)) !important;
  height:auto !important;
  max-height:min(500px,calc(100vh - 150px)) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior-y:contain !important;
  scrollbar-gutter:stable !important;
  scrollbar-width:thin !important;
  scrollbar-color:rgba(42,198,238,.86) rgba(4,18,31,.52) !important;
  box-sizing:border-box !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar {
  display:block !important;
  width:7px !important;
  height:0 !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar-track {
  background:rgba(4,18,31,.52) !important;
  border-radius:999px !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar-thumb {
  border:1px solid rgba(4,18,31,.70) !important;
  border-radius:999px !important;
  background:linear-gradient(180deg,rgba(34,211,238,.94),rgba(59,130,246,.84)) !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main::-webkit-scrollbar-thumb:hover {
  background:linear-gradient(180deg,rgba(103,232,249,1),rgba(96,165,250,.96)) !important;
}

/* Every descendant is explicitly forbidden from becoming another scroller. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart.cart {
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
  overflow-y:visible !important;
  overflow-x:visible !important;
  scrollbar-gutter:auto !important;
  scrollbar-width:none !important;
  overscroll-behavior:auto !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .widget_shopping_cart_content::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__products::-webkit-scrollbar,
body.pfx1-frontend-field-contract .elementor-menu-cart__container .woocommerce-mini-cart::-webkit-scrollbar {
  display:none !important;
  width:0 !important;
  height:0 !important;
}

/* Subtotal/footer are normal siblings in the same main-shell scroll flow. */
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main :is(
  .elementor-menu-cart__subtotal,
  .woocommerce-mini-cart__total,
  .elementor-menu-cart__footer-buttons,
  .elementor-menu-cart__buttons,
  .woocommerce-mini-cart__buttons
) {
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  flex:none !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__subtotal,.woocommerce-mini-cart__total) {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) :is(.elementor-menu-cart__footer-buttons,.elementor-menu-cart__buttons) {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
  visibility:visible !important;
  opacity:1 !important;
  margin-bottom:0 !important;
  padding-bottom:0 !important;
}
body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main:has(
  .elementor-menu-cart__product,
  .mini_cart_item,
  .woocommerce-mini-cart-item
) .woocommerce-mini-cart__buttons {
  display:flex !important;
  gap:8px !important;
  visibility:visible !important;
  opacity:1 !important;
}

@media (max-width:767px) {
  body.pfx1-frontend-field-contract .elementor-menu-cart__container .elementor-menu-cart__main {
    width:min(330px,calc(100vw - 16px)) !important;
    min-width:min(330px,calc(100vw - 16px)) !important;
    max-width:min(330px,calc(100vw - 16px)) !important;
    max-height:min(72vh,500px) !important;
  }
}
