/* Product detail page (design §2 Produktseite + variant-table-card decision).
   Only what site.css lacks — tokens/components come from site.css. */

/* ---------- Top: gallery + info (1.05fr / 1fr) ---------- */
.product-top {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px;
  padding: 24px 0 40px; align-items: start;
}
.product-top--noimg { grid-template-columns: 1fr; max-width: 760px; }
@media (max-width: 1023px) {
  .product-top { grid-template-columns: 1fr; gap: 18px; padding: 12px 0 26px; }
}

.gallery { display: flex; flex-direction: column; gap: 14px; }
.gallery__main {
  padding: 48px; display: flex; align-items: center; justify-content: center;
  min-height: 320px;
}
.gallery__main img { max-height: 340px; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.gallery__thumb {
  background: #fff; border: 2px solid var(--hairline); border-radius: var(--radius-thumb);
  padding: 10px; width: 84px; height: 60px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gallery__thumb img { max-height: 100%; object-fit: contain; }
.gallery__thumb.is-active { border-color: var(--blue); }
@media (max-width: 767px) {
  .gallery__main { padding: 26px; min-height: 170px; }
  .gallery__main img { max-height: 210px; }
}

.product-info { display: flex; flex-direction: column; gap: 16px; }
.product-info .badge { align-self: flex-start; letter-spacing: .04em; }
.product-info h1 { font-size: 30px; margin: 0; text-wrap: pretty; }
.product-artno { font-size: 13px; color: var(--meta-2); font-weight: 600; }
.product-teaser { font-size: 14.5px; line-height: 1.65; margin: 0; }
.product-chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .product-info h1 { font-size: 21px; }
  .product-info { gap: 14px; }
}

/* ---------- Price card ---------- */
.pricecard { padding: 20px 22px; display: flex; align-items: center; gap: 18px; }
.pricecard__price { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--ink); }
.pricecard__meta { font-size: 12px; color: var(--meta-2); }
.pricecard__actions { margin-left: auto; display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 767px) {
  .pricecard { flex-direction: column; align-items: stretch; gap: 12px; }
  /* Mobile mock: primary ("Anfrage stellen") first, buttons stacked full width. */
  .pricecard__actions { margin-left: 0; flex-direction: column-reverse; }
  .pricecard__actions .btn { display: block; width: 100%; }
}

/* ---------- Full-width sections ---------- */
.psec { margin: 6px 0 26px; }
.psec h2 { font-size: 21px; margin: 0 0 14px; }
.pcard { padding: 24px 28px; }
@media (max-width: 767px) { .pcard { padding: 18px; } }

/* ---------- Variant table card (variants + accessories) ---------- */
.vcard { padding: 10px 26px 14px; }
.vhead, .vrow {
  display: grid; grid-template-columns: 56px 110px 1fr 150px auto;
  gap: 16px; align-items: center;
}
.vhead {
  font-family: var(--font-head); font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em; color: var(--meta-2);
  padding: 12px 0 10px; border-bottom: 1px solid var(--hairline);
}
.vhead--r { text-align: right; }
.vrow { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.vcard > .vrow:last-child { border-bottom: 0; }
.vrow__img { width: 56px; height: 44px; padding: 4px; }
.vrow__no { font-family: var(--font-head); font-size: 13.5px; font-weight: 700; color: var(--ink); }
.vrow__title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.vrow__zusatz { font-size: 12.5px; color: var(--meta); margin-top: 2px; }
.vrow__price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.vrow__amount { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--ink); }
.vrow__vat { font-size: 11.5px; color: var(--meta-2); }
.vrow__buy { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 0; }
.vrow__qty {
  width: 64px; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  border: 1.5px solid var(--input-border); border-radius: var(--radius-input);
  padding: 8px 10px; background: #fff;
}
.vrow__qty:focus { outline: none; border-color: var(--blue); }
.vrow__buy .btn { white-space: nowrap; }

.tier-btn {
  background: none; border: 0; padding: 2px 0 0; cursor: pointer;
  font-family: var(--font-head); font-size: 12px; font-weight: 700; color: var(--blue);
}
.tier-btn::after { content: ' \25BE'; }
.tier-btn.is-open::after { content: ' \25B4'; }
.tier-btn:hover { color: var(--blue-dark); }
.tierrow {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  background: var(--well-bg); border-radius: var(--radius-input);
  padding: 12px 16px; margin: 0 0 14px;
}
.tierrow__cell { font-size: 12.5px; white-space: nowrap; }
.tierrow__q { color: var(--meta-2); font-weight: 600; }
.tierrow__p { color: var(--ink); font-weight: 700; }

/* Variant table degrades to stacked rows on mobile. */
@media (max-width: 767px) {
  .vcard { padding: 4px 16px 8px; }
  .vhead { display: none; }
  .vrow {
    grid-template-columns: 56px 1fr;
    grid-template-areas: "img no" "img name" "price price" "buy buy";
    gap: 4px 12px; align-items: start; padding: 14px 0;
  }
  .vrow__img { grid-area: img; }
  .vrow__no { grid-area: no; }
  .vrow__name { grid-area: name; }
  .vrow__price {
    grid-area: price; flex-direction: row; align-items: baseline; gap: 8px;
    text-align: left; margin-top: 6px;
  }
  .vrow__price .tier-btn { margin-left: auto; }
  .vrow__buy { grid-area: buy; justify-content: stretch; }
  .vrow__buy .btn { flex: 1; }
}

/* ---------- Trusted-HTML content (advantages / tech data / delivery) ---------- */
.prose { font-size: 14.5px; line-height: 1.65; color: var(--body); overflow-x: auto; }
.prose p { margin: 0 0 .9em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 22px; }
.prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose td, .prose th {
  padding: 8px 10px; border-bottom: 1px solid var(--hairline);
  text-align: left; vertical-align: top;
}
.prose a { font-weight: 600; }

.filelinks { padding-top: 12px; font-size: 13.5px; }
.filelinks a { font-family: var(--font-head); font-weight: 700; margin-right: 20px; }

/* ---------- Downloads ---------- */
.dl-list { display: flex; flex-direction: column; }
.dl-item {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px;
}
.dl-item:last-child { border-bottom: 0; }
.dl-item a { font-family: var(--font-head); font-weight: 700; }
.dl-item span { color: var(--meta); }

/* ---------- Datenblatt-Link (generated PDF) ---------- */
.datasheet-link {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 14px; padding: 11px 16px;
  border: 1.5px solid var(--input-border); border-radius: 99px;
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px;
  color: var(--ink); background: var(--card-bg);
  transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.datasheet-link:hover { border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow); }
.datasheet-link svg { color: var(--blue); flex-shrink: 0; }
.datasheet-link__meta { font-family: var(--font-body); font-weight: 500; color: var(--meta-2); }
@media (max-width: 767px) {
  .datasheet-link { display: flex; width: 100%; justify-content: center; }
}
