/* Professional Cart Page Styles */

/* Cart Section */
.cart-section {
  padding: 40px 24px;
  min-height: calc(100vh - 200px);
  background: var(--background);
}

.cart-container {
  max-width: 1000px;
  margin: 0 auto;
}

.cart-header {
  margin-bottom: 32px;
  text-align: center;
}

.cart-header .section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

/* Branch Selection */
.branch-selection {
  background: var(--surface);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.branch-selection label {
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
  white-space: nowrap;
}

.branch-selection .form-control {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* Cart Items Container */
.cart-items {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 24px;
}

/* Individual Cart Item */
.cart-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  background: #fafafa;
  transition: all 0.3s ease;
  align-items: center;
}

.cart-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.cart-item:last-child {
  margin-bottom: 0;
}

/* Cart Item Image */
.cart-item-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Cart Item Info */
.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.cart-item-quantity {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 600;
  margin: 0;
}

/* Cart Item Actions */
.cart-item-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.cart-item-actions .quantity-selector {
  background: white;
  padding: 8px;
  border-radius: 8px;
  border: 2px solid var(--border);
  margin-bottom: 0;
}

.cart-item-actions .quantity-btn {
  width: 36px;
  height: 36px;
  font-size: 20px;
  border-radius: 6px;
  background: var(--surface);
}

.cart-item-actions .quantity-btn:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.cart-item-actions .quantity-display {
  font-size: 18px;
  font-weight: 700;
  min-width: 50px;
}

/* Remove Button */
.remove-btn {
  padding: 10px 20px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  white-space: nowrap;
}

.remove-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Cart Summary */
.cart-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  color: white;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-row strong {
  font-weight: 700;
}

/* Submit Order Button */
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  border: none;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  width: 100%;
  margin-top: 24px;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 80px 24px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.empty-cart-icon {
  font-size: 80px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-cart h2 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 700;
}

.empty-cart p {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 32px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .cart-item-image {
    width: 100%;
    height: 200px;
    margin: 0 auto;
  }

  .cart-item-info {
    text-align: center;
  }

  .cart-item-actions {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .branch-selection {
    flex-direction: column;
    align-items: stretch;
  }

  .branch-selection label {
    text-align: center;
  }

  .cart-header .section-title {
    font-size: 24px;
  }

  .btn-success {
    font-size: 16px;
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .cart-section {
    padding: 20px 12px;
  }

  .cart-items {
    padding: 16px;
  }

  .cart-item {
    padding: 12px;
  }

  .cart-item-name {
    font-size: 18px;
  }

  .remove-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}