/* ========================================
   Products Page Styles
   Inspired by the driver-section aesthetic
   Using Amodo design system
   ======================================== */

/* ---- Product Cards Grid ---- */

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.20);
  background-image: url(../media/images/bodybg.jpg);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  border-color: rgba(121, 188, 186, 0.45);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.10);
  color: inherit;
  text-decoration: none;
}

.product-card-inner {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-card-inner {
    flex-direction: row;
    align-items: stretch;
  }
}

/* Card Image */
.product-card-image {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}

@media (min-width: 768px) {
  .product-card-image {
    width: 45%;
  }
}

@media (min-width: 1200px) {
  .product-card-image {
    width: 40%;
  }
}

.product-card-imgbox {
  height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(62, 78, 77, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .product-card-imgbox {
    height: 100%;
    min-height: 360px;
    padding: 2.5rem;
    border-bottom: none;
  }
}

.product-card-imgbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-number {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0, 0, 0, 0.20);
  border-radius: 50%;
  font-size: 0.75rem;
  color: var(--firstColor);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url(../media/images/bodybg.jpg);
  z-index: 2;
}

/* Card Content */
.product-card-content {
  flex: 1;
  padding: 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-card-content {
    padding: 2.5rem 3rem;
    border-left: 1px solid rgba(0, 0, 0, 0.10);
  }
}

.product-card-category {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondColor);
  margin-bottom: 0.75rem;
}

.product-card-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  color: var(--dark);
}

.product-card-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--para);
  margin-bottom: 1.5rem;
  max-width: 520px;
}

/* Highlights row inside card */
.product-card-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .product-card-highlights {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.highlight-label {
  font-size: 0.6875rem;
  color: var(--para);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.highlight-value {
  font-size: 0.9375rem;
  color: var(--dark);
  font-weight: 500;
}

/* Learn more link */
.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  color: var(--secondColor);
  margin-top: auto;
  transition: gap 0.3s ease;
}

.product-card:hover .product-card-link {
  gap: 0.875rem;
  color: var(--firstColor);
}

.product-card:hover .product-card-link svg path {
  stroke: var(--firstColor);
}

/* Smooth scroll */
.products-page {
  scroll-behavior: smooth;
}

/* =======================================
   Product Detail Page Styles
   ======================================= */

/* Detail Hero */
.pd-hero {
  padding-bottom: 2rem;
}

.pd-hero-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 768px) {
  .pd-hero-layout {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }
}

.pd-hero-content {
  flex: 1;
}

.pd-hero-category {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondColor);
  margin-bottom: 0.75rem;
}

.pd-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--dark);
}

.pd-hero-tagline {
  font-size: 1.125rem;
  font-family: 'IBM Plex Serif', serif;
  color: var(--firstColor);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.pd-hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--para);
  margin-bottom: 2rem;
  max-width: 480px;
}

.pd-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pd-hero-image {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .pd-hero-image {
    width: 45%;
  }
}

.pd-hero-imgbox {
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 2rem;
  background: rgba(62, 78, 77, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-hero-imgbox img {
  max-height: 380px;
  object-fit: contain;
}

/* Product buttons (reused from product.css pattern) */
.product-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.product-btn-primary {
  background: var(--dark);
  color: #fff;
}

.product-btn-primary:hover {
  background: var(--secondColor);
  color: #fff;
}

.product-btn-primary svg path {
  stroke: #fff;
}

.product-btn-secondary {
  background: transparent;
  color: var(--dark);
  border: 1px solid rgba(62, 78, 77, 0.2);
}

.product-btn-secondary:hover {
  border-color: var(--secondColor);
  color: var(--secondColor);
}

/* Key Highlights bar */
.pd-highlights {
  padding: 2rem 0;
}

.pd-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.20);
  background-image: url(../media/images/bodybg.jpg);
  overflow: hidden;
}

@media (min-width: 768px) {
  .pd-highlights-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pd-highlight-item {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.pd-highlight-item:nth-child(2n) {
  border-right: none;
}

@media (min-width: 768px) {
  .pd-highlight-item:nth-child(2n) {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }
  .pd-highlight-item:last-child {
    border-right: none;
  }
  .pd-highlight-item {
    border-bottom: none;
  }
}

.pd-highlight-label {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--para);
  margin-bottom: 0.375rem;
}

.pd-highlight-value {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: -0.01em;
}

/* ---- Featured Specs Grid ---- */

.pd-featured-specs-layout {
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-image: url(../media/images/bodybg.jpg);
  background-size: auto;
  background-repeat: repeat;
  padding: 2rem;
  overflow: hidden;
}

@media (min-width: 992px) {
  .pd-featured-specs-layout {
    padding: 2.5rem;
  }
}

.pd-featured-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .pd-featured-specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .pd-featured-specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pd-fspec-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  padding: 1.5rem 1.25rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pd-fspec-card:hover {
  border-color: rgba(121, 188, 186, 0.45);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.06);
}

