:root {
  --hanis-cart-bg: #f8f7fc;
  --hanis-cart-navy: #202437;
  --hanis-cart-lavender: #8b67d8;
  --hanis-cart-pink: #f4a8cb;
  --hanis-cart-width: 440px;
  --hanis-cart-radius: 20px;
  --hanis-cart-overlay: .46;
  --hanis-cart-border: rgba(139, 103, 216, .18);
  --hanis-cart-muted: #716b7a;
  --hanis-cart-admin-offset: 0px;
}

body.admin-bar {
  --hanis-cart-admin-offset: 32px;
}

/* The plugin owns the visible drawer. Astra's native drawer stays hidden. */
.astra-cart-drawer,
.astra-cart-drawer-overlay,
.ast-cart-drawer,
.ast-cart-drawer-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.hanis-cart-open {
  overflow: hidden !important;
}

.hanis-cart-overlay,
.hanis-cart-drawer,
.hanis-cart-drawer *,
.hanis-cart-drawer *::before,
.hanis-cart-drawer *::after {
  box-sizing: border-box;
}

.hanis-cart-overlay {
  position: fixed;
  z-index: 999990;
  top: var(--hanis-cart-admin-offset);
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  background: rgba(32, 36, 55, var(--hanis-cart-overlay));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity .26s ease, visibility .26s ease;
}

.hanis-cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hanis-cart-drawer {
  position: fixed;
  z-index: 999991;
  top: var(--hanis-cart-admin-offset);
  right: 0;
  width: min(var(--hanis-cart-width), 100vw);
  height: calc(100dvh - var(--hanis-cart-admin-offset));
  display: grid;
  grid-template-rows: 88px minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 104% 9%, color-mix(in srgb, var(--hanis-cart-pink) 36%, transparent), transparent 255px),
    radial-gradient(circle at -12% 92%, color-mix(in srgb, var(--hanis-cart-lavender) 17%, transparent), transparent 290px),
    linear-gradient(180deg, #fff 0%, var(--hanis-cart-bg) 30%, #f5f2fa 100%);
  color: var(--hanis-cart-navy);
  border-left: 1px solid var(--hanis-cart-border);
  box-shadow: -24px 0 64px rgba(32, 36, 55, .17);
  visibility: hidden;
  transform: translate3d(105%, 0, 0);
  transition: transform .34s cubic-bezier(.2, .78, .2, 1), visibility .34s ease;
}

.hanis-cart-drawer.is-open {
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.hanis-cart-drawer__header {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: 18px 74px 15px 24px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid var(--hanis-cart-border);
  box-shadow: 0 9px 24px rgba(43, 36, 68, .045);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.hanis-cart-drawer__heading-wrap {
  min-width: 0;
}

.hanis-cart-drawer__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hanis-cart-drawer__title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hanis-cart-navy) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 27px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  letter-spacing: -.025em !important;
  white-space: nowrap;
}

.hanis-cart-drawer__count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eee8ff;
  color: #6849bd;
  border: 1px solid rgba(139, 103, 216, .22);
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.hanis-cart-drawer__eyebrow {
  margin: 7px 0 0 !important;
  color: var(--hanis-cart-lavender) !important;
  font-family: Arial, sans-serif !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: .11em !important;
  text-transform: uppercase !important;
}

.hanis-cart-drawer__close {
  position: absolute;
  top: 17px;
  right: 18px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1ecfb;
  border: 1px solid var(--hanis-cart-border);
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: transform .22s ease, background-color .22s ease, border-color .22s ease;
}

.hanis-cart-drawer__close span,
.hanis-cart-drawer__close span::after {
  width: 17px;
  height: 1.7px;
  display: block;
  background: var(--hanis-cart-navy);
  border-radius: 999px;
}

.hanis-cart-drawer__close span {
  transform: rotate(45deg);
}

.hanis-cart-drawer__close span::after {
  content: "";
  transform: rotate(90deg);
}

.hanis-cart-drawer__close:hover {
  background: var(--hanis-cart-lavender);
  border-color: var(--hanis-cart-lavender);
  transform: rotate(7deg) scale(1.035);
}

