:root {
  --primary-color: #2c5aa0;
  --secondary-color: #f8c146;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--dark-color);
}

/* Header Styles */
.navbar-brand {
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color) !important;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e3d72 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-section h1 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Cards */
.hover-card {
  transition: all 0.3s ease;
  border: none;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.category-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background: #1e3d72;
  border-color: #1e3d72;
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--dark-color);
}

.btn-warning:hover {
  background: #e6ad3d;
  border-color: #e6ad3d;
  transform: translateY(-2px);
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: none;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Forms */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 8px;
}

/* Cart */
.cart-item {
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.cart-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quantity-input {
  width: 80px;
  text-align: center;
}

/* Modal */
.modal-content {
  border-radius: 15px;
  border: none;
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
  filter: invert(1);
}

/* Tables */
.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table thead th {
  background: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: background-color 0.3s ease;
}

.table tbody tr:hover {
  background-color: rgba(44, 90, 160, 0.05);
}

/* Alerts */
.alert {
  border-radius: 10px;
  border: none;
  padding: 15px 20px;
  font-weight: 500;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger-color);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
}

/* Badges */
.badge {
  border-radius: 50px;
  padding: 8px 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Loading */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    text-align: center;
    padding-top: 100px;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .btn {
    padding: 10px 25px;
    font-size: 0.9rem;
  }

  .card-body {
    padding: 1rem;
  }

  .table-responsive {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .btn-lg {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .modal,
  .alert {
    display: none !important;
  }

  .container {
    max-width: none !important;
  }

  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e3d72;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--dark-color);
  }

  .btn {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
