/* Product detail page specific styles */

/* Breadcrumb */
.breadcrumb {
  background-color: var(--background-alt);
  padding: var(--spacing-md) 0;
  margin-top: 70px;
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  margin: 0 var(--spacing-xs);
  color: var(--text-secondary);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Product hero section */
.product-hero {
  position: relative;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 35%, #fce7f3 100%);
  padding: var(--spacing-2xl) 0;
  overflow: hidden;
}

.product-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.2), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.15), transparent 40%);
  pointer-events: none;
}

.product-hero .container {
  position: relative;
  z-index: 1;
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.product-hero-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

@media (min-width: 1024px) {
  .product-hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--spacing-3xl, 4rem);
  }

  .product-hero-content {
    text-align: left;
    margin: 0;
  }
}

.product-hero-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--spacing-lg);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
}

.product-hero-icon i {
  font-size: 3rem;
  color: white;
}

.product-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  line-height: 1.15;
}

.product-hero-tagline {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.product-hero-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-lg);
  display: grid;
  gap: 0.6rem;
}

.product-hero-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.product-hero-list li i {
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.08);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.product-hero-highlight {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  margin-bottom: var(--spacing-md);
}

.product-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-top: var(--spacing-sm);
}

@media (min-width: 1024px) {
  .product-hero-actions {
    justify-content: flex-start;
    gap: var(--spacing-md);
  }
}

.product-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: var(--spacing-lg) 0;
}

.product-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.product-meta-chip i {
  color: var(--primary-color);
}

.product-hero-metrics {
  margin-top: var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.product-hero-metric {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.product-hero-metric span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-hero-metric strong {
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Product sections */
.product-section {
  padding: var(--spacing-2xl) 0;
}

.product-section-alt {
  background-color: var(--background-alt);
}

.product-section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
}

.product-section-title.text-center {
  text-align: center;
}

.product-description {
  max-width: 800px;
  margin: 0 auto;
}

.product-text {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

/* Product features grid */
.product-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  align-items: stretch;
}

.product-feature {
  background-color: white;
  padding: var(--spacing-xl);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  text-align: left;
  height: 100%;
}

.product-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.product-feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.product-feature-icon i {
  font-size: 1.75rem;
  color: white;
}

.product-feature-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.product-feature-text {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Video section */
.product-video {
  max-width: 900px;
  margin: var(--spacing-xl) auto 0;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 fallback */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  background-color: #000;
}

/* Prefer modern aspect-ratio to avoid odd intrinsic sizing */
@supports (aspect-ratio: 16 / 9) {
  .video-container {
    padding-bottom: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
}

.video-placeholder:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.video-placeholder i {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.7;
  transition: all var(--transition-base);
}

.video-placeholder:hover i {
  opacity: 1;
  transform: scale(1.1);
}

.video-placeholder p {
  font-size: var(--font-size-lg);
  opacity: 0.7;
}

/* Optional custom thumbnail inside placeholder */
.video-placeholder .video-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
  z-index: 0;
}
.video-placeholder .video-thumb::selection { background: transparent; }
.video-placeholder .video-thumb {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none; /* ensure clicks go to the link */
}
.video-placeholder i,
.video-placeholder p { z-index: 1; position: relative; }

/* Product hero slider sizing */
.product-hero-media {
  position: relative;
}

.product-hero-media::before {
  content: '';
  position: absolute;
  inset: 10% -5% -12% 45%;
  background: rgba(99, 102, 241, 0.15);
  filter: blur(60px);
  z-index: 0;
}

.product-hero .product-slider {
  position: relative;
  height: 420px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  z-index: 1;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.65));
}

.product-hero .product-slide {
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.product-hero .product-slide-status {
  top: 24px;
  right: 24px;
  left: auto;
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  opacity: 0.92;
}

.product-hero .product-nav {
  opacity: 1;
  padding: 0 var(--spacing-sm);
}

.product-hero .product-nav button {
  background: rgba(15, 23, 42, 0.45);
  width: 48px;
  height: 48px;
}

.product-hero .product-nav button:hover {
  background: rgba(15, 23, 42, 0.75);
}

.product-hero .product-dots {
  bottom: 18px;
}

.product-hero .product-dots .dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

@media (max-width: 767px) {
  .product-hero .product-slider {
    height: 320px;
  }
}

/* Dots for product sliders */
.product-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.product-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.15);
  transition: transform var(--transition-fast), background var(--transition-fast);
}
.product-dots .dot.active { background: #ffffff; transform: scale(1.1); }

/* Use cases */
.product-use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  align-items: stretch;
}

.product-use-case {
  background-color: white;
  padding: var(--spacing-lg);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  text-align: left;
}

.product-use-case-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.product-use-case-text {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Technology stack */
.product-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  background-color: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  min-width: 120px;
  transition: all var(--transition-fast);
}

.tech-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tech-item i {
  font-size: 2rem;
  color: var(--primary-color);
}

.tech-item span {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.tech-badge {
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: white;
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
}

.tech-badge:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* CTA section */
.product-cta {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  padding: var(--spacing-2xl) 0;
  color: white;
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: white;
}

.cta-text {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  color: white;
}

.product-cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.product-cta-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.product-cta-text {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
}

.product-cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button-row--compact {
  gap: 0.75rem;
}

.product-cta .btn-primary {
  /* Force solid white so it stands out over the purple gradient */
  background: #ffffff !important;
  color: var(--primary-color) !important;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.product-cta .btn-primary:hover {
  background-color: var(--background-alt);
}

.product-cta .btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.product-cta .btn-secondary:hover {
  background-color: #ffffff;
  color: var(--primary-color);
}

/* Improve overall CTA button readability on gradient */
.product-cta .btn {
  text-shadow: none;
  opacity: 1;
}

/* Related products */
.related-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.related-product {
  background-color: white;
  padding: var(--spacing-xl);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.related-product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.related-product-icon {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.related-product-icon i {
  font-size: 2rem;
  color: white;
}

.related-product-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.related-product-text {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
}

/* Responsive styles for product pages */
@media (min-width: 768px) {
  .product-hero-title {
    font-size: 3rem;
  }

  .product-tech-stack {
    gap: var(--spacing-lg);
  }

  .tech-item {
    min-width: 140px;
  }
}

@media (min-width: 1024px) {
  .product-hero-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 767px) {
  .product-hero-icon {
    width: 80px;
    height: 80px;
  }

  .product-hero-icon i {
    font-size: 2.5rem;
  }

  .product-hero-title {
    font-size: 2rem;
  }

  .product-hero-tagline {
    font-size: var(--font-size-lg);
  }

  .product-section {
    padding: var(--spacing-xl) 0;
  }

  .product-section-title {
    font-size: var(--font-size-2xl);
  }

  .cta-title,
  .product-cta-title {
    font-size: var(--font-size-2xl);
  }

  .tech-item {
    min-width: 100px;
  }

  .tech-item i {
    font-size: 1.5rem;
  }
}
.product-section .portfolio-grid,
.product-section .related-products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}
