/* QMH drawer only. Product, quantity, subtotal and destination markup remain native. */
.qmh-cart-panel .qmh-cart-heading {
  flex: 0 0 auto;
}

/* Flatsome emits the list and footer as siblings inside this fragment. */
.qmh-cart-panel .widget_shopping_cart_content:has(> .woocommerce-mini-cart) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.qmh-cart-panel .widget_shopping_cart_content > .woocommerce-mini-cart {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0 10px 0 0;
}
.qmh-cart-panel .widget_shopping_cart_content > .ux-mini-cart-footer {
  flex: 0 0 auto;
  max-height: 50%;
  overflow-y: auto;
  padding-top: 12px;
  border-top: 1px solid #dedede;
  background: #fff;
}
.qmh-cart-panel .widget_shopping_cart_content > .ux-mini-cart-cross-sells {
  flex: 0 1 25%;
  min-height: 0;
  overflow-y: auto;
}

/* Flatsome's thumbnail is absolutely positioned; reserve its text space. */
.qmh-cart-panel ul.woocommerce-mini-cart > li.woocommerce-mini-cart-item {
  min-width: 0;
  padding: 12px 34px 12px 80px;
  overflow: visible;
}
.qmh-cart-panel ul.woocommerce-mini-cart > li.woocommerce-mini-cart-item img {
  top: 12px;
  width: 60px;
  height: 60px;
}
.qmh-cart-panel ul.woocommerce-mini-cart > li.woocommerce-mini-cart-item a:not(.remove) {
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
}
.qmh-cart-panel ul.woocommerce-mini-cart > li.woocommerce-mini-cart-item a.remove {
  top: 12px;
  right: 0;
}
.qmh-cart-panel .woocommerce-mini-cart-item .variation {
  overflow-wrap: anywhere;
}
.qmh-cart-panel .woocommerce-mini-cart-item .ux-mini-cart-qty {
  min-width: 0;
  max-width: 100%;
  margin-right: 0;
  flex-wrap: wrap;
  gap: 8px;
}
.qmh-cart-panel .ux-mini-cart-qty .product-subtotal,
.qmh-cart-panel .ux-mini-cart-qty .amount,
.qmh-cart-panel .woocommerce-mini-cart__total .amount {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* The homepage uses compact rounded actions and dark ink on white. */
.qmh-header .qmh-cart-panel .return-to-shop a.button,
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 10px 24px;
  border: 1px solid #21201f;
  border-radius: 999px;
  background: #21201f;
  color: #fff;
  box-shadow: none;
  font: 600 12px/1.25 Arial, sans-serif;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
}
.qmh-cart-panel .woocommerce-mini-cart__buttons {
  display: grid;
  gap: 10px;
  margin: 0;
}
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.button {
  width: 100%;
}
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.button:not(.checkout) {
  background: #fff;
  color: #21201f;
}
.qmh-header .qmh-cart-panel .return-to-shop a.button:hover,
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.checkout:hover {
  background: #44413f;
  color: #fff;
}
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.button:not(.checkout):hover {
  background: #efefed;
  color: #21201f;
}
.qmh-header .qmh-cart-panel .return-to-shop a.button:focus-visible,
.qmh-header .qmh-cart-panel .woocommerce-mini-cart__buttons a.button:focus-visible {
  outline: 2px solid #21201f;
  outline-offset: 3px;
}