.hanis-cart-drawer__close:hover span,
.hanis-cart-drawer__close:hover span::after {
  background: #fff;
}

.hanis-cart-drawer__content {
  min-width: 0;
  min-height: 0;
  padding: 20px;
  overflow: hidden;
}

.hanis-cart-drawer__status {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  min-height: 0;
  color: var(--hanis-cart-muted);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

/* Empty state */
.hanis-cart-empty {
  width: 100%;
  height: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.hanis-cart-empty__panel {
  width: 100%;
  min-height: 310px;
  padding: 42px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--hanis-cart-pink) 27%, transparent), transparent 165px),
    rgba(255, 255, 255, .82);
  border: 1px solid var(--hanis-cart-border);
  border-radius: var(--hanis-cart-radius);
  box-shadow: 0 18px 45px rgba(43, 36, 68, .075);
  text-align: center;
}

.hanis-cart-empty__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  background: #eee8ff;
  border: 1px solid rgba(139, 103, 216, .17);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(43, 36, 68, .08);
}

.hanis-cart-empty__icon span {
  position: relative;
  width: 25px;
  height: 24px;
  display: block;
  background: var(--hanis-cart-lavender);
  border-radius: 3px 3px 6px 6px;
  clip-path: polygon(8% 24%, 92% 24%, 82% 100%, 18% 100%);
}

.hanis-cart-empty__icon span::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 6px;
  width: 13px;
  height: 10px;
  border: 2px solid var(--hanis-cart-lavender);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.hanis-cart-empty__title {
  margin: 0 !important;
  color: var(--hanis-cart-navy) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 25px !important;
  line-height: 1.22 !important;
  font-weight: 500 !important;
}

.hanis-cart-empty__text {
  max-width: 260px;
  margin: 12px 0 0 !important;
  color: var(--hanis-cart-muted) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* Filled state */
.hanis-cart-filled {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}

.hanis-cart-items {
  min-height: 0;
  padding: 2px 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 103, 216, .35) transparent;
}

.hanis-cart-items::-webkit-scrollbar {
  width: 6px;
}

.hanis-cart-items::-webkit-scrollbar-thumb {
  background: rgba(139, 103, 216, .32);
  border-radius: 999px;
}

.hanis-cart-item {
  position: relative;
  width: 100%;
  min-height: 118px;
  padding: 14px 44px 14px 14px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--hanis-cart-border);
  border-radius: var(--hanis-cart-radius);
  box-shadow: 0 12px 30px rgba(43, 36, 68, .065);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.hanis-cart-item:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 103, 216, .34);
  box-shadow: 0 16px 36px rgba(43, 36, 68, .095);
}

.hanis-cart-item__thumb {
  width: 88px;
  height: 88px;
  min-width: 88px;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  background: #faf8ff;
  border: 1px solid #ebe5f4;
  border-radius: 15px;
  text-decoration: none;
}

