/* Product thumbnails only: shop lists and shared SHOP carousels. */
.s-product-card__media,
.s-product-card-pc__media,
.s-product-card-mobile__media {
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  flex-shrink: 0;
}

.s-product-card__image,
.s-product-card-pc__image,
.s-product-card-mobile__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.s-product-card-mobile__image--wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.s-product-card__link--cover,
.s-product-card-pc__link--cover,
.s-product-card-mobile__url--cover {
  z-index: 1;
}

@media (max-width: 1023px) {
  .s-product-card-mobile {
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
    min-width: 0;
  }

  .s-product-card-mobile__media {
    flex: 0 0 clamp(104px, 34%, 180px);
    width: clamp(104px, 34%, 180px);
    margin-bottom: 0;
    border-radius: 8px;
  }

  .s-product-card-mobile__main {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0;
  }

  .s-product-card-mobile__title {
    margin-top: 8px;
    overflow-wrap: anywhere;
  }
}

/* Match product-detail covers to the square cards, excluding book covers. */
.event-product__header,
.toolkit-product__header,
.workshop-product__header {
  display: grid;
  grid-template-columns: minmax(0, 386px) minmax(0, 520px);
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  height: auto;
  padding: 40px 24px;
}

.event-product__header--container,
.toolkit-product__header--container,
.workshop-product__header--container {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.event-product__header--image-box,
.toolkit-product__header--image-box,
.workshop-product__header--image-box {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 386px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
}

.event-product__header--image,
.toolkit-product__header--image,
.workshop-product__header--image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.event-product__header--info,
.toolkit-product__header--info,
.workshop-product__header--info {
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.event-product__header--excerpt,
.toolkit-product__header--excerpt,
.workshop-product__header--excerpt {
  width: 100%;
}

@media (max-width: 1023px) {
  .event-product__header,
  .toolkit-product__header,
  .workshop-product__header {
    grid-template-columns: minmax(0, 520px);
    gap: 24px;
    padding: 24px 20px 32px;
  }
}
