/* Products Section Styles */

.products-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.products-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.products-header {
  text-align: center;
  margin-bottom: 4rem;
}

.products-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--vitabex-text-dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.products-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--vitabex-primary), var(--vitabex-secondary));
  border-radius: 2px;
}

.products-subtitle {
  font-size: 1.25rem;
  color: var(--vitabex-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.products-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.products-toggle-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  color: var(--vitabex-primary-dark);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.products-toggle-btn i {
  font-size: 0.8rem;
}

.products-toggle-btn:hover {
  color: var(--vitabex-primary-dark);
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transform: none;
}

.products-toggle-btn:active {
  transform: none;
}

.products-toggle-btn:focus {
  outline: 2px solid var(--vitabex-primary);
  outline-offset: 2px;
}

.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.product-image-container {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, var(--vitabex-primary), var(--vitabex-secondary));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-content {
  padding: 2rem;
}

.product-category {
  color: var(--vitabex-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vitabex-text-dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.product-description {
  color: var(--vitabex-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.product-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--vitabex-primary-light);
  color: var(--vitabex-primary-dark);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.product-feature i {
  font-size: 0.75rem;
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--vitabex-border-light);
}

.product-tablet-count {
  color: var(--vitabex-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.product-cta {
  background: linear-gradient(135deg, var(--vitabex-primary), var(--vitabex-secondary));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-cta:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.product-cta i {
  font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-container {
    padding: 0 1.5rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .products-section {
    padding: 3rem 0;
  }
  
  .products-container {
    padding: 0 1rem;
  }
  
  .products-header {
    margin-bottom: 3rem;
  }
  
  .products-title {
    font-size: 2.5rem;
  }
  
  .products-subtitle {
    font-size: 1.125rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .product-card {
    border-radius: 15px;
  }
  
  .product-image-container {
    height: 250px;
  }
  
  .product-content {
    padding: 1.5rem;
  }
  
  .product-name {
    font-size: 1.25rem;
  }
  
  .product-features {
    gap: 0.5rem;
  }
  
  .product-feature {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .products-title {
    font-size: 2rem;
  }
  
  .products-subtitle {
    font-size: 1rem;
  }
  
  .product-image-container {
    height: 220px;
  }
  
  .product-content {
    padding: 1.25rem;
  }
  
  .product-info {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .product-cta {
    text-align: center;
    justify-content: center;
  }
}

/* Animation on scroll */
.product-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation */
.product-card:nth-child(1) { transition-delay: 0.1s; }
.product-card:nth-child(2) { transition-delay: 0.2s; }
.product-card:nth-child(3) { transition-delay: 0.3s; }
.product-card:nth-child(4) { transition-delay: 0.4s; }
.product-card:nth-child(5) { transition-delay: 0.5s; }
.product-card:nth-child(6) { transition-delay: 0.6s; }

/* Loading state for images */
.product-image-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Product image placeholder */
.product-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.placeholder-content {
  text-align: center;
  padding: 2rem;
}

/* Touch feedback */
.product-card.touch-active {
  transform: scale(0.98) !important;
  transition: transform 0.1s ease;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Accessibility improvements */
.product-cta:focus {
  outline: 2px solid var(--vitabex-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-image,
  .product-cta {
    transition: none;
  }
  
  .product-card:hover {
    transform: none;
  }
  
  .product-card:hover .product-image {
    transform: none;
  }
}

/* Print styles */
@media print {
  .products-section {
    background: white;
    padding: 2rem 0;
  }
  
  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .product-cta {
    display: none;
  }
}
