.mbx-cart-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  min-width: 320px;
  max-height: min(72vh, 540px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  box-shadow: 0 26px 56px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  box-sizing: border-box;
  z-index: 42;
}

.mbx-cart-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 22px;
  border-width: 0 9px 9px 9px;
  border-style: solid;
  border-color: transparent transparent rgba(255, 255, 255, 0.98) transparent;
  filter: drop-shadow(0 6px 6px rgba(15, 23, 42, 0.08));
}

.mbx-cart-dropdown.is-open {
  display: flex;
}

.mbx-cart-dropdown__header,
.mbx-cart-dropdown__footer {
  flex: 0 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.mbx-cart-dropdown__footer {
  border-bottom: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0), rgba(255, 247, 237, 0.82));
}

.mbx-cart-dropdown__title {
  margin: 0 0 3px;
  font-size: 0.98rem;
  font-weight: 800;
  color: #111827;
}

.mbx-cart-dropdown__subtitle,
.mbx-cart-dropdown__empty,
.mbx-cart-dropdown__line-meta,
.mbx-cart-dropdown__seller,
.ml-marketplace-price-breakdown__row span {
  color: #64748b;
}

.mbx-cart-dropdown__subtitle {
  margin: 0;
  max-width: 24ch;
  font-size: 0.86rem;
  line-height: 1.45;
}

.mbx-cart-dropdown__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mbx-cart-dropdown__close {
  border: none;
  background: transparent;
  font-size: 1.28rem;
  color: #64748b;
  cursor: pointer;
}

.mbx-cart-dropdown__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.mbx-cart-dropdown__empty {
  margin: 0;
  line-height: 1.5;
}

.mbx-cart-dropdown__empty-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(249, 115, 22, 0.22);
  flex: 0 0 auto;
  background:
    radial-gradient(circle at top right, rgba(255, 166, 72, 0.18), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #fff7ed 100%);
}

.mbx-cart-dropdown__empty-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #111827;
}

.mbx-cart-dropdown__empty-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #64748b;
}

.mbx-cart-dropdown__line {
  flex: 0 0 auto;
  min-height: 98px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.mbx-cart-dropdown__line-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.mbx-cart-dropdown__line-link:hover {
  background: rgba(255, 247, 237, 0.9);
}

.mbx-cart-dropdown__line-link:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.35);
  outline-offset: -2px;
}

.mbx-cart-dropdown__media {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.mbx-cart-dropdown__line img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 6px;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.mbx-cart-dropdown__qty-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1; /* mbx-allow-lineheight-1: numeric quantity badge */
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.24);
  box-sizing: border-box;
}

.mbx-cart-dropdown__line-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.mbx-cart-dropdown__line-copy h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.26;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mbx-cart-dropdown__line-copy p,
.mbx-cart-dropdown__line-meta {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.mbx-cart-dropdown__line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mbx-cart-dropdown__seller {
  font-weight: 700;
}

.mbx-cart-dropdown__availability {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.14);
  white-space: nowrap;
}

.mbx-cart-dropdown__availability--ok {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.18);
}

.mbx-cart-dropdown__availability--off {
  background: #fff1f2;
  color: #be123c;
  border-color: rgba(244, 63, 94, 0.16);
}

.mbx-cart-dropdown__line-note {
  color: #64748b;
}

.mbx-cart-dropdown__pricing {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.mbx-cart-dropdown__pricing span {
  font-size: 0.78rem;
  color: #64748b;
}

.mbx-cart-dropdown__pricing strong {
  font-size: 0.84rem;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}

.mbx-cart-dropdown__summary {
  flex: 0 0 auto;
  display: grid;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.mbx-cart-dropdown__summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
}

.mbx-cart-dropdown__summary .is-total {
  font-size: 0.96rem;
  font-weight: 800;
  color: #111827;
}

.mbx-cart-dropdown__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mbx-cart-dropdown__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(249, 115, 22, 0.28);
}

.product-card__cart-btn {
  margin-top: 10px;
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 14px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
  cursor: pointer;
}

.pp-btn[data-cart-add],
.product-card__cart-btn,
.ml-button[data-cart-add],
.ml-button[data-cart-buy-now] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.24;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pp-btn[data-cart-add]::before,
.product-card__cart-btn::before,
.ml-button[data-cart-add]::before {
  content: "\f290";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.92rem;
  line-height: 1; /* mbx-allow-lineheight-1: icon glyph */
  transform: translateY(-1px);
}

.pp-btn[data-cart-add] {
  border: 1px solid rgba(249, 115, 22, 0.2);
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
}

.pp-btn[data-cart-add]:hover,
.product-card__cart-btn:hover,
.ml-button[data-cart-add]:hover,
.ml-button[data-cart-buy-now]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

[data-cart-add].is-cart-feedback,
[data-cart-buy-now].is-cart-feedback {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(249, 115, 22, 0.18);
  filter: saturate(1.04);
}

.ml-marketplace-price-breakdown {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
  padding: 12px;
  border-radius: 16px;
  background: #fff8ef;
  border: 1px solid rgba(249, 115, 22, 0.14);
}

.ml-marketplace-price-breakdown__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
}

.ml-marketplace-price-breakdown__row strong {
  color: #111827;
}

.ml-marketplace-price-breakdown__row--total {
  padding-top: 8px;
  border-top: 1px solid rgba(249, 115, 22, 0.14);
  font-weight: 800;
}

.ml-buybox__cart-config {
  display: grid;
  gap: 8px;
}

.ml-buybox__cart-label {
  font-weight: 700;
  color: #0f172a;
}

.ml-buybox__cart-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
}

.ml-buybox__cart-step,
.ml-buybox__cart-input {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: #ffffff;
}

.ml-buybox__cart-step {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
}

.ml-buybox__cart-input {
  width: 100%;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.mbx-cart-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  min-width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.96);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1300;
}

.mbx-cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .mbx-cart-dropdown {
    position: fixed;
    top: calc(var(--menu-safe-top, 0px) + 92px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(94vw, 420px);
    max-width: calc(100vw - 16px);
    min-width: 0;
    max-height: min(74dvh, calc(100dvh - (var(--menu-safe-top, 0px) + 108px)));
  }

  .mbx-cart-dropdown::before {
    display: none;
  }

  .mbx-cart-dropdown__header,
  .mbx-cart-dropdown__footer {
    padding: 14px;
  }

  .mbx-cart-dropdown__body {
    padding: 10px 14px 14px;
  }

  .mbx-cart-dropdown__line {
    border-radius: 8px;
    min-height: 90px;
  }

  .mbx-cart-dropdown__line-link {
    grid-template-columns: 64px 1fr;
    gap: 10px;
    min-height: 90px;
    padding: 11px 12px;
  }

  .mbx-cart-dropdown__media {
    width: 64px;
    height: 64px;
  }

  .mbx-cart-dropdown__line img {
    padding: 5px;
  }

  .mbx-cart-dropdown__qty-badge {
    top: 5px;
    right: 5px;
    min-width: 24px;
    height: 24px;
    font-size: 0.68rem;
  }

  .ml-buybox__cart-stepper {
    grid-template-columns: 44px 1fr 44px;
  }
}
