/* ============================================================
   cart-realtime.css — CloudV24 Real-Time Cart Styles
   ADDITIVE ONLY — extends existing cart styles safely.
   ============================================================ */

/* ── Cart badge pulse animation ─────────────────────────── */
@keyframes cv-badge-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.cart-badge--pulse {
  animation: cv-badge-pulse 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

/* Hide zero-count badges */
.cart-badge[style*="display: none"],
.mob-cart-badge[style*="display: none"] {
  display: none !important;
}

/* ── Mini-cart item layout ───────────────────────────────── */
.mini-cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  animation: cv-item-in 0.25s ease both;
}

@keyframes cv-item-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mini-cart-item:last-child { border-bottom: none; }

.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-detail {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ── Empty cart state ────────────────────────────────────── */
.mini-cart-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.mini-cart-empty p {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mini-cart-empty small {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Mini-cart total ─────────────────────────────────────── */
.mini-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.mini-cart-total span { color: var(--text-dim); }
.mini-cart-total strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

/* ── Mini-cart actions ───────────────────────────────────── */
.mini-cart-actions {
  margin-top: 0.5rem;
}

.mini-cart-actions .btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
}

/* ── Cart update loading shimmer ─────────────────────────── */
.mini-cart-items--loading {
  position: relative;
  overflow: hidden;
}

.mini-cart-items--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.04) 50%,
    transparent 100%
  );
  animation: cv-shimmer 1.2s infinite;
}

@keyframes cv-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
