/* LENTIN - Custom Styles */

/* ========== Variables & Colors ========== */
:root {
  --lentin-primary: #0d6efd;
  --lentin-secondary: #6c757d;
  --lentin-blue-gray: #5a6c7d;
  --lentin-light-blue: #e7f1ff;
  --lentin-dark: #212529;
  --lentin-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --lentin-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========== Typography ========== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--lentin-dark);
  line-height: 1.6;
}

/* Prevent media from overflowing on mobile */
img, video {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ========== Navbar Styling ========== */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
  font-size: 1.5rem;
  color: var(--lentin-primary) !important;
  letter-spacing: 1px;
  transition: transform 0.2s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

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

.nav-link:hover {
  color: var(--lentin-primary) !important;
}

/* ========== Cards ========== */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--lentin-card-shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--lentin-hover-shadow);
  transform: translateY(-4px);
}

.card-img-top {
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* ========== Buttons ========== */
.btn {
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
  transform: translateY(-2px);
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
  color: #fff !important;
}

/* Outline success hover/active for checkbox-like buttons */
.btn-outline-success:hover {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
  color: #fff !important;
}

/* Checked state when using .btn-check pattern */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: #fff !important;
  border-color: #0d6efd;
}

.btn-check:checked + .btn-outline-success,
.btn-check:active + .btn-outline-success {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  color: #fff !important;
  border-color: #198754;
}

/* Pulse animation for selection feedback */
@keyframes pulseScale {
  0% { transform: scale(1); box-shadow: none; }
  50% { transform: scale(1.02); box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15); }
  100% { transform: scale(1); box-shadow: none; }
}

.pulse-checked {
  animation: pulseScale 0.25s ease;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

/* ========== Forms ========== */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 0.625rem 1rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--lentin-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--lentin-dark);
}

/* ========== Footer ========== */
footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 2rem 0;
  margin-top: 4rem;
}

footer a {
  color: var(--lentin-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--lentin-primary);
}

/* ========== Alerts & Messages ========== */
.alert {
  border-radius: 10px;
  border: none;
  box-shadow: var(--lentin-card-shadow);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-dismissible .btn-close {
  padding: 1rem;
}

/* ========== Tables ========== */
.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--lentin-card-shadow);
}

/* Tabele pe mobil: evită ruperea pe fiecare literă; preferăm scroll orizontal */
@media (max-width: 576px) {
  .table th,
  .table td {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    vertical-align: middle;
  }
  /* Reactivează wrap doar unde e necesar explicit */
  .table .text-wrap {
    white-space: normal;
  }
}

.table thead {
  background-color: var(--lentin-light-blue);
  font-weight: 600;
}

/* ========== Badges ========== */
.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 500;
}

/* ========== Hero Section ========== */
.bg-light.rounded-3 {
  background: linear-gradient(135deg, #f8f9fa 0%, var(--lentin-light-blue) 100%) !important;
  border-radius: 16px !important;
}

/* ========== Animations ========== */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Utility Classes ========== */
.shadow-sm-hover {
  transition: box-shadow 0.3s ease;
}

.shadow-sm-hover:hover {
  box-shadow: var(--lentin-hover-shadow);
}

.text-primary-gradient {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  footer {
    text-align: center;
  }
}

/* ========== Product Grid ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ========== Loading Spinner ========== */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-overlay.active {
  display: flex;
}

/* ========== Loyalty Card ========== */
.loyalty-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* ========== Image Gallery ========== */
.image-gallery img {
  border-radius: 12px;
  box-shadow: var(--lentin-card-shadow);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.image-gallery img:hover {
  transform: scale(1.02);
}

/* ========== Smooth Scroll ========== */
html {
  scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #0a58ca;
}

