/* ==========================================
   Modern Cart Drawer — BurgerLab-Style (Responsive)
   ========================================== */

/* Floating Cart Button */
.bs-cart-button {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFB347, #FFCC33);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  z-index: 9999;
  transition: 0.3s ease;
}
.bs-cart-button:hover { transform: scale(1.05); }
.bs-cart-count {
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
}

/* Overlay */
.bs-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 9998;
}
.bs-cart-open .bs-cart-overlay {
  opacity: 1;
  visibility: visible;
}

/* Drawer Container */
.bs-cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -6px 0 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
  z-index: 9999;
}
.bs-cart-open .bs-cart-drawer { right: 0; }

/* Header */
.bs-drawer-header {
  background: linear-gradient(135deg, #FFB347, #FFCC33);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 0 0 0;
}
.bs-drawer-header h3 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
.bs-drawer-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

/* Cart Body */
.bs-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  background: #fafafa;
}
.bs-cart-empty {
  text-align: center;
  padding: 40px 0;
  color: #777;
  font-weight: 500;
}

/* Cart Items */
.bs-cart-item {
  display: flex;
  align-items: center;
  background: #fff;
  margin-bottom: 12px;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.bs-cart-item img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 10px;
}
.bs-cart-item-right { flex: 1; }
.bs-cart-name { font-weight: 600; font-size: 0.95rem; }
.bs-cart-meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}
.bs-cart-qty {
  width: 50px;
  padding: 3px;
  margin-left: 5px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.bs-btn-remove {
  background: none;
  border: none;
  color: #e53935;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Footer */
.bs-cart-footer {
  padding: 16px 18px;
  border-top: 1px solid #eee;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bs-cart-sub {
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  display: flex;
  justify-content: space-between;
}
.bs-cart-checkout {
  display: block;
  background: linear-gradient(135deg, #FFB347, #FFCC33);
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s ease;
}
.bs-cart-checkout:hover {
  transform: scale(1.02);
}

/* Scrollbar */
.bs-cart-body::-webkit-scrollbar { width: 8px; }
.bs-cart-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

/* Cart Top (Icon + Count) */
.bs-cart-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
}
.bs-cart-count-top {
  background: #ff6a00;
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

/* ===========================
   📱 Responsive Adjustments
   =========================== */

/* Tablets (<=768px) */
@media (max-width: 768px) {
  .bs-cart-drawer {
    width: 85%;
    right: -85%;
    border-radius: 0;
  }
  .bs-cart-open .bs-cart-drawer { right: 0; }

  .bs-cart-item img {
    width: 56px;
    height: 56px;
  }

  .bs-cart-name {
    font-size: 0.9rem;
  }

  /* ✅ Keep Cart Button Centered */
  .bs-cart-button {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Mobile Phones (<=480px) */
@media (max-width: 480px) {
  .bs-cart-drawer {
    width: 100%;
    right: -100%;
    border-radius: 0;
  }
  .bs-cart-open .bs-cart-drawer { right: 0; }

  .bs-drawer-header h3 {
    font-size: 1rem;
  }

  .bs-cart-item {
    padding: 8px;
  }

  .bs-cart-item img {
    width: 52px;
    height: 52px;
  }

  .bs-cart-checkout {
    padding: 10px;
    font-size: 0.95rem;
  }

  .bs-cart-sub {
    font-size: 0.9rem;
  }

  /* ✅ Keep Floating Button Centered on Mobile Too */
  .bs-cart-button {
    font-size: 13px;
    padding: 8px 14px;
    gap: 6px;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
  }

  .bs-cart-count {
    font-size: 12px;
    padding: 3px 7px;
  }
}
