/* Shopping Cart Styles */

/* Cart Button */
.cart-button {
    position: fixed;
    bottom: 140px; /* Moved higher to avoid bottom nav */
    right: 20px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(243, 156, 18, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.cart-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(243, 156, 18, 0.7);
}

.cart-button i {
  color: white;
  font-size: 24px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f39c12;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(243, 156, 18, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(243, 156, 18, 0.4);
    }
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: #1a1a1a;
  z-index: 1999;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
  border-left: 1px solid #333;
}

.cart-sidebar.active {
  right: 0;
}

/* Cart Header */
.cart-header {
  padding: 25px 30px;
  border-bottom: 2px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #2c2c2c, #1f1f1f);
  min-height: 80px;
}

.cart-header h3 {
  color: #fafafa;
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cart-close {
  background: none;
  border: none;
  color: #fafafa;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-close:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  transform: rotate(90deg);
}

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 25px 30px;
  min-height: 0; /* Important for flex scrolling */
}

/* Custom scrollbar for cart items */
.cart-items::-webkit-scrollbar {
  width: 8px;
}

.cart-items::-webkit-scrollbar-track {
  background: #2c2c2c;
  border-radius: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: #e74c3c;
  border-radius: 4px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: #c0392b;
}

.empty-cart {
  text-align: center;
  color: #888;
  padding: 60px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.empty-cart i {
  font-size: 4rem;
  margin-bottom: 25px;
  opacity: 0.4;
  color: #555;
}

.empty-cart p {
  margin: 8px 0;
  font-size: 1.2rem;
  line-height: 1.5;
}

.empty-cart p:first-of-type {
  font-weight: 600;
  color: #aaa;
}

.cart-item {
  background: linear-gradient(135deg, #2c2c2c, #252525);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.3s ease;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}

.cart-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #e74c3c;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: #e74c3c;
}

.cart-item:hover::before {
  opacity: 1;
}

.cart-item-info {
  flex: 1;
  margin-right: 20px;
}

.cart-item-info h4 {
  color: #fafafa;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.cart-item-price {
  color: #e74c3c;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 5px;
}

.cart-item-price .original-price {
  text-decoration: line-through;
  color: #888;
  margin-right: 10px;
  font-size: 0.9rem;
}

.cart-item-price .discounted-price {
  color: #e74c3c;
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  min-width: 140px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  border-radius: 20px;
  padding: 6px 10px;
  border: 1px solid #333;
}

.quantity-btn {
  background: #e74c3c;
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 12px;
}

.quantity-btn:hover {
  background: #c0392b;
  transform: scale(1.15);
}

.quantity-btn:active {
  transform: scale(0.95);
}

.remove-btn {
  background: #95a5a6;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 12px;
}

.remove-btn:hover {
  background: #e74c3c;
  transform: scale(1.1);
}

.quantity {
  color: #fafafa;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
  font-size: 1rem;
  background: #333;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Cart Footer */
.cart-footer {
  padding: 25px 30px;
  border-top: 2px solid #333;
  background: linear-gradient(135deg, #2c2c2c, #1f1f1f);
  min-height: 120px;
}

.cart-total {
  margin-bottom: 20px;
  text-align: center;
  color: #fafafa;
  font-size: 1.4rem;
  padding: 15px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: none;
  color: white;
  padding: 18px 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.checkout-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #128c7e, #25d366);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.checkout-btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.checkout-btn:disabled {
  background: linear-gradient(135deg, #555, #444);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* Add to Cart Button on Menu Items */
.add-to-cart-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 300;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover::before {
  width: 100%;
  height: 100%;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  transform: scale(1.15);
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.5);
}

.add-to-cart-btn:active {
  transform: scale(0.95);
}

.menu-item-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Modal Price Container */
.modal-price-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
}

.modal-price-info {
    flex: 1;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Modal Add to Cart Button */
.modal-add-to-cart-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.5);
}

.modal-add-to-cart-btn:active {
    transform: translateY(0);
}

.modal-add-to-cart-btn i {
    font-size: 11px;
}

/* Cart Feedback */
.cart-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: #27ae60;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.cart-feedback.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cart-feedback i {
  font-size: 1.2rem;
}

/* Checkout Modal */
.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.checkout-modal.show {
  opacity: 1;
  visibility: visible;
}

.checkout-modal-content {
  background: #1a1a1a;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.checkout-modal.show .checkout-modal-content {
  transform: scale(1);
}

.checkout-header {
  padding: 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2c2c2c;
  border-radius: 15px 15px 0 0;
}

.checkout-header h3 {
  color: #fafafa;
  margin: 0;
  font-size: 1.5rem;
}

.checkout-close {
  background: none;
  border: none;
  color: #fafafa;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.checkout-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.checkout-body {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.customer-info h4,
.order-summary h4 {
  color: #fafafa;
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #fafafa;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #2c2c2c;
  color: #fafafa;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e74c3c;
}

.summary-items {
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #333;
  color: #fafafa;
}

.summary-total {
  color: #e74c3c;
  font-size: 1.2rem;
  text-align: center;
  padding: 15px 0;
  border-top: 2px solid #e74c3c;
}

.checkout-footer {
  padding: 20px;
  border-top: 1px solid #333;
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  background: #2c2c2c;
  border-radius: 0 0 15px 15px;
}

.btn-cancel {
  background: #95a5a6;
  border: none;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: #7f8c8d;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  border: none;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #128c7e, #25d366);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Success Modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.success-modal.show {
  opacity: 1;
  visibility: visible;
}

.success-modal-content {
  background: #1a1a1a;
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.success-modal.show .success-modal-content {
  transform: scale(1);
}

.success-icon {
  color: #27ae60;
  font-size: 4rem;
  margin-bottom: 20px;
}

.success-modal-content h3 {
  color: #fafafa;
  margin: 0 0 15px 0;
  font-size: 1.5rem;
}

.success-modal-content p {
  color: #ccc;
  margin: 10px 0;
  line-height: 1.5;
}

.btn-ok {
  background: #e74c3c;
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.btn-ok:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .cart-button {
    bottom: 120px; /* Above bottom navigation */
    right: 20px;
    width: 55px;
    height: 55px;
  }

  .cart-button i {
    font-size: 22px;
  }

  .cart-count {
    width: 24px;
    height: 24px;
    font-size: 12px;
    top: -6px;
    right: -6px;
  }

  .checkout-body {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px;
  }

  .checkout-modal-content {
    width: 95%;
    margin: 15px;
  }

  .checkout-footer {
    flex-direction: column;
    gap: 12px;
  }

  .btn-cancel,
  .btn-whatsapp {
    width: 100%;
    justify-content: center;
    padding: 15px;
  }

  .cart-item-controls {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    margin-top: 15px;
  }

  .quantity-controls {
    flex: 1;
    justify-content: center;
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .cart-header,
  .cart-footer,
  .checkout-header,
  .checkout-body,
  .checkout-footer {
    padding: 20px;
  }

  .cart-items {
    padding: 20px;
  }

  .cart-item {
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .cart-item-info {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .cart-item-controls {
    align-self: stretch;
    margin-top: 0;
  }

  .add-to-cart-btn {
      width: 28px;
      height: 28px;
      font-size: 11px;
      margin-left: 8px;
  }

  .cart-button {
    bottom: 120px;
    right: 15px;
    width: 50px;
    height: 50px;
  }

  .cart-count {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}
