/* ===================================
   SPARES.CSS
   Shared styles for spare parts pages
   (Hob Burners, Thermocouples, etc.)
   =================================== */

/* ── Spares Introduction Block ── */
.spares-intro {
  position: relative;
  z-index: 2;
  background: #ffffff;               /* Solid white */
  isolation: isolate;                /* Prevents wave bleeding through */
  max-width: 900px;
  margin: 3rem auto 4rem;            /* Added 3rem top margin */
  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);
}

.spares-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;
}

.spares-intro p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--deep-blue);
  margin-bottom: 1.5rem;
}

.spares-intro p:last-child {
  margin-bottom: 0;
}

/* Image gallery in intro */
.intro-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.intro-image-box {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.intro-image-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .intro-images {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ── Spares Wrapper ── */
.spares-wrapper {
  position: relative;
  z-index: 2;
  isolation: isolate;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem 6rem;
  will-change: transform;
  transform: translateZ(0);
}

/* ── Product Category Sections ── */
.product-category {
  margin-bottom: 4rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.category-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--midnight);
  margin: 0;
  flex: 1;
}

/* Buy Spares Button in Header */
.buy-spares-link {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: var(--teal);
  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;
  white-space: nowrap;
}

.buy-spares-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 139, 158, 0.3);
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* Fixed 3 columns */
  gap: 2rem;
}

/* ── Product Cards ── */
.product-card {
  background: #ffffff;               /* Solid white - NOT transparent */
  isolation: isolate;                /* Prevents wave bleeding */
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(21, 97, 109, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

/* Opaque backdrop */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: -1;
  border-radius: 16px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(21, 97, 109, 0.2);
}

/* Discontinued Badge */
.product-card.discontinued {
  opacity: 0.7;
}

.product-card.discontinued::after {
  content: 'DISCONTINUED';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #d32f2f;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  z-index: 10;
}

/* ── Product Image ── */
.product-image {
  width: 100%;
  height: 200px;
  background: #f5f5f5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 10px;
}

/* ── Product Details ── */
.product-code {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--teal);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.product-name {
  font-size: 0.95rem;
  color: var(--deep-blue);
  line-height: 1.5;
  margin-bottom: 0;
  flex-grow: 1;
}

/* ── Responsive ── */
@media (max-width: 968px) {

  .spares-wrapper {
    padding: 0 2rem 4rem;
  }

  .spares-intro {
    padding: 2rem;
    margin: 2rem auto 3rem;
  }

  .spares-intro p {
    font-size: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;      /* Single column on mobile */
    gap: 1.5rem;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-header h2 {
    font-size: 1.5rem;
  }

  .buy-spares-link {
    width: 100%;
    text-align: center;
  }

}