/* ═══════════════════════════════════════════════════
   CART SIDEBAR STYLES
═══════════════════════════════════════════════════ */

:root {
  --cart-bg: #1a1a1a;
  --cart-border: rgba(255, 255, 255, 0.07);
  --cart-text: #f0ece3;
  --cart-muted: #8a8a8a;
  --cart-primary: #f59e0b;
  --cart-hover: #d97706;
}

/* Cart Button in Navbar */
.cart-btn {
  position: relative;
  padding: 0.5rem !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2rem;
}

.cart-btn:hover {
  color: var(--cart-primary);
}

/* Cart Badge */
#cartBadge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--cart-primary) !important;
  color: #fff !important;
  width: 20px;
  height: 20px;
  border-radius: 50% !important;
  font-size: 0.7rem !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: bold !important;
  z-index: 2002;
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 400px;
  max-width: 100%;
  background: var(--cart-bg);
  border-left: 1px solid var(--cart-border);
  z-index: 2001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-sidebar.open {
  transform: translateX(0);
}

/* Cart Header */
.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--cart-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--cart-text);
}

/* Cart Close Button */
.cart-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cart-border);
  border-radius: 50%;
  color: var(--cart-text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-close:hover {
  background: var(--cart-primary);
  border-color: var(--cart-primary);
}

/* Cart Items Container */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* Empty Cart State */
.cart-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--cart-muted);
  font-size: 0.9rem;
}

.cart-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual Cart Item */
.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cart-border);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Cart Item Image */
.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--cart-primary);
  border: 1px solid var(--cart-border);
}

/* Cart Item Info */
.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 0.9rem;
  color: var(--cart-text);
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.cart-item-qty {
  font-size: 0.75rem;
  color: var(--cart-muted);
  margin-bottom: 0.2rem;
}

.cart-item-price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--cart-primary);
}

/* Cart Item Remove Button */
.cart-item-remove {
  background: none;
  border: none;
  color: var(--cart-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-remove:hover {
  color: var(--cart-primary);
}

/* Cart Footer */
.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--cart-border);
  flex-shrink: 0;
}

/* Cart Total */
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: var(--cart-text);
}

.cart-total-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--cart-primary);
}

/* Checkout Button */
.btn-checkout {
  width: 100%;
  background: var(--cart-primary);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-checkout:hover {
  background: var(--cart-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}

.btn-checkout:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Scrollbar Styling */
.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: transparent;
}

.cart-items::-webkit-scrollbar-thumb {
  background: var(--cart-border);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: var(--cart-muted);
}

