.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e8e0d8;
}

.cart-header h2 {
  color: #1a3d2e;
  font-size: 1.3rem;
}

.close-btn {
  background: none;
  font-size: 1.3rem;
  color: #1a3d2e;
  cursor: pointer;
  transition: all 0.3s;
}

.close-btn:hover {
  transform: rotate(90deg);
  color: #0f2818;
}

.empty-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  font-size: 1rem;
  color: #9b9690;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  background: #faf8f5;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid #e8e0d8;
}

.item-info h4 {
  margin-bottom: 0.5rem;
  color: #1a3d2e;
  font-size: 0.95rem;
  font-weight: 600;
}

.item-info p {
  color: #d4af6a;
  font-weight: 600;
  font-size: 0.9rem;
}

.remove-btn {
  background: #e74c3c;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
  margin-left: 0.5rem;
}

.remove-btn:hover {
  background: #c0392b;
  transform: none;
}

.cart-footer {
  border-top: 1px solid #e8e0d8;
  padding: 1.5rem;
}

.cart-total {
  text-align: right;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #1a3d2e;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  background: #1a3d2e;
  color: white;
  padding: 0.95rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}

.checkout-btn:hover {
  background: #0f2818;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 61, 46, 0.2);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.quantity-control button {
  background: #1a3d2e;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s;
}

.quantity-control button:hover {
  background: #0f2818;
}

@media (max-width: 768px) {
  .cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
  }

  .cart-header {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e8e0d8;
    background: white;
  }

  .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1rem 180px; /* Room for floating footer */
    -webkit-overflow-scrolling: touch;
  }

  .cart-footer {
    position: fixed !important;
    bottom: 60px !important; /* Back to the exact Red Button position */
    left: 20px !important;
    right: 20px !important;
    width: calc(100% - 40px) !important;
    background: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 24px !important;
    border: 2px solid #e8e0d8 !important;
    z-index: 100000 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
  }

  .checkout-btn {
    width: 100% !important;
    background: #1a3d2e !important; /* Premium Green */
    color: white !important;
    padding: 1.2rem !important;
    border-radius: 16px !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
    border: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
  }

  .cart-total {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
  }
}
