/* ═══════════════════════════════════════════════════════════════════
   CART + FAVORITES — both right-side sidebars
   ═══════════════════════════════════════════════════════════════════ */

/* ── CART OVERLAY ──────────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.active { opacity: 1; pointer-events: all; }

/* ── CART SIDEBAR ──────────────────────────────────────────────── */
#cart-sidebar {
  position: fixed; right: 0; top: 0; bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  width: 380px; max-width: 95vw;
  background: rgba(5,5,16,0.98);
  border-left: 1px solid rgba(204,0,0,0.4);
  z-index: 9999;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
#cart-sidebar.open { transform: translateX(0); }

.cart-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(204,0,0,0.2);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-title {
  font-family: 'Orbitron', monospace;
  font-size: 1rem; color: var(--red-bright);
  letter-spacing: 2px;
}
.cart-close {
  background: rgba(204,0,0,0.2);
  border: 1px solid rgba(204,0,0,0.4);
  color: white; border-radius: 50%;
  width: 35px; height: 35px;
  font-size: 1.1rem; cursor: pointer;
  transition: background 0.2s;
}
.cart-close:hover { background: var(--red); }

.cart-items { flex: 1; overflow-y: auto; padding: 15px; }
.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--red); }

.cart-empty { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.4); }
.cart-empty-icon { font-size: 3rem; margin-bottom: 15px; display: block; }

.cart-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(204,0,0,0.2);
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }

.cart-item-icon { font-size: 2rem; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 3px; }
.cart-item-price {
  font-family: 'Orbitron', monospace;
  color: var(--red-bright);
  font-size: 0.85rem;
}
.cart-item-img {
  width: 50px; height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(204,0,0,0.3);
}
.cart-item-remove {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  border-radius: 50%;
  width: 28px; height: 28px;
  cursor: pointer; font-size: 0.8rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.cart-item-remove:hover {
  background: rgba(204,0,0,0.3);
  border-color: var(--red);
  color: white;
}

/* Quantity controls */
.cart-item-actions {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.2);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}
.cart-qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.1s;
}
.cart-qty-btn:hover  { background: var(--red-bright); }
.cart-qty-btn:active { transform: scale(0.95); }
.cart-qty-num {
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem; color: white;
  min-width: 20px; text-align: center;
}

/* Footer */
.cart-footer {
  border-top: 1px solid rgba(204,0,0,0.2);
  padding: 20px 25px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.cart-total-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cart-total-label { font-size: 1rem; font-weight: 700; }
.cart-total-price {
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  color: var(--red-bright);
  text-shadow: var(--glow-red);
}
.cart-checkout-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--red), var(--blue));
  border: none; border-radius: 8px;
  color: white; font-family: 'Cairo', sans-serif;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  text-align: center;
  text-decoration: none; display: block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(204,0,0,0.3);
  user-select: none;
}
.cart-checkout-btn:hover { transform: translateY(-2px); box-shadow: var(--glow-red); }

/* ═══════════════════════════════════════════════════════════════════
   FAVORITE SIDEBAR
   ═══════════════════════════════════════════════════════════════════ */

.favorite-sidebar {
  position: fixed; top: 0; right: -420px;
  width: 400px; height: 100vh;
  background: rgba(10,15,40,0.98);
  border-left: 1px solid rgba(255,45,85,0.3);
  z-index: 99990;
  transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex; flex-direction: column;
  padding: 25px;
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
}
.favorite-sidebar.active { right: 0; }

.favorite-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.favorite-sidebar-title { font-size: 1.3rem; font-weight: 700; color: white; }
.favorite-sidebar-close {
  width: 36px; height: 36px;
  background: rgba(255,45,85,0.2);
  border: 1px solid rgba(255,45,85,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.favorite-sidebar-close:hover { background: rgba(255,45,85,0.4); transform: rotate(90deg); }

.favorite-sidebar-content {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 15px;
}
.favorite-sidebar-content::-webkit-scrollbar { width: 6px; }
.favorite-sidebar-content::-webkit-scrollbar-thumb { background: var(--red-bright); border-radius: 3px; }

.favorite-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px;
  display: flex; gap: 12px; align-items: center;
  transition: background 0.25s, border-color 0.25s;
}
.favorite-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,45,85,0.3);
}
.favorite-item-img {
  width: 60px; height: 60px;
  object-fit: cover;
  border-radius: 8px;
}
.favorite-item-info { flex: 1; min-width: 0; }
.favorite-item-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.favorite-item-price {
  color: var(--red-bright);
  font-family: 'Orbitron', monospace;
  font-size: 0.9rem;
}
.favorite-item-remove {
  width: 30px; height: 30px;
  background: rgba(255,45,85,0.2);
  border: none; border-radius: 50%;
  color: white; font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  display: flex; align-items: center; justify-content: center;
}
.favorite-item-remove:hover { background: rgba(255,45,85,0.4); transform: scale(1.1); }

.favorite-sidebar-empty { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.4); }
.favorite-sidebar-empty-icon { font-size: 3rem; margin-bottom: 15px; }

.favorite-toggle-btn {
  position: fixed; top: 50%; right: 20px;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 99985;
  box-shadow: 0 4px 20px rgba(255,45,85,0.5);
  transition: transform 0.3s, box-shadow 0.3s;
}
.favorite-toggle-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(255,45,85,0.7);
}
.favorite-toggle-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--blue-bright);
  color: white;
  font-size: 0.75rem; font-weight: 700;
  min-width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #0E0E1F;
}
