/* HYPE Cart — off-canvas drawer. Mobile-first. Namespaced .hype-cart, no Rey deps. */

:root.hype-cart-lock { overflow: hidden; }

/* Hide Rey's native cart panel when suppression is on (preprod testing). */
:root.hype-cart-suppress-rey .js-rey-cartPanel,
:root.hype-cart-suppress-rey .rey-cartPanel { display: none !important; }

.hype-cart { position: fixed; inset: 0; z-index: 100000; visibility: hidden; pointer-events: none; }
.hype-cart.is-open { visibility: visible; pointer-events: auto; }

.hype-cart__backdrop {
	position: absolute; inset: 0; background: rgba(11, 29, 46, 0.45);
	opacity: 0; transition: opacity 0.25s ease;
}
.hype-cart.is-open .hype-cart__backdrop { opacity: 1; }

.hype-cart__panel {
	position: absolute; top: 0; right: 0; height: 100%;
	width: 100%; max-width: 420px;
	background: #fff; display: flex; flex-direction: column;
	box-shadow: -8px 0 40px rgba(0, 0, 0, 0.16);
	transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-family: inherit;
}
.hype-cart.is-open .hype-cart__panel { transform: translateX(0); }
.hype-cart.is-busy .hype-cart__inner { opacity: 0.55; pointer-events: none; }