.hanis-cart-item__image,
.hanis-cart-item__thumb img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.hanis-cart-item__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hanis-cart-item__title {
  margin: 0 !important;
  padding: 0 !important;
  display: -webkit-box !important;
  overflow: hidden !important;
  color: var(--hanis-cart-navy) !important;
  font-size: 14px !important;
  line-height: 1.36 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hanis-cart-item__meta {
  color: var(--hanis-cart-muted);
  font-size: 11px;
  line-height: 1.35;
}

.hanis-cart-item__meta dl {
  margin: 0 !important;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 5px;
}

.hanis-cart-item__meta dt,
.hanis-cart-item__meta dd {
  margin: 0 !important;
  padding: 0 !important;
}

.hanis-cart-item__price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.hanis-cart-item__quantity {
  color: var(--hanis-cart-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.hanis-cart-item__price,
.hanis-cart-item__price .amount {
  color: var(--hanis-cart-navy) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.hanis-cart-item__remove {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 29px;
  height: 29px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3edfb;
  border: 1px solid var(--hanis-cart-border);
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.hanis-cart-item__remove span,
.hanis-cart-item__remove span::after {
  width: 12px;
  height: 1.5px;
  display: block;
  background: var(--hanis-cart-lavender);
  border-radius: 999px;
}

.hanis-cart-item__remove span {
  transform: rotate(45deg);
}

.hanis-cart-item__remove span::after {
  content: "";
  transform: rotate(90deg);
}

.hanis-cart-item__remove:hover {
  background: var(--hanis-cart-pink);
  border-color: rgba(240, 79, 120, .22);
  transform: rotate(8deg) scale(1.06);
}

.hanis-cart-summary {
  padding-top: 16px;
  background: linear-gradient(180deg, rgba(248, 247, 252, 0), rgba(248, 247, 252, .94) 14%, rgba(248, 247, 252, 1) 100%);
  border-top: 1px solid var(--hanis-cart-border);
}

.hanis-cart-summary__subtotal {
  margin-bottom: 14px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--hanis-cart-navy);
}

.hanis-cart-summary__subtotal > span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hanis-cart-summary__subtotal strong,
.hanis-cart-summary__subtotal .amount {
  color: var(--hanis-cart-navy) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 600 !important;
}

.hanis-cart-summary__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hanis-cart-button {
  min-width: 0;
  min-height: 54px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.hanis-cart-button--secondary {
  background: #fff;
  color: var(--hanis-cart-lavender) !important;
  border: 1px solid var(--hanis-cart-lavender);
}

.hanis-cart-button--primary {
  background: var(--hanis-cart-navy);
  color: #fff !important;
  border: 1px solid var(--hanis-cart-navy);
}

.hanis-cart-button--full {
  width: 100%;
}

.hanis-cart-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(43, 36, 68, .09);
}

.hanis-cart-button--secondary:hover {
  background: #eee8ff;
  color: #6547b8 !important;
}

.hanis-cart-button--primary:hover {
  background: var(--hanis-cart-lavender);
  border-color: var(--hanis-cart-lavender);
  color: #fff !important;
}

.hanis-cart-drawer.is-loading .hanis-cart-drawer__content {
  opacity: .58;
  pointer-events: none;
}

.hanis-cart-drawer.is-loading::after {
  content: "";
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid rgba(139, 103, 216, .18);
  border-top-color: var(--hanis-cart-lavender);
  border-radius: 50%;
  animation: hanisCartSpin .75s linear infinite;
}

@keyframes hanisCartSpin {
  to { transform: rotate(360deg); }
}

@keyframes hanisCartItemIn {
  from {
    opacity: 0;
    transform: translateX(14px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes hanisCartFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hanis-cart-drawer.is-open .hanis-cart-item {
  animation: hanisCartItemIn .36s cubic-bezier(.2, .72, .2, 1) both;
  animation-delay: calc(var(--hanis-item-index, 0) * 55ms);
}

.hanis-cart-drawer.is-open .hanis-cart-summary,
.hanis-cart-drawer.is-open .hanis-cart-empty__panel,
.hanis-cart-drawer.is-open .hanis-cart-empty > .hanis-cart-button {
  animation: hanisCartFadeUp .38s cubic-bezier(.2, .72, .2, 1) both;
}

@media (max-height: 720px) and (min-width: 601px) {
  .hanis-cart-empty__panel {
    min-height: 270px;
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .hanis-cart-empty__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 17px;
  }

  .hanis-cart-item {
    min-height: 108px;
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .hanis-cart-item__thumb {
    width: 78px;
    height: 78px;
    min-width: 78px;
  }
}

@media (max-width: 600px) {
  :root {
    --hanis-cart-admin-offset: 0px;
  }

  body.admin-bar {
    --hanis-cart-admin-offset: 46px;
  }

  .hanis-cart-drawer {
    width: 100vw;
    grid-template-rows: 80px minmax(0, 1fr);
  }

  .hanis-cart-drawer__header {
    padding: 16px 66px 13px 18px;
  }

  .hanis-cart-drawer__title {
    font-size: 24px !important;
  }

  .hanis-cart-drawer__close {
    top: 17px;
    right: 15px;
    width: 40px;
    height: 40px;
  }

  .hanis-cart-drawer__content {
    padding: 13px;
  }

  .hanis-cart-empty {
    max-width: 100%;
  }

  .hanis-cart-empty__panel {
    min-height: 285px;
    border-radius: 18px;
  }

  .hanis-cart-item {
    min-height: 106px;
    padding: 12px 40px 12px 12px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    border-radius: 17px;
  }

  .hanis-cart-item__thumb {
    width: 76px;
    height: 76px;
    min-width: 76px;
    border-radius: 13px;
  }

  .hanis-cart-item__title {
    font-size: 13px !important;
  }
}

@media (max-width: 390px) {
  .hanis-cart-summary__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hanis-cart-overlay,
  .hanis-cart-drawer,
  .hanis-cart-drawer *,
  .hanis-cart-drawer *::before,
  .hanis-cart-drawer *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================================
   V2.1 — viewport mounting and Astra-layer protection
   ========================================================= */

/*
 * These direct-body selectors prevent transformed Astra/Elementor wrappers
 * from clipping or hiding the custom drawer.
 */
body > [data-hanis-cart-overlay].hanis-cart-overlay {
  position: fixed !important;
  z-index: 2147483645 !important;
  inset: var(--hanis-cart-admin-offset) 0 0 0 !important;
  display: block;
}

body > [data-hanis-cart-drawer].hanis-cart-drawer {
  position: fixed !important;
  z-index: 2147483646 !important;
  top: var(--hanis-cart-admin-offset) !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  display: grid !important;
  opacity: 1 !important;
  isolation: isolate;
}

body > [data-hanis-cart-drawer].hanis-cart-drawer.is-open {
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate3d(0, 0, 0) !important;
}

body > [data-hanis-cart-overlay].hanis-cart-overlay.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Keep the page dimmed without turning it into an almost-black screen. */
body > [data-hanis-cart-overlay].hanis-cart-overlay {
  background: rgba(32, 36, 55, .34) !important;
}

/* Native Astra layers must never sit above the custom drawer. */
body .astra-cart-drawer,
body .astra-cart-drawer-overlay,
body .ast-cart-drawer:not([data-hanis-cart-drawer]),
body .ast-cart-drawer-overlay {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


/* =========================================================
   V2.3 — silent updates and zero horizontal scrollbar flash
   ========================================================= */

/*
 * The loading state remains visual through the spinner only.
 * Empty live-region content must not reserve or display space.
 */
.hanis-cart-drawer__status:empty {
  display: none !important;
}

/*
 * Prevent an off-canvas transform or refreshed product image from briefly
 * widening the document and creating a bottom horizontal scrollbar.
 */
html.hanis-cart-runtime {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

html.hanis-cart-runtime body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

@supports not (overflow: clip) {
  html.hanis-cart-runtime,
  html.hanis-cart-runtime body {
    overflow-x: hidden !important;
  }
}

body > [data-hanis-cart-overlay],
body > [data-hanis-cart-drawer],
.hanis-cart-drawer,
.hanis-cart-drawer__content,
.hanis-cart-empty,
.hanis-cart-filled,
.hanis-cart-items,
.hanis-cart-item,
.hanis-cart-item__thumb,
.hanis-cart-item__info,
.hanis-cart-summary {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.hanis-cart-drawer {
  contain: layout paint !important;
}

.hanis-cart-items {
  scrollbar-gutter: stable;
}


/* =========================================================
   V2.4 — no transient vertical scrollbar during cart removal
   ========================================================= */

/*
 * The outer drawer never scrolls. Only an actually overflowing product list
 * may scroll, and JavaScript enables that state after layout has settled.
 */
.hanis-cart-drawer,
.hanis-cart-drawer__content,
.hanis-cart-filled {
  overflow: hidden !important;
}

.hanis-cart-items {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  scrollbar-gutter: auto !important;
}

.hanis-cart-items.is-scrollable {
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
}

/*
 * While AJAX is running and while the replacement HTML is settling, suppress
 * all scrollbar painting. This covers the loading circle and both reflow
 * frames after it disappears.
 */
.hanis-cart-drawer.is-loading .hanis-cart-items,
.hanis-cart-drawer.is-stabilizing .hanis-cart-items {
  overflow-y: hidden !important;
  scrollbar-gutter: auto !important;
  scrollbar-width: none !important;
}

.hanis-cart-drawer.is-loading .hanis-cart-items::-webkit-scrollbar,
.hanis-cart-drawer.is-stabilizing .hanis-cart-items::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}


/* =========================================================
   V2.5 — quantity stepper and consistent long-cart scrolling
   ========================================================= */

.hanis-cart-item__price-row {
  justify-content: space-between;
}

.hanis-cart-quantity {
  min-width: 94px;
  height: 34px;
  padding: 3px;
  display: inline-grid;
  grid-template-columns: 28px minmax(28px, auto) 28px;
  align-items: center;
  background: #f7f3fe;
  border: 1px solid var(--hanis-cart-border);
  border-radius: 999px;
  transition:
    opacity .2s ease,
    border-color .2s ease,
    background-color .2s ease;
}

.hanis-cart-quantity.is-updating {
  opacity: .58;
}

.hanis-cart-quantity__button {
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--hanis-cart-lavender);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(43, 36, 68, .06);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
  font-weight: 700;
  transition:
    color .18s ease,
    background-color .18s ease,
    transform .18s ease,
    opacity .18s ease;
}

.hanis-cart-quantity__button:hover:not(:disabled) {
  background: var(--hanis-cart-lavender);
  color: #fff;
  transform: scale(1.05);
}

.hanis-cart-quantity__button:disabled {
  opacity: .32;
  cursor: not-allowed;
  box-shadow: none;
}

.hanis-cart-quantity__value {
  min-width: 28px;
  padding: 0 3px;
  color: var(--hanis-cart-navy);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-align: center;
}

/*
 * Silent add-to-cart refreshes now always release the stabilizing state.
 * When a long list genuinely overflows, its scrollbar is available
 * immediately—before and after quantity/removal updates.
 */
.hanis-cart-items.is-scrollable:not(.is-updating) {
  overflow-y: auto !important;
}

/* Keep the item list width stable when its vertical scrollbar is present. */
.hanis-cart-items.is-scrollable {
  padding-right: 6px;
  scrollbar-gutter: stable;
}

@media (max-width: 600px) {
  .hanis-cart-item__price-row {
    gap: 8px;
  }

  .hanis-cart-quantity {
    min-width: 88px;
    height: 32px;
    grid-template-columns: 26px minmax(26px, auto) 26px;
  }

  .hanis-cart-quantity__button {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}


/* =========================================================
   V2.6 — Poppins typography, balanced stepper, slide-away removal
   ========================================================= */

/* Use Poppins throughout, with weights assigned by information priority. */
.hanis-cart-drawer,
.hanis-cart-drawer *,
.hanis-cart-drawer *::before,
.hanis-cart-drawer *::after {
  font-family: "Poppins", Arial, sans-serif !important;
}

.hanis-cart-drawer__title {
  font-size: 25px !important;
  line-height: 1.08 !important;
  font-weight: 600 !important;
  letter-spacing: -.035em !important;
}

.hanis-cart-drawer__eyebrow {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .11em !important;
}

.hanis-cart-drawer__count {
  font-weight: 600 !important;
}

.hanis-cart-empty__title {
  font-weight: 600 !important;
  letter-spacing: -.025em !important;
}

.hanis-cart-empty__text,
.hanis-cart-item__meta,
.hanis-cart-item__quantity {
  font-weight: 400 !important;
}

.hanis-cart-item__title {
  font-weight: 600 !important;
  letter-spacing: -.015em !important;
}

.hanis-cart-item__price,
.hanis-cart-item__price .amount,
.hanis-cart-summary__subtotal strong,
.hanis-cart-summary__subtotal .amount {
  font-family: "Poppins", Arial, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: -.015em !important;
}

.hanis-cart-summary__subtotal > span,
.hanis-cart-button {
  font-weight: 600 !important;
}

/* Remove the global loading logo and prevent content dimming. */
.hanis-cart-drawer.is-loading::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.hanis-cart-drawer.is-loading .hanis-cart-drawer__content {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/*
 * Equal three-part quantity control:
 * 32px minus + 32px number + 32px plus, with identical spacing.
 */
.hanis-cart-quantity {
  width: 112px !important;
  min-width: 112px !important;
  height: 40px !important;
  padding: 3px !important;
  display: inline-grid !important;
  grid-template-columns: repeat(3, 32px) !important;
  grid-template-rows: 32px !important;
  column-gap: 2px !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f7f3fe !important;
  border: 1px solid var(--hanis-cart-border) !important;
  border-radius: 999px !important;
}

.hanis-cart-quantity__button,
.hanis-cart-quantity__value {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-self: center !important;
  justify-self: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.hanis-cart-quantity__button {
  border-radius: 50% !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}

.hanis-cart-quantity__button > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  line-height: 1;
  transform: translateY(-.5px);
}

.hanis-cart-quantity__value {
  color: var(--hanis-cart-navy) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.hanis-cart-quantity.is-updating {
  opacity: .72 !important;
}

/* Smooth product removal without any loading logo. */
.hanis-cart-item.is-removing {
  z-index: 4;
  pointer-events: none !important;
  will-change: transform, opacity;
}

.hanis-cart-item.is-removing .hanis-cart-item__remove,
.hanis-cart-item.is-removing .hanis-cart-quantity {
  pointer-events: none !important;
}

/* JS now owns entry/reflow motion, preventing competing CSS animations. */
.hanis-cart-drawer.is-open .hanis-cart-item {
  animation: none !important;
}

/* Keep reflow animation smooth and isolated from hover transforms. */
.hanis-cart-items {
  overflow-anchor: none;
}

@media (max-width: 600px) {
  .hanis-cart-quantity {
    width: 106px !important;
    min-width: 106px !important;
    height: 38px !important;
    grid-template-columns: repeat(3, 30px) !important;
    grid-template-rows: 30px !important;
    column-gap: 2px !important;
  }

  .hanis-cart-quantity__button,
  .hanis-cart-quantity__value {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }

  .hanis-cart-quantity__button > span {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hanis-cart-item.is-removing {
    opacity: 0 !important;
  }
}


/* =========================================================
   V2.8 — preserve V2.6 cards; remove only wrapper boxes
   ========================================================= */

/*
 * Keep every individual product as the original separate rounded card.
 * The surrounding list itself must remain visually invisible.
 */
.hanis-cart-filled {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.hanis-cart-items {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/*
 * Preserve the V2.6 product-card design exactly.
 */
.hanis-cart-item {
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid var(--hanis-cart-border) !important;
  border-radius: var(--hanis-cart-radius) !important;
  box-shadow: 0 12px 30px rgba(43, 36, 68, .065) !important;
}

.hanis-cart-item:hover:not(.is-removing) {
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(139, 103, 216, .34) !important;
  box-shadow: 0 10px 22px rgba(43, 36, 68, .07) !important;
  transform: translateY(-2px) !important;
}

/*
 * Remove the separate gradient/footer box behind Subtotal and the actions.
 * They now sit directly on the same drawer background as the product cards.
 */
.hanis-cart-summary {
  margin: 0 !important;
  padding: 16px 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid rgba(139, 103, 216, .16) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/*
 * Avoid a visible rectangular scroll-container edge beside the cards while
 * retaining safe internal space for the original card shadows.
 */
.hanis-cart-items {
  margin: 0 -4px !important;
  padding: 2px 4px 8px !important;
}

.hanis-cart-items.is-scrollable {
  padding-right: 10px !important;
}

@media (max-width: 600px) {
  .hanis-cart-summary {
    padding-top: 14px !important;
  }
}


/* =========================================================
   V2.9 — visible slide removal and no false parent-container box
   ========================================================= */

/*
 * Keep the wrappers completely invisible. Explicitly remove any pseudo-layer
 * that a theme or browser style could introduce.
 */
.hanis-cart-filled,
.hanis-cart-items {
  background-color: transparent !important;
  background-image: none !important;
  outline: 0 !important;
}

.hanis-cart-filled::before,
.hanis-cart-filled::after,
.hanis-cart-items::before,
.hanis-cart-items::after {
  content: none !important;
  display: none !important;
}

/*
 * The previous large blurred shadows overlapped vertically and were clipped
 * by the list edges, creating two faint side rails that looked like a parent
 * box. Keep the separate cards, but use a tighter downward shadow.
 */
.hanis-cart-item {
  box-shadow:
    0 7px 16px -10px rgba(43, 36, 68, .30),
    0 2px 7px rgba(43, 36, 68, .025) !important;
}

/*
 * Give each shadow enough internal breathing room so it is not clipped into
 * one continuous rectangle at the left and right edges.
 */
.hanis-cart-items {
  margin: 0 !important;
  padding: 3px 2px 10px !important;
  overflow-x: clip !important;
}

.hanis-cart-items.is-scrollable {
  padding-right: 8px !important;
}

/*
 * During removal, hover styling must never fight the Web Animations transform.
 * The animation can now move the complete card clearly out to the right.
 */
.hanis-cart-item.is-removing,
.hanis-cart-item.is-removing:hover {
  background: rgba(255, 255, 255, .92) !important;
  border-color: var(--hanis-cart-border) !important;
  box-shadow: none !important;
  pointer-events: none !important;
  will-change: transform, opacity, filter;
}

/* Keep the drawer edge clean while the card exits to the right. */
.hanis-cart-drawer__content {
  overflow: hidden !important;
}


/* =========================================================
   V3.0 — exact quantity geometry and zero-refresh opening
   ========================================================= */

/*
 * The complete control is border-box 134px.
 * Inner width = 134 - 2px border - 6px padding = 126px.
 * Three exact 42px zones fill that width with no leftover distribution.
 */
.hanis-cart-quantity {
  width: 134px !important;
  min-width: 134px !important;
  height: 42px !important;
  padding: 3px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 42px) !important;
  grid-template-rows: 34px !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  align-items: center !important;
  justify-items: center !important;
  justify-content: start !important;
}

.hanis-cart-quantity__button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-self: center !important;
}

.hanis-cart-quantity__button > span {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
}

.hanis-cart-quantity__value {
  width: 42px !important;
  min-width: 42px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  place-self: center !important;
}

/*
 * Reflow animation uses `top`, not transform, so it never conflicts with
 * card hover/removal transforms.
 */
.hanis-cart-item.is-reflowing,
.hanis-cart-item.is-reflowing:hover {
  transform: none !important;
  pointer-events: none;
  will-change: top;
}

/* Prevent CSS entry animations from replaying when the cart simply opens. */
.hanis-cart-drawer.is-open .hanis-cart-item,
.hanis-cart-drawer.is-open .hanis-cart-summary,
.hanis-cart-drawer.is-open .hanis-cart-empty {
  animation: none !important;
}

/* Keep the right exit and upward reflow inside one clean clipping boundary. */
.hanis-cart-items {
  overflow-x: clip !important;
  overflow-anchor: none !important;
}

@media (max-width: 600px) {
  .hanis-cart-quantity {
    width: 128px !important;
    min-width: 128px !important;
    height: 40px !important;
    grid-template-columns: repeat(3, 40px) !important;
    grid-template-rows: 32px !important;
  }

  .hanis-cart-quantity__button {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  .hanis-cart-quantity__button > span {
    width: 32px !important;
    height: 32px !important;
  }

  .hanis-cart-quantity__value {
    width: 40px !important;
    min-width: 40px !important;
    height: 32px !important;
    min-height: 32px !important;
  }
}


/* =========================================================
   V3.1 — hide AJAX “View cart” link on product cards
   ========================================================= */

/*
 * WooCommerce injects this link after a successful AJAX Add to Cart.
 * The custom cart drawer already provides cart access, so the extra link
 * is unnecessary and can disturb the product-card layout.
 */
a.added_to_cart.wc-forward,
.woocommerce a.added_to_cart.wc-forward,
.added_to_cart.wc-forward {
  display: none !important;
}
