.hb-cart-sidebar,
.hb-overlay {
  --sage: #4a7c59;
  --sage-dark: #2e5238;
  --cream: #f8f4ed;
  --cream-dark: #ede8df;
  --warm-white: #fdfaf5;
  --text-dark: #1a2018;
  --text-soft: #6b7a64;
  font-family: 'DM Sans', sans-serif;
}
.hb-cart-sidebar, .hb-cart-sidebar * { box-sizing: border-box; }
.hb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.hb-overlay.open { opacity: 1; pointer-events: all; }

.hb-cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100dvh;
  background: var(--warm-white);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(30,60,30,.15);
  transform: translateX(100%);
  transition: transform .38s cubic-bezier(.23,1,.32,1);
  visibility: hidden;
}
.hb-cart-sidebar.open {
  transform: translateX(0);
  visibility: visible;
}
.hb-cart-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--cream-dark);
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}
.hb-cart-sidebar__head i { margin-right: 8px; color: var(--sage); font-size: 18px; }
.hb-cart-sidebar__close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.hb-cart-sidebar__close:hover { background: var(--cream-dark); color: var(--text-dark); }
.hb-cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  overscroll-behavior: contain;
}
.hb-cart-sidebar__body::-webkit-scrollbar { width: 4px; }
.hb-cart-sidebar__body::-webkit-scrollbar-track { background: transparent; }
.hb-cart-sidebar__body::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 4px; }

/* Mini cart rules (copied from Dr-Good-Health-common.css; the Elementor mini-cart template is used site-wide) */
/* WC widget inside sidebar — Elementor cart widget HTML */
.hb-cart-sidebar__body .woocommerce-mini-cart,
.hb-cart-sidebar__body .woocommerce-cart-form__contents { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 0; }

.hb-cart-sidebar__body .elementor-menu-cart__product {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.hb-cart-sidebar__body .elementor-menu-cart__product-image {
  grid-row: 1 / 3;
  grid-column: 1;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-image img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--cream-dark);
  background: #fff;
  padding: 4px;
  display: block;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-name {
  grid-column: 2;
  grid-row: 1;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-name a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.4;
  display: block;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-name a:hover { color: var(--sage); }
.hb-cart-sidebar__body .elementor-menu-cart__product-price {
  grid-column: 2;
  grid-row: 2;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-remove {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-remove .remove_from_cart_button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 6px;
  background: var(--cream-dark);
  transition: background .2s, color .2s;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-remove .remove_from_cart_button::after {
  content: '\00D7';
  font-size: 18px;
  line-height: 1;
  color: inherit;
}
.hb-cart-sidebar__body .elementor-menu-cart__product-remove .remove_from_cart_button:hover { background: #fde8e8; color: #c0392b; }
/* hide the duplicate elementor remove button */
.hb-cart-sidebar__body .elementor_remove_from_cart_button { display: none; }

/* subtotal */
.hb-cart-sidebar__body .elementor-menu-cart__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 12px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  border-top: 2px solid var(--sage);
}
.hb-cart-sidebar__body .elementor-menu-cart__subtotal .woocommerce-Price-amount { color: var(--sage-dark); font-size: 16px; font-weight: 700; }

/* buttons */
.hb-cart-sidebar__body .elementor-menu-cart__footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}
.hb-cart-sidebar__body .elementor-menu-cart__footer-buttons a {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .15s;
  letter-spacing: .3px;
}
.hb-cart-sidebar__body .elementor-button--view-cart { background: var(--cream-dark); color: var(--text-dark); border: 1px solid rgba(74,124,89,.15); }
.hb-cart-sidebar__body .elementor-button--view-cart:hover { background: var(--cream); }
.hb-cart-sidebar__body .elementor-button--checkout { background: var(--sage-dark); color: #fff; }
.hb-cart-sidebar__body .elementor-button--checkout:hover { background: var(--sage); transform: translateY(-1px); }

/* empty cart */
.hb-cart-sidebar__body .woocommerce-mini-cart__empty-message { text-align: center; color: var(--text-soft); font-size: 14px; padding: 40px 0; }
.hb-cart-sidebar__body .elementor-menu-cart__product-price { display: inline-block; justify-self: start; background: var(--cream-dark); border-radius: 8px; padding: 6px 10px; }
.hb-cart-sidebar__body .widget { margin: 0; padding: 0; background: none; border: 0; }
.hb-cart-sidebar__body.is-loading { opacity: .5; pointer-events: none; transition: opacity .2s; }
