/* Cart Page Styles - Matching Flutter App Design */

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

/* Header */
.cart-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #d32f2f;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(211, 47, 47, 0.2);
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(211, 47, 47, 0.1);
  transform: translateY(-1px);
}
  max-width: 600px;
  margin: 0 auto;
}

.back-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #f8f9fa;
}

.back-icon {
  font-size: 20px;
  color: #2e7d32;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #2e7d32;
  margin: 0;
}

.menu-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.menu-btn:hover {
  background-color: #f8f9fa;
}

.menu-icon {
  font-size: 18px;
  color: #666;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  max-width: 600px;
  margin: 0 auto;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  border-bottom-color: #2e7d32;
}

.tab-icon {
  margin-right: 8px;
  font-size: 16px;
}

.tab-text {
  font-weight: 500;
  color: #666;
}

.tab.active .tab-text {
  color: #2e7d32;
}

/* Delivery Info */
.delivery-info {
  background: #f0f8f0;
  margin: 16px;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  max-width: 568px;
  margin-left: auto;
  margin-right: auto;
}

.delivery-icon {
  font-size: 20px;
  margin-right: 12px;
}

.delivery-text {
  font-weight: 500;
  color: #2e7d32;
}

/* Cart Container */
.cart-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px 100px;
}

/* Cart Items */
.cart-items {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
  border-bottom: none;
}

.item-image {
  width: 60px;
  height: 60px;
  margin-right: 12px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
}

.item-price {
  font-size: 14px;
  color: #2e7d32;
  font-weight: 500;
}

.item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-badge {
  background: #2e7d32;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  min-width: 40px;
  text-align: center;
}

.remove-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background-color: #ffe6e6;
}

.remove-icon {
  color: #dc3545;
  font-size: 16px;
  font-weight: bold;
}

/* Order Summary */
.order-summary {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-label {
  font-size: 16px;
  color: #666;
}

.summary-value {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.total-row {
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
  margin-top: 12px;
}

.total-row .summary-label {
  font-weight: 600;
  color: #2e7d32;
}

.total-row .summary-value {
  font-weight: 600;
  color: #2e7d32;
  font-size: 18px;
}

/* Minimum Order Warning */
.min-warning {
  background: #fff3cd;
  color: #856404;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 14px;
  border: 1px solid #ffeaa7;
}

/* Checkout Button */
.checkout-btn {
  width: 100%;
  background: #2e7d32;
  color: white;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkout-btn:hover {
  background: #1b5e20;
}

.checkout-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Checkout Modal */
.checkout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.checkout-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 4px;
}

.modal-body {
  padding: 0 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2e7d32;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #f0f0f0;
}

.btn-secondary {
  flex: 1;
  background: #f8f9fa;
  color: #666;
  border: 1px solid #ddd;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e9ecef;
}

.btn-primary {
  flex: 1;
  background: #2e7d32;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background: #1b5e20;
}

/* Empty Cart State */
.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.empty-cart-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-cart h3 {
  margin: 0 0 8px;
  color: #333;
}

.empty-cart p {
  margin: 0;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 480px) {
  .cart-container {
    padding: 0 12px 100px;
  }
  
  .delivery-info {
    margin: 12px;
    padding: 12px;
  }
  
  .cart-item {
    padding: 12px;
  }
  
  .item-image {
    width: 50px;
    height: 50px;
  }
  
  .order-summary {
    padding: 16px;
  }
}
