/* =========================
   PRODUCT DETAIL PAGE
========================= */

/* BREADCRUMB (gutter set in the nav's own font size so it lines up with the page) */
.breadcrumb {
  margin: 1em var(--padding-right-for-menu-items) 0;
}

.breadcrumb ol {
  font-size: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.breadcrumb li::after {
  content: "»";
  margin: 0 0.5em;
  color: #777;
}

.breadcrumb li:last-child::after {
  content: "";
}

.breadcrumb a {
  text-decoration: none;
  color: var(--accent);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* PRODUCT SHOWCASE: photo left (stays in view while reading), details right */
.product-showcase {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 2.5em;
  align-items: start;
  padding: 1.5em var(--padding-right-for-menu-items) 2.5em;
}

.product-images {
  position: sticky;
  top: 100px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f4f5f7;
  border: 1px solid #e6e8ec;
  border-radius: 8px;
}

.product-images .main-image {
  width: 100%;
  height: 100%;
  padding: 1em;
  box-sizing: border-box;
  object-fit: contain; /* keeps proportions, no cropping */
  mix-blend-mode: multiply; /* white photo backgrounds melt into the frame */
}

.product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

.product-info h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.product-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  width: auto;       
  max-width: max-content;
  white-space: nowrap;
}

/* PRODUCT DESCRIPTION */
.product-description-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5em;
}

.product-description-box h2 {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8em;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.4em;
}

/* CTA BUTTONS */
.product-cta {
  display: flex;
  gap: 1em;
}

.btn {
  padding: 0.8em 1.2em;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

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

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #eee;
  color: #333;
}

.btn.secondary:hover {
  background: #ddd;
}

/* TEMP: placeholder brochure link points at a file that does not exist yet.
   Delete this rule once real PDFs are in assets/brochures/. */
.product-cta a[href*="sample-brochure"] {
  display: none;
}

/* PRODUCT HIGHLIGHTS */
.product-highlights {
  background: #f4f5f7;
  color: #222;
  padding: 2em var(--padding-right-for-menu-items);
}

.product-highlights h2 {
  font-size: 1.3rem;
  margin: 0 0 1em;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1em;
}

.highlight-card {
  background: #fff;
  color: #333;
  padding: 1em 1.1em;
  border: 1px solid #e6e8ec;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* KEY SPECIFICATIONS */
.key-specs {
  padding: 2em var(--padding-right-for-menu-items);
  background: #fff;
}

.key-specs h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5em;
}

.spec-group {
  margin-bottom: 1em;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.spec-toggle {
  width: 100%;
  text-align: left;
  padding: 1em;
  background: #f0f0f0;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}

.spec-toggle .arrow {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.spec-toggle.active .arrow {
  transform: rotate(180deg);
}

.spec-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.spec-toggle.active {
  background: var(--accent);
  color: #fff;
}

.spec-body {
  display: none;
  padding: 1em;
  overflow-x: auto;
}

.spec-body.show {
  display: block;
}

.spec-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.spec-body th,
.spec-body td {
  border: 1px solid #ddd;
  padding: 0.6em;
  text-align: left;
}

.spec-body tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.spec-body th {
  background: #e6f0f5;
  font-weight: 600;
}

/* ENQUIRY FORM */
.enquiry-form {
  padding: 2em var(--padding-right-for-menu-items);
  background: #f8f8f8;
}

.enquiry-form h2 {
  font-size: 1.3rem;
  margin-bottom: 1em;
}

.enquiry-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
}

.enquiry-text {
  flex: 1;
  min-width: 250px;
}

.form {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.form-row {
  display: flex;
  gap: 1em;
}

.form-row input,
.form-row select {
  flex: 1;
  padding: 0.8em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

textarea {
  width: 100%;
  padding: 1em;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 120px;
}

button.btn {
  align-self: flex-start;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .breadcrumb {
    margin: 0.8em 1em 0;
  }

  .product-showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2em;
    padding: 0.8em 1em 1.5em;
  }

  .product-images {
    position: static;
    aspect-ratio: 4 / 3; /* shorter photo so the title and CTA show without scrolling */
  }

  .product-info {
    gap: 1em;
  }

  .product-info h1 {
    font-size: 1.5rem;
  }

  .product-description-box {
    padding: 1em;
  }

  /* Enquire button stays reachable while reading the description */
  .product-cta {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.7em 0;
    background: #fff;
    box-shadow: 0 -8px 8px -8px rgba(0, 0, 0, 0.15);
  }

  .product-cta .btn {
    flex: 1;
    text-align: center;
  }

  .product-highlights,
  .key-specs,
  .enquiry-form {
    padding: 1.5em 1em;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 0.6em;
  }

  .highlight-card {
    padding: 0.8em 1em;
  }

  .spec-body {
    padding: 0.5em;
  }

  .spec-body th,
  .spec-body td {
    padding: 0.5em;
  }

  .enquiry-container {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
  }
}
