/* Critical CSS for Hunab App - Improves FCP and LCP */

/* Critical layout styles */
.products-page {
  min-height: 100vh;
  background-color: var(--bs-body-bg, #fff);
}

.products-page__header {
  padding: 2rem 0;
}

.products-page__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bs-heading-color, #212529);
  margin-bottom: 1rem;
}

.products-page__subtitle {
  font-size: 1.25rem;
  color: var(--bs-secondary-color, #6c757d);
}

.products-page__grid {
  margin-top: 2rem;
}

/* Critical product card styles */
.product-card {
  height: 100%;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease-in-out;
  background-color: var(--bs-card-bg, #fff);
}

.product-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #f8f9fa;
}

.product-card__body {
  padding: 1rem;
}

.product-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--bs-heading-color, #212529);
}

.product-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-primary, #0d6efd);
  margin-bottom: 0.5rem;
}

/* Critical loading states */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Critical container and grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.col {
  flex: 1;
  padding: 0 0.5rem;
}

.col-lg-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

/* Critical typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Critical button styles */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background-color: var(--bs-primary, #0d6efd);
  border-color: var(--bs-primary, #0d6efd);
}

.btn-outline-danger {
  color: var(--bs-danger, #dc3545);
  border-color: var(--bs-danger, #dc3545);
  background-color: transparent;
}

/* Critical alert styles */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* Critical progress bar */
.progress {
  display: flex;
  height: 1rem;
  overflow: hidden;
  font-size: 0.75rem;
  background-color: #e9ecef;
  border-radius: 0.25rem;
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--bs-primary, #0d6efd);
  transition: width 0.6s ease;
}

/* Critical spacing utilities */
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--bs-secondary-color, #6c757d) !important; }

/* Critical responsive utilities */
@media (max-width: 768px) {
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .products-page__title {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
}

@media (max-width: 576px) {
  .col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .products-page__title {
    font-size: 1.75rem;
  }
}

/* Critical CSS variables */
:root {
  --bs-body-bg: #fff;
  --bs-body-color: #212529;
  --bs-heading-color: #212529;
  --bs-primary: #0d6efd;
  --bs-secondary-color: #6c757d;
  --bs-border-color: #dee2e6;
  --bs-card-bg: #fff;
  --bs-danger: #dc3545;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  :root {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
    --bs-heading-color: #f8f9fa;
    --bs-border-color: #495057;
    --bs-card-bg: #343a40;
    --bs-secondary-color: #adb5bd;
  }
} 