/**
 * Produktkort (design/sections/produktkort.section.json).
 *
 * The affiliate product card: image, price, specs, one honest skip-row and a
 * price-in-button CTA. Replaces the generic pricing tiers wherever a card
 * links to a partner — the pricing section stays for actual pricing tables.
 *
 * CRO intent: the whole card reads in under two seconds (image → name →
 * price → button), the discreet "Annonslänk" mark sits in the corner where
 * the law wants it and the eye doesn't, and rel="sponsored noopener" is
 * baked into the template so every partner link is compliant by construction.
 */

.dw-band--produktkort .zp-pk__head {
  max-width: 44rem;
}

.zp-pk__heading {
  font-family: var(--dw-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0.35rem 0 0.6rem;
}

.zp-pk__lede {
  color: var(--dw-dis);
  margin: 0 0 1.6rem;
  max-width: 38rem;
}

.zp-pk__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.zp-pk__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--dw-line, rgba(255, 255, 255, 0.12));
  border-radius: var(--dw-r-lg);
  background: var(--dw-panel, rgba(255, 255, 255, 0.04));
}

.zp-pk__card:has(.zp-pk__flag) {
  border-color: var(--dw-ember, var(--wp--preset--color--accent));
}

/* Legal mark: present, legible, out of the eye-line. */
.zp-pk__mark {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dw-dis);
  opacity: 0.75;
}

.zp-pk__flag {
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  font-family: var(--dw-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--dw-ember, var(--wp--preset--color--accent));
  color: var(--dw-deep);
}

.zp-pk__imgwrap {
  display: block;
  border-radius: var(--dw-r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.06);
}

.zp-pk__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zp-pk__name {
  font-family: var(--dw-display);
  font-size: 1.12rem;
  margin: 0.2rem 0 0;
}

.zp-pk__price {
  font-family: var(--dw-display);
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.zp-pk__period {
  font-family: var(--dw-body);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--dw-dis);
}

.zp-pk__specs {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--dw-dis);
  margin: 0;
}

/* The honest row: who should NOT click. Trust is a conversion asset. */
.zp-pk__skip {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--dw-dis);
  opacity: 0.85;
  margin: 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--dw-line, rgba(255, 255, 255, 0.12));
}

.zp-pk__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-family: var(--dw-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: inherit;
  transition: transform 180ms var(--dw-ease), box-shadow 200ms var(--dw-ease);
}

.zp-pk__card:has(.zp-pk__flag) .zp-pk__cta {
  background: var(--dw-ember, var(--wp--preset--color--accent));
  border-color: transparent;
  color: var(--dw-deep);
}

.zp-pk__cta:hover {
  transform: translateY(-1px);
}

.zp-pk__cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.zp-pk__note {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--dw-dis);
}

@media (max-width: 46rem) {
  .zp-pk__grid {
    grid-template-columns: 1fr;
  }
}

/* A lone card must not stretch across the whole band. */
.zp-pk__card:only-child {
  max-width: 26rem;
}