.hype-cart__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); flex: 0 0 auto;
}
.hype-cart__title { font-size: 17px; font-weight: 600; color: #0B1D2E; }
.hype-cart__close {
	background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer;
	color: #0B1D2E; padding: 0 4px;
}

.hype-cart__inner { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; }

/* --- Free-shipping bar --- */
.hype-cart__shipbar { padding: 14px 20px; background: #F4F8FB; }
.hype-cart__shipbar-msg { margin: 0 0 8px; font-size: 13px; color: #0B1D2E; }
.hype-cart__shipbar.is-qualified .hype-cart__shipbar-msg { color: #16779B; font-weight: 600; }
.hype-cart__shipbar-track { height: 6px; border-radius: 50px; background: rgba(0, 0, 0, 0.1); overflow: hidden; }
.hype-cart__shipbar-fill { display: block; height: 100%; border-radius: 50px; background: #1A8FBA; transition: width 0.4s ease; }

/* --- Empty --- */
.hype-cart__empty { padding: 48px 20px; text-align: center; color: #6b7785; }

/* --- Items --- */
.hype-cart__items { list-style: none; margin: 0; padding: 8px 20px; }
.hype-cart__item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.hype-cart__item-img { flex: 0 0 64px; }
.hype-cart__item-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.hype-cart__item-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hype-cart__item-name { font-size: 14px; font-weight: 600; color: #0B1D2E; text-decoration: none; line-height: 1.3; }
.hype-cart__item-meta { font-size: 13px; color: #6b7785; }
.hype-cart__item-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.hype-cart__item-line { font-size: 14px; font-weight: 600; color: #0B1D2E; white-space: nowrap; }
.hype-cart__remove { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: #9aa4af; padding: 2px; }
.hype-cart__remove:hover { color: #0B1D2E; }

/* --- Qty stepper --- */
.hype-cart__qty { display: inline-flex; align-items: center; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.hype-cart__qty-btn { width: 30px; height: 30px; background: #fff; border: 0; cursor: pointer; font-size: 16px; color: #0B1D2E; }
.hype-cart__qty-btn:hover { background: #F4F8FB; }
.hype-cart__qty-val { min-width: 34px; text-align: center; font-size: 14px; }

/* --- Section titles --- */
.hype-cart__section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7785; margin: 0 0 10px; }

/* --- Upsell + add-more cards --- */
.hype-cart__upsell, .hype-cart__addmore { padding: 16px 20px; border-top: 1px solid rgba(0, 0, 0, 0.07); }
.hype-cart__card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; margin-bottom: 10px; }
.hype-cart__card:last-child { margin-bottom: 0; }
.hype-cart__card-img img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.hype-cart__card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hype-cart__card-name { font-size: 13px; font-weight: 600; color: #0B1D2E; }
.hype-cart__card-price { font-size: 13px; color: #6b7785; }
.hype-cart__card-add {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px; border-radius: 50px;
	background: #1A8FBA; color: #fff; font-size: 18px; font-weight: 600;
	text-decoration: none; border: 0; cursor: pointer;
}
.hype-cart__card-add.loading { opacity: 0.6; }

/* --- Footer --- */
.hype-cart__foot { margin-top: auto; padding: 18px 20px 22px; border-top: 1px solid rgba(0, 0, 0, 0.1); flex: 0 0 auto; background: #fff; }
/* Footer money hierarchy: the running lines (subtotal, fees, coupons) are one
   quiet size; the total is the only figure that shouts. Before, the subtotal
   was 16px/700 and the total 22px — close enough that the eye landed on the
   pre-discount number instead of what the customer actually pays. */
.hype-cart__subtotal { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; color: #4A5A68; margin: 8px 0 6px; }
.hype-cart__subtotal-val { font-weight: 600; color: #4A5A68; }
.hype-cart__checkout {
	display: block; text-align: center; width: 100%;
	padding: 15px; border-radius: 50px; background: #0B1D2E; color: #fff;
	font-size: 15px; font-weight: 600; text-decoration: none;
}
.hype-cart__checkout:hover { background: #14304a; color: #fff; }
.hype-cart__viewcart { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: #6b7785; text-decoration: underline; }

/* --- Coupon --- */
.hype-cart__coupon { margin-bottom: 12px; }
.hype-cart__coupon-list { list-style: none; margin: 0 0 8px; padding: 0; }
.hype-cart__coupon-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; color: #16779B; }
.hype-cart__coupon-remove { background: none; border: 0; cursor: pointer; color: #9aa4af; }
.hype-cart__coupon-toggle summary { font-size: 13px; color: #6b7785; cursor: pointer; }
.hype-cart__coupon-form { display: flex; gap: 8px; margin-top: 10px; }
.hype-cart__coupon-input { flex: 1 1 auto; height: 40px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 8px; }
.hype-cart__coupon-apply { flex: 0 0 auto; height: 40px; padding: 0 16px; border-radius: 8px; border: 0; background: #1A8FBA; color: #fff; cursor: pointer; }
.hype-cart__coupon-msg { font-size: 12px; color: #c0392b; margin: 8px 0 0; }

@media (min-width: 768px) {
	.hype-cart__addmore-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
}

/* --- Theme-bleed armor ---
   With Rey gone, the host theme/WooCommerce/Elementor global button + input
   styles leak into the drawer. ID-scoped (#hype-cart) selectors out-specify
   any theme `.button` / `button` rule, keeping the drawer self-contained. */
#hype-cart button { -webkit-appearance: none; appearance: none; box-shadow: none; text-shadow: none; letter-spacing: normal; }
#hype-cart .hype-cart__close { background: none; border: 0; color: #0B1D2E; padding: 0 4px; min-height: 0; }
#hype-cart .hype-cart__qty { background: #fff; }
#hype-cart .hype-cart__qty-btn { background: #fff; border: 0; color: #0B1D2E; min-height: 0; border-radius: 0; }
#hype-cart .hype-cart__qty-btn:hover { background: #F4F8FB; }
#hype-cart .hype-cart__remove { background: none; border: 0; color: #9aa4af; min-height: 0; }
#hype-cart .hype-cart__remove:hover { color: #0B1D2E; }
#hype-cart .hype-cart__checkout { background: #0B1D2E; color: #fff; border: 0; }
#hype-cart .hype-cart__checkout:hover { background: #14304a; color: #fff; }
#hype-cart .hype-cart__card-add { background: #1A8FBA; color: #fff; border: 0; min-height: 0; }
#hype-cart .hype-cart__card-add:hover { background: #157699; color: #fff; }
#hype-cart .hype-cart__coupon-apply { background: #1A8FBA; color: #fff; border: 0; min-height: 0; }
#hype-cart .hype-cart__coupon-input { background: #fff; color: inherit; }

/* Coupon value + post-discount total (0.2.1) */
.hype-cart__coupon-amount {
  margin-left: auto;
  padding-right: 8px;
  font-weight: 600;
  color: #2E7D4F;
  white-space: nowrap;
}
.hype-cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(11, 29, 46, .10);
}
.hype-cart__total-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hype-cart-muted, #6b7280);
  font-weight: 700;
}
.hype-cart__total-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--hype-cart-fg, #0B1D2E);
}

/* Cart fees — same shape as the coupon list, so a fee-based discount reads
   the same as a coupon-based one. */
.hype-cart__fees { list-style: none; margin: 0 0 8px; padding: 0; }
.hype-cart__fees li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; }
.hype-cart__fee-label { color: #4A5A68; }
.hype-cart__fee-amount { white-space: nowrap; font-weight: 600; }
.hype-cart__fee.is-discount .hype-cart__fee-label,
.hype-cart__fee.is-discount .hype-cart__fee-amount { color: #A25E00; }

/* Upsell / add-more cards: image + name link to the product page. */
#hype-cart a.hype-cart__card-img { flex: 0 0 auto; display: block; text-decoration: none; }
#hype-cart a.hype-cart__card-name { text-decoration: none; color: #0B1D2E; }
#hype-cart a.hype-cart__card-name:hover { color: #16779B; text-decoration: underline; }
