/**
 * Products Page Styles
 * Ergonomic product showcase with enterprise-grade design
 */

/* ===================================
   Hero Section
   =================================== */

.products-hero {
  background: linear-gradient(
    135deg,
    var(--gray-50) 0%,
    #eef2ff 50%,
    var(--gray-50) 100%
  );
  padding: calc(var(--header-height, 64px) + 2rem) 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.products-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.products-hero .hero-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.products-hero .hero-content-centered {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb ol {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--gray-400);
}

.breadcrumb a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--gray-700);
  font-weight: 500;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-700);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.hero-badge svg {
  width: 1rem;
  height: 1rem;
}

/* Hero Title */
.products-hero .hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--gray-900);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .products-hero .hero-title {
    font-size: 3.25rem;
  }
}

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

/* Hero Subtitle */
.products-hero .hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Hero Brands */
.hero-brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.brand-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: all 0.2s ease;
}

.brand-tag:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ===================================
   Category Navigation
   =================================== */

.category-nav {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 1rem 1.5rem;
  position: sticky;
  top: var(--header-height, 64px);
  z-index: 50;
}

.category-nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-nav-container::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: white;
  border-color: var(--primary-300);
  color: var(--primary-700);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.pill-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ===================================
   Product Sections
   =================================== */

.product-section {
  padding: 4rem 0.75rem;
  background: white;
  scroll-margin-top: calc(var(--header-height, 64px) + 60px);
}

.product-section.section-alt {
  background: var(--gray-50);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Header */
.section-header-products {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-header-products .section-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-header-products .section-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.section-header-products .section-text {
  flex: 1;
  min-width: 200px;
}

.section-header-products .section-text h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem;
}

.section-header-products .section-text p {
  font-size: 1rem;
  color: var(--gray-500);
  margin: 0;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.2s ease;
}

.section-link:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.section-link svg {
  width: 1rem;
  height: 1rem;
}

/* ===================================
   Products Grid
   =================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Product Card */
.product-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.section-alt .product-card {
  background: white;
}

.product-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
  transform: translateY(-4px);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* Product Image */
.product-image {
  position: relative;
  background: var(--gray-50);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

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

/* Product Content */
.product-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-brand {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.product-description {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--gray-600);
  margin: 0 0 1rem;
  flex: 1;
}

/* Product Features */
.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}

.product-features svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke: #10b981;
  flex-shrink: 0;
}

/* Product CTA */
.product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--gray-100);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: auto;
}

.product-cta:hover {
  background: var(--primary-600);
  color: white;
}

.product-cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.product-cta:hover svg {
  transform: translateX(4px);
}

/* ===================================
   CTA Section
   =================================== */

.products-cta {
  background: linear-gradient(135deg, var(--gray-900) 0%, #1e1b4b 100%);
  padding: 5rem 1.5rem;
  text-align: center;
}

.products-cta .cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(
    135deg,
    var(--primary-500) 0%,
    var(--primary-600) 100%
  );
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.cta-icon svg {
  width: 2rem;
  height: 2rem;
  stroke: white;
}

.products-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem;
}

.products-cta > .cta-content > p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* CTA-specific button overrides (dark background context) */
.products-cta .btn-primary-large,
.products-cta .btn-secondary-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 0.75rem;
}

.products-cta .btn-primary-large {
  background: linear-gradient(
    135deg,
    var(--primary-500) 0%,
    var(--primary-600) 100%
  );
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.products-cta .btn-primary-large svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.products-cta .btn-primary-large:hover svg {
  transform: translateX(4px);
}

.products-cta .btn-primary-large:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.products-cta .btn-secondary-large {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.products-cta .btn-secondary-large:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.cta-note svg {
  width: 1rem;
  height: 1rem;
  stroke: var(--primary-300);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
  .products-hero {
    padding: calc(var(--header-height, 64px) + 1.5rem) 1rem 2rem;
  }

  .products-hero .hero-title {
    font-size: 2rem;
  }

  .products-hero .hero-subtitle {
    font-size: 1rem;
  }

  .section-header-products {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .section-header-products .section-text h2 {
    font-size: 1.5rem;
  }

  .section-link {
    align-self: flex-start;
  }

  .products-cta h2 {
    font-size: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .products-cta .btn-primary-large,
  .products-cta .btn-secondary-large {
    width: 100%;
    justify-content: center;
  }
}

/* ===================================
   Smooth Scroll
   =================================== */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card,
  .product-image img,
  .product-cta svg {
    transition: none;
  }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
  .products-hero,
  .category-nav,
  .products-cta,
  .navbar,
  .site-footer,
  .product-cta {
    display: none;
  }

  .product-section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  .products-grid {
    display: block;
  }

  .product-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
