/* Marsya local cart — static site */
#insales-quick-checkout-dialog,
#insales-quick-checkout-msg {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.product-preview__preorder-btn {
  display: none !important;
}

.marsya-cart-fab {
  position: fixed;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border: none;
  border-radius: 50%;
  background: var(--color-btn-bg, #5956ce);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.marsya-cart-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.marsya-cart-fab svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.marsya-cart-fab__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e44542;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
  display: none;
}

.marsya-cart-fab__badge.is-visible {
  display: block;
}

.marsya-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.marsya-cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.marsya-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10061;
  width: min(100%, 420px);
  height: 100%;
  max-height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.marsya-cart-panel.is-open {
  transform: translateX(0);
}

.marsya-cart-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.marsya-cart-panel__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.marsya-cart-panel__close {
  border: none;
  background: transparent;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: #333;
}

.marsya-cart-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}

.marsya-cart-panel__empty {
  color: #666;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

.marsya-cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.marsya-cart-line:last-child {
  border-bottom: none;
}

.marsya-cart-line__img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
}

.marsya-cart-line__info {
  min-width: 0;
}

.marsya-cart-line__name {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.marsya-cart-line__price {
  font-size: 0.85rem;
  color: #555;
}

.marsya-cart-line__qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.marsya-cart-line__qty button {
  width: 2rem;
  height: 2rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.marsya-cart-line__qty span {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.marsya-cart-line__remove {
  border: none;
  background: transparent;
  color: #c00;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}

.marsya-cart-panel__foot {
  padding: 1rem;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  background: #fafafa;
}

.marsya-cart-panel__total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.marsya-cart-panel__checkout {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--color-btn-bg, #5956ce);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.marsya-cart-panel__checkout:hover {
  filter: brightness(1.05);
}

.marsya-cart-toast {
  position: fixed;
  bottom: 7rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10070;
  padding: 0.65rem 1.25rem;
  background: #1b2738;
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

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

@media (min-width: 768px) {
  .marsya-cart-fab {
    bottom: 2rem;
  }
  .marsya-cart-toast {
    bottom: 2rem;
  }
}
