/* ===================================
   RANGE.CSS
   Shared styles for range overview pages
   (4500 Range, 5000 Range, etc.)
   =================================== */

/* ── Range Introduction Block ── */
.range-intro {
  position: relative;
  z-index: 2;
  background: #ffffff;               /* Solid white */
  isolation: isolate;                /* Prevents wave bleeding through */
  max-width: 900px;
  margin: 3rem auto 4rem;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(21, 97, 109, 0.15),
    0 0 0 1px rgba(21, 97, 109, 0.08);
  text-align: center;
}

.range-intro::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 5px;
  background: linear-gradient(180deg, var(--teal), var(--aqua));
  border-radius: 0 5px 5px 0;
}

.range-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--deep-blue);
  margin-bottom: 1rem;
}

.range-intro p:last-child {
  margin-bottom: 0;
}

/* ── Products Wrapper ── */
.products-wrapper {
  position: relative;
  z-index: 2;
  isolation: isolate;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem 6rem;
  will-change: transform;             /* Force GPU layer */
  transform: translateZ(0);           /* Force hardware acceleration */
}

/* ── Products Grid ── */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Product Cards ── */
.product-card-link {
  text-decoration: none;
  display: block;
}

/* Target every second LINK for alternating */
.product-card-link:nth-child(odd) .product-card {
  grid-template-columns: 350px 1fr;  /* Image LEFT, content RIGHT */
}

.product-card-link:nth-child(even) .product-card {
  grid-template-columns: 1fr 350px;  /* Content LEFT, image RIGHT */
}

.product-card {
  background: #ffffff;               /* Solid white - NOT transparent */
  isolation: isolate;                /* Critical fix for transparency */
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(21, 97, 109, 0.1);
  transition: all 0.3s ease;
  display: grid;
  cursor: pointer;
  position: relative;
  min-height: 280px;
}

/* Opaque backdrop to completely block wave background */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
  border-radius: 24px;
}

.product-card-link:hover .product-card {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(21, 97, 109, 0.2);
}

/* ── Product Image Container ── */
.product-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: #ffffff;               /* Solid white */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Odd cards: image on left */
.product-card-link:nth-child(odd) .product-image {
  order: 1;
}

/* Even cards: image on right */
.product-card-link:nth-child(even) .product-image {
  order: 2;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 40px;                     /* Consistent spacing - controls zoom */
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.3s ease;
}

.product-card-link:hover .product-image img {
  transform: scale(1.05);
}

/* Emoji fallback */
.product-image-emoji {
  font-size: 4rem;
  transition: transform 0.3s ease;
}

.product-card-link:hover .product-image-emoji {
  transform: scale(1.1);
}

/* ── Product Card Content ── */
.product-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;               /* Solid white - NOT transparent */
  position: relative;
  z-index: 1;
}

/* Odd cards: content on right */
.product-card-link:nth-child(odd) .product-content {
  order: 2;
}

/* Even cards: content on left */
.product-card-link:nth-child(even) .product-content {
  order: 1;
}

/* Belt and braces - force opaque white background */
.product-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
}

.product-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--midnight);
  margin-bottom: 1rem;
  text-align: center;
}

.product-description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--deep-blue);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  text-align: justify;
}

.view-btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-align: center;
}

.product-card-link:hover .view-btn {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 139, 158, 0.3);
}

/* ── Responsive ── */
@media (max-width: 968px) {

  .products-wrapper {
    padding: 0 2rem 4rem;
  }

  .range-intro {
    padding: 2rem;
    margin: 0 auto 2rem;
  }

  .products-grid {
    gap: 2rem;
  }

  /* Stack vertically on mobile */
  .product-card {
    grid-template-columns: 1fr !important;
    min-height: auto;
  }

  .product-image {
    height: 220px;
    min-height: 220px;
    order: 1 !important;  /* Always image on top for mobile */
  }

  .product-content {
    padding: 2rem;
    order: 2 !important;  /* Always content below for mobile */
  }

  .product-image-emoji {
    font-size: 3rem;
  }

  .product-name {
    font-size: 1.5rem;
  }

}