/* Redesign finish polish — home badge, chips, PDP sticky gallery, guides */

/* Home Klar badge: same pill as shop/PDP (was flowing as a vertical strip) */
.home-product-thumb .klar-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  max-width: calc(100% - 1.1rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Card chips: max 2, wrap if needed, never clip mid-label */
.home-product-chips,
.product-card-chips,
.shop-layout .product-card-chips {
  display: flex;
  flex-wrap: wrap !important;
  gap: 0.4rem;
  overflow: visible;
  align-items: center;
}

.home-product-chips .chip,
.product-card-chips .chip,
.product-card-chips .pill,
.shop-layout .product-card-chips .chip,
.shop-layout .product-card-chips .pill {
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  flex: 0 1 auto;
}

/* Category chip removed from cards — keep hidden even if .pill sets display */
.product-card-chips .product-card-cat,
.product-card-chips [data-cat-pill] {
  display: none !important;
}

/* Home product rows: fixed column counts matching JS slice limits */
.home-product-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 700px) {
  .home-product-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .home-product-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Godt at vide: 4 equal columns, full width */
.home-guides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

@media (min-width: 900px) {
  .home-guides-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* PDP: sticky media column — sticky fails if ancestors use overflow:hidden */
body {
  overflow-x: clip;
}

@media (min-width: 1024px) {
  .pdp {
    align-items: start;
    overflow: visible;
  }

  .pdp-media {
    align-self: start;
    position: sticky;
    top: calc(var(--header-offset, 72px) + 16px);
    overflow: visible;
  }

  /* Gallery crop stays on the inner box — not on the sticky cell */
  .pdp-gallery {
    position: relative;
  }
}

/* Hvorfor Tradevo: ✓ in col 1, text + Læs mere stacked in col 2 */
.why-tradevo-list.list li,
.why-tradevo .why-tradevo-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 10px;
  align-items: start;
}

.why-tradevo-list li::before {
  grid-column: 1;
  grid-row: 1;
}

.why-tradevo-list .why-body {
  grid-column: 2;
  min-width: 0;
}

.why-tradevo .why-more {
  display: block;
  margin-top: 2px;
  font-weight: 700;
  font-size: inherit;
  width: auto;
}

.why-tradevo .why-more a,
.why-tradevo-list a {
  display: inline;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

/* Mobile: no horizontal overflow on home / shop shells */
@media (max-width: 480px) {
  .home-exchange-banner {
    gap: 0.75rem;
  }

  .home-exchange-badge {
    flex-shrink: 0;
  }

  .home-bento,
  .home-product-row,
  .shop-layout .product-grid {
    min-width: 0;
  }
}
