/*
  Product detail — shared by the 10 szerelvenygyartas.html product-card
  subpages (code/szerelvenygyartas/, filenames slugified from their full
  product title, e.g.
  "fojtokupos_szabalyozo_illetve_elzaro_szelepek_200c_ig_020_as_tipus.html")
  and the 6 leser-termekek.html product-card subpages (code/leser-termekek/).
  Each page reuses page-hero.css for its header; this file covers the
  blocks unique to these pages: a spec sheet (label/value pairs, only the
  rows that particular product actually has on the real brunnbauer.hu
  page), an optional .product-detail__family sub-group (a repeated
  heading + spec grid used when one product page covers several distinct
  sub-families, e.g. the LESER rugóterhelésű/vezérelt pages' six/two
  families), and a rehosted-PDF downloads list. The 126/166
  szerelvenygyartas pages and most leser-termekek pages add a
  .product-detail__advantages bullet list; the 016 szerelvenygyartas page
  and two leser-termekek pages (biztonsági szelep átadása, leser
  raktárkészlet) have no .product-detail__downloads block — no PDFs exist
  for those on the old site.
*/

.product-detail {
  background: var(--color-white);
  padding-block: var(--space-9);
}

.product-detail__section + .product-detail__section {
  margin-top: var(--space-8);
}

.product-detail__eyebrow {
  color: var(--color-slate-600);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-detail__title {
  margin-top: var(--space-3);
}

.product-detail__divider {
  width: 56px;
  height: 3px;
  margin-top: var(--space-5);
  background: var(--color-red-600);
  border-radius: 2px;
}

/* ---- Spec sheet + product photo ---- */
.product-detail__specs-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
  align-items: stretch;
}

.product-detail__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  align-content: start;
}

.product-detail__specs-media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 24px 0 24px 0;
  box-shadow: var(--shadow-md);
}

.product-detail__specs-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-spring);
}

.product-detail__specs-media:hover img {
  transform: scale(1.08);
}

.product-detail__spec {
  padding: var(--space-5);
  background: var(--color-surface);
  /* Diagonal pair, same convention as .products__card / .cert-card. */
  border-radius: 24px 0 24px 0;
  box-shadow: var(--shadow-sm);
}

.product-detail__spec-label {
  color: var(--color-slate-600);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-detail__spec-value {
  margin-top: var(--space-2);
  color: var(--color-navy-900);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h4);
  line-height: 1.3;
}

/* ---- Family sub-groups (e.g. the 6 LESER product families) ---- */
.product-detail__family {
  margin-top: var(--space-6);
}

.product-detail__family-title {
  margin-bottom: var(--space-4);
}

.product-detail__note {
  margin-top: var(--space-5);
  color: var(--color-slate-600);
  font-size: var(--fs-small);
  font-style: italic;
}

/* ---- Advantages (126 / 166 only) ---- */
.product-detail__advantages-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.product-detail__advantage {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: #b4c7e7; /* one-off light blue, same literal used across products.css/certifications.css */
  border-radius: 24px 0 24px 0;
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  color: var(--color-navy-900);
}

.product-detail__advantage svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--color-red-600);
}

/* ---- Downloads ---- */
.product-detail__downloads-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.product-detail__download {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  transition: transform var(--duration-base) var(--ease-spring), box-shadow var(--duration-base) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.product-detail__download:hover,
.product-detail__download:focus-within {
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-detail__download:active {
  transform: translateY(0);
}

/* Opens the PDF in a new tab. The separate .product-detail__download-meta
   link below is the only element that actually downloads the file. */
.product-detail__download-open {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: inherit;
  text-decoration: none;
}

.product-detail__download-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--color-navy-900);
  border-radius: var(--radius-sm);
  color: var(--color-white);
}

.product-detail__download-icon svg {
  width: 20px;
  height: 20px;
}

.product-detail__download-label {
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  color: var(--color-navy-900);
}

.product-detail__download-meta {
  align-self: flex-start;
  margin-left: calc(40px + var(--space-4));
  color: var(--color-slate-400);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.product-detail__download-meta:hover,
.product-detail__download-meta:focus-visible {
  color: var(--color-red-600);
  text-decoration: underline;
}

/* ---- Tablet / mobile (<= 768px) ---- */
@media (max-width: 768px) {
  .product-detail {
    padding-block: var(--space-8);
  }

  .product-detail__specs-layout {
    grid-template-columns: 1fr;
  }

  .product-detail__specs-media {
    order: -1;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .product-detail__advantages-list,
  .product-detail__downloads-list {
    grid-template-columns: 1fr;
  }
}

/* ---- Mobile (<= 560px) ---- */
@media (max-width: 560px) {
  .product-detail__specs {
    grid-template-columns: 1fr;
  }
}
