/* Layout block aawp_product_box: large (.prod) and compact (.prodc).
   Source: docs/design/referenz/04-bausteine.html, 02-artikel.html. Badge colours from tokens.css. */

/* Large */
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
/* Jump target produkt-{slug} (overview „In diesem Artikel“, links in the text): clear of the sticky header. */
.prod[id], .prodc[id] { scroll-margin-top: 80px; }
.prod-tag { background: var(--badge-top); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; display: flex; justify-content: space-between; gap: 12px; }
.prod-tag span { font-weight: 600; letter-spacing: 0; text-transform: none; }
.prod-tag.pl { background: var(--badge-pl); color: var(--badge-pl-ink); }
.prod-tag.ag { background: var(--badge-ag); color: var(--badge-ag-ink); }
.prod-tag.up { background: var(--badge-up); color: var(--badge-up-ink); }
.prod-img { aspect-ratio: 4 / 3; background: var(--sunk); max-width: 100%; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 16px; display: grid; gap: 12px; }
.prod-body > .pill { justify-self: start; }
.prod h3 { font-size: 20px; font-weight: 800; }
.prod-body > p { font-size: 15px; color: var(--ink-2); }
.specs { display: grid; margin: 0; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.specs dd { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }

/* Shared: buy row, price, „Auch bei“ */
.buy { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.price { font-family: var(--f-display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { display: block; white-space: normal; font-family: var(--f-body); font-weight: 400; font-size: 11px; color: var(--ink-3); }
.price-ext { font-size: 15px !important; white-space: normal; }
.also { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.also a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.also a:hover { text-decoration-color: var(--ink); }

/* Compact */
.prodc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.prodc.no-img { grid-template-columns: minmax(0, 1fr); }
.prodc-img { grid-row: span 2; width: 72px; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--sunk); }
.prodc-img img { width: 100%; height: 100%; object-fit: cover; }
.prodc h3 { align-self: start; font-size: 17px; font-weight: 800; margin-top: 4px; }
.prodc .when { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.prodc .when b { font-weight: 600; color: var(--ink); }
/* Large box with a „Statt der …, wenn“ line (Bestenliste Preistipp/Upgrade, referenz/20). */
.prod .when { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.prod .when b { font-weight: 600; color: var(--ink); }
.prodc .buy { grid-column: 1 / -1; margin-top: 8px; padding-top: 10px; }
.prodc .price { font-size: 18px; }
.prodc .btn { font-size: 13px; padding: 9px 12px; }

@container page (min-width: 900px) {
  .prod { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .prod-tag { grid-column: 1 / -1; }
  .prod-img { aspect-ratio: auto; height: 100%; }
  .prod-body { padding: 20px 24px; }

  .prodc { grid-template-columns: 140px minmax(0, 1fr) auto; padding: 16px; gap: 4px 20px; align-items: center; }
  .prodc.no-img { grid-template-columns: minmax(0, 1fr) auto; }
  .prodc-img { width: 140px; grid-row: span 3; }
  .prodc .when { grid-column: 2; margin-top: 0; }
  .prodc.no-img .when { grid-column: 1; }
  .prodc .buy { grid-column: 3; grid-row: 1 / span 3; border-top: 0; margin: 0; padding: 0 0 0 20px; border-left: 1px solid var(--line); flex-direction: column; align-items: flex-end; align-self: stretch; justify-content: center; }
  .prodc.no-img .buy { grid-column: 2; }
  .prodc .price { text-align: right; }
}
