/* EuroVending - Custom Styles */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

/* General Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  min-height: 400px;
  display: flex;
  align-items: center;
}

.hero-section h1 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-section .lead {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Cards */
.card {
  border: none;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
  border-bottom: none;
}

/* Product Cards */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card .card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card .card-img-top {
  height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.product-card .price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-color), #0056b3);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #0056b3, var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
}

/* Navigation */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Forms */
.form-control {
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Alerts */
.alert {
  border-radius: 10px;
  border: none;
}

.alert-success {
  background: linear-gradient(45deg, var(--success-color), #20c997);
  color: white;
}

.alert-danger {
  background: linear-gradient(45deg, var(--danger-color), #e74c3c);
  color: white;
}

.alert-warning {
  background: linear-gradient(45deg, var(--warning-color), #f39c12);
  color: #212529;
}

/* Feature Icons */
.feature-icon {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--dark-color) 0%, #343a40 100%);
}

/* Cart Badge */
.badge {
  border-radius: 50%;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 300px;
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1.1rem;
  }

  .card-img-top {
    height: 150px;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 250px;
  }

  .hero-section h1 {
    font-size: 1.75rem;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Loading Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

/* Checkout Styles */
.checkout-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 2rem;
}

.courier-option .card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.courier-option .card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.1);
}

.courier-option input[type="radio"]:checked + label .card {
  border-color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.05);
}

/* Form Validation Styles */
.form-control.is-valid {
  border-color: var(--success-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
  border-color: var(--danger-color);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4m0-2.4L5.8 7'/%3e%3c/svg%3e");
}

/* Success/Error Messages */
.message-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  max-width: 400px;
}

.message {
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .no-print {
    display: none !important;
  }

  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}
