/* ============================================================
   cart.css — House of Elegance (white theme)
   ============================================================ */

/* ── Overlay — SIZE + ANIMATION UNCHANGED ── */
.mo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.mo-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Panel — SIZE + ANIMATION UNCHANGED ── */
.mo-panel {
  width: 100%;
  max-width: 880px;
  height: 560px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,0.14);
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.28s ease;
}
.mo-overlay.open .mo-panel {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVE MODAL PANEL */
@media (max-width: 768px) {
  .mo-panel {
    width: 95%;
    max-width: 100%;
    max-height: 85vh;
    height: auto;
  }
}

@media (max-width: 480px) {
  .mo-panel {
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
  }
}

/* ── Close button (top-right, no header bar) ── */
.mo-close {
  width: 34px;
  height: 34px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #666;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.mo-close:hover {
  background: #f3f4f6;
  color: #111;
  border-color: #d1d5db;
}

/* ── Body ── */
.mo-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 20px;
  background: #fff;
}
.mo-body::-webkit-scrollbar { width: 5px; }
.mo-body::-webkit-scrollbar-track { background: transparent; }
.mo-body::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

/* ── Loading ── */
.mo-loading {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #aaa;
  font-size: 12px;
  font-family: Poppins, sans-serif;
}
.mo-spinner {
  width: 30px;
  height: 30px;
  border: 2px solid #f0f0f0;
  border-top-color: #111;
  border-radius: 50%;
  animation: moSpin 0.7s linear infinite;
}
@keyframes moSpin { to { transform: rotate(360deg); } }

/* ── Empty ── */
.mo-empty {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #bbb;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  text-align: center;
}
.mo-empty i { font-size: 38px; color: #e5e7eb; }
.mo-empty p  { color: #aaa; }

/* ── Card (cart item) ── */
.mo-card {
  display: flex;
  flex-direction: column;
  padding: 14px 0;
  border-bottom: 1px solid #f3f4f6;
}
.mo-card:last-child { border-bottom: none; }

.mo-card__main {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Image */
.mo-card__img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f9fafb;
  border: 1px solid #f0f0f0;
}

@media (max-width: 480px) {
  .mo-card__img {
    width: 50px;
    height: 50px;
  }
}

.mo-card__img-ph {
  width: 64px;
  height: 64px;
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #d1d5db;
  font-size: 20px;
}

@media (max-width: 480px) {
  .mo-card__img-ph {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }
}

/* Info */
.mo-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mo-card__name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  font-family: Poppins, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .mo-card__name {
    font-size: 12px;
  }
}

.mo-card__meta {
  font-size: 11px;
  color: #9ca3af;
  font-family: Poppins, sans-serif;
}

@media (max-width: 480px) {
  .mo-card__meta {
    font-size: 10px;
  }
}

.mo-card__price {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  font-family: Poppins, sans-serif;
}

@media (max-width: 480px) {
  .mo-card__price {
    font-size: 12px;
  }
}

/* ── Buttons inside cards ── */
.mo-btn {
  border: none;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: Poppins, sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.mo-btn--delete {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}
.mo-btn--delete:hover {
  background: #fee2e2;
}

/* ── Card actions column ── */
.mo-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Qty stepper ── */
.cart-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
}

@media (max-width: 480px) {
  .cart-qty {
    border: 1px solid #e5e7eb;
  }
}

.cart-qty button {
  width: 30px;
  height: 30px;
  background: #f9fafb;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

@media (max-width: 480px) {
  .cart-qty button {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
}

.cart-qty button:hover { background: #f3f4f6; }

.cart-qty span {
  min-width: 32px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  border-left: 1.5px solid #e5e7eb;
  border-right: 1.5px solid #e5e7eb;
  display: inline-block;
  font-family: Poppins, sans-serif;
}

@media (max-width: 480px) {
  .cart-qty span {
    min-width: 28px;
    height: 26px;
    line-height: 26px;
    font-size: 12px;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
  }
}

/* ── Navbar cart badge ── */
.cart-nav-btn { position: relative; }
.cart-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(225,29,72,0.35);
}

/* ── Footer ── */
.cart-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
  background: #fff;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: Poppins, sans-serif;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cart-total-row strong {
  font-size: 20px;
  font-weight: 800;
  color: #111;
  letter-spacing: 0;
}
.cart-checkout-btn {
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: Poppins, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
}
.cart-checkout-btn:hover  { background: #1f2937; }
.cart-checkout-btn:active { transform: scale(0.99); }
.cart-checkout-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Checkboxes ── */
#cartSelectAll,
.cart-row-check { accent-color: #111 !important; }

/* ── Toast ── */
#cart-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 11px 22px;
  border-radius: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: Poppins, sans-serif;
  letter-spacing: 0.05em;
  z-index: 100000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 620px) {
  .mo-overlay { padding: 12px; }
  .mo-panel   { max-width: 100%; height: auto; max-height: 92vh; }
}