.pd-fspec-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pd-fspec-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--firstColor);
  background: rgba(255, 255, 255, 0.8);
}

.pd-fspec-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pd-fspec-desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--para);
  margin: 0;
}

/* Features */
.pd-features-header {
  margin-bottom: 3rem;
}

.pd-features-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--dark);
}

.pd-feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .pd-feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.pd-feature-row:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .pd-feature-row-reverse .pd-feature-text {
    order: 2;
  }
  .pd-feature-row-reverse .pd-feature-image {
    order: 1;
  }
}

.pd-feature-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--firstColor);
  margin-bottom: 0.75rem;
}

.pd-feature-text h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  color: var(--dark);
}

.pd-feature-text p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--para);
}

.pd-feature-imgbox {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(62, 78, 77, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pd-feature-imgbox img {
}

/* Specs */
.pd-specs-header {
  margin-bottom: 2.5rem;
}

.pd-specs-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--dark);
}

.pd-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .pd-specs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .pd-specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pd-spec-group {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-top: 2px solid var(--secondColor);
}

@media (min-width: 768px) {
  .pd-spec-group {
    padding: 1.5rem;
  }
}

.pd-spec-group-title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondColor);
  margin-bottom: 1.5rem;
}

.pd-spec-list {
  margin: 0;
  padding: 0;
}

.pd-spec-row {
  display: flex;
  flex-direction: column;
  padding: 0.625rem 0;
  border-bottom: 1px solid rgba(62, 78, 77, 0.1);
}

.pd-spec-row:last-child {
  border-bottom: none;
}

.pd-spec-row dt {
  font-size: 0.8125rem;
  color: var(--para);
  font-weight: 400;
  margin-bottom: 0.125rem;
}

.pd-spec-row dd {
  font-size: 1rem;
  color: var(--dark);
  margin: 0;
  font-weight: 500;
}

/* Product navigation */
.pd-nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .pd-nav-grid {
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
  }
}

.pd-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pd-nav-item:hover {
  border-color: rgba(121, 188, 186, 0.4);
  background: rgba(252, 249, 237, 0.5);
  text-decoration: none;
}

.pd-nav-label {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--para);
}

.pd-nav-name {
  font-size: 1rem;
  color: var(--dark);
  font-weight: 500;
}

.pd-nav-prev {
  text-align: left;
}

.pd-nav-all {
  text-align: center;
  align-items: center;
  justify-content: center;
}

.pd-nav-next {
  text-align: right;
}

@media (min-width: 768px) {
  .pd-nav-all {
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 1.5rem 2.5rem;
  }
}

/* ---- Video Section ---- */

.product-detail-page .pd-video.section-gap {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

@media (min-width: 768px) {
  .product-detail-page .pd-video.section-gap {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

@media (min-width: 992px) {
  .product-detail-page .pd-video.section-gap {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

.pd-video-wrapper {
  max-width: 860px;
  margin: 0 auto;
}

.pd-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #000;
}

.pd-video-container iframe,
.pd-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* First video embed (uses wrapper directly) */
.pd-video-wrapper iframe,
.pd-video-wrapper video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: none;
  background: #1a1a1a;
  display: block;
}

.pd-video-caption {
  text-align: center;
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.75rem;
}

/* ---- Get It Section ---- */

.pd-getit-header {
  margin-bottom: 2.5rem;
}

.pd-getit-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--dark);
}

.pd-getit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .pd-getit-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.pd-getit-card {
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background-image: url(../media/images/bodybg.jpg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pd-getit-card:hover {
  border-color: rgba(121, 188, 186, 0.4);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.08);
}

.pd-getit-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--firstColor);
  margin-bottom: 1.5rem;
}

.pd-getit-label {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.pd-getit-desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--para);
  margin-bottom: 2rem;
  flex: 1;
}

.pd-getit-btn {
  align-self: flex-start;
}

/* Smooth scroll for detail page */
.product-detail-page {
  scroll-behavior: smooth;
}

/* Entrance animations */
@media (prefers-reduced-motion: no-preference) {
  .pd-hero-content {
    animation: pdFadeInUp 0.7s ease forwards;
  }

  .pd-hero-image {
    opacity: 0;
    animation: pdFadeInUp 0.7s ease 0.2s forwards;
  }

  .product-card {
    opacity: 0;
    animation: pdFadeInUp 0.6s ease forwards;
  }

  .product-card[data-index="0"] { animation-delay: 0.1s; }
  .product-card[data-index="1"] { animation-delay: 0.25s; }
  .product-card[data-index="2"] { animation-delay: 0.4s; }
}

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