.product-promo {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
  height: 100%;
  padding: 0.28rem;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 8px;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.product-promo--top {
  --product-promo-square-size: 96px;
}

.product-promo__header {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.product-promo--top .product-promo__header {
  display: none;
}

.product-promo__label {
  display: none;
  color: var(--accent, #ea580c);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.product-promo__title {
  color: var(--ink, #12355b);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-promo--rail .product-promo__title {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.product-promo__subtitle {
  display: none;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.18;
}

.product-promo__items {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 0.24rem;
}

.product-promo--rail .product-promo__items {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  flex: 1 1 auto;
  overflow: hidden;
}

.product-promo--rail {
  overflow: hidden;
}

.product-promo--rail .product-promo-card__image-wrap {
  height: 100%;
  min-height: 0;
}

.product-promo--top {
  height: auto;
}

.product-promo--top .product-promo__items {
  grid-template-columns: repeat(var(--product-promo-cells, var(--product-promo-count, 2)), minmax(0, var(--product-promo-square-size)));
  justify-content: center;
}

.product-promo--top .product-promo-card__image-wrap {
  aspect-ratio: 1 / 1;
}

.product-promo__title-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0.28rem;
  border: 1px solid rgba(234, 88, 12, 0.22);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.88);
}

.product-promo__title-mosaic {
  position: absolute;
  inset: 0.24rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.16rem;
  opacity: 1;
}

.product-promo__title-mosaic span {
  min-width: 0;
  min-height: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.9), rgba(234, 88, 12, 0.76));
  background-position: center;
  background-size: cover;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.product-promo__title-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.4));
}

.product-promo__title-text {
  position: relative;
  z-index: 1;
  width: min(88%, 5.25rem);
  padding: 0.16rem 0.2rem;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.product-promo-panel--top-page {
  width: 100%;
  max-width: min(1120px, calc(100vw - 1.1rem));
  margin-inline: auto;
}

.ad-layout {
  display: grid;
  grid-template-areas: "promo main google";
  grid-template-columns: minmax(190px, 220px) minmax(0, var(--ad-layout-main-max, 1180px)) minmax(190px, 220px);
  gap: clamp(0.5rem, 1.4vw, 1rem);
  align-items: stretch;
  justify-content: center;
}

.product-promo-slot {
  grid-area: promo;
}

.ad-layout__main {
  grid-area: main;
  min-width: 0;
}

.ad-layout__google {
  grid-area: google;
}

.ad-layout--promo-external {
  grid-template-areas:
    "main"
    "google";
  grid-template-columns: minmax(0, min(100%, var(--ad-layout-main-max, 1180px)));
}

.ad-layout--promo-external .ad-layout__google {
  width: 100%;
  max-width: min(1120px, calc(100vw - 1.1rem));
  margin-inline: auto;
}

.memories-page:has(.product-promo-panel--top-page) {
  position: relative;
  padding-top: 0.55rem;
}

.product-promo-card {
  min-width: 0;
  min-height: 0;
  display: block;
  position: relative;
  color: inherit;
  text-decoration: none;
}

.product-promo-card__image-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(135deg, #fef3c7, #bae6fd);
  box-shadow: inset 0 0 0 1px rgba(18, 55, 95, 0.12);
}

.product-promo-card__image-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  pointer-events: none;
}

.product-promo-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 42px;
  object-fit: cover;
}

.product-promo-card__meta {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.16rem;
}

.product-promo-card__title {
  min-width: 0;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.72);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.product-promo--rail .product-promo-card__title {
  -webkit-line-clamp: 2;
}

.product-promo-card__store {
  display: none;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  padding: 0.06rem 0.16rem;
  border-radius: 3px;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.72);
}

.product-promo-card__store-logo {
  flex: 0 0 auto;
  width: 0.68rem;
  height: 0.68rem;
  object-fit: contain;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.product-promo-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.12rem;
}

.product-promo-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  min-width: 0;
  min-height: 14px;
  padding: 0.06rem 0.14rem;
  border-radius: 3px;
  color: #fff;
  background: rgba(15, 118, 110, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.44);
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  text-shadow: 0 1px 1px rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(2px);
}

.product-promo-card__button--buy {
  background: rgba(234, 88, 12, 0.34);
}

.product-promo-card__button-logo {
  flex: 0 0 auto;
  width: 0.68rem;
  height: 0.68rem;
  object-fit: contain;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.product-promo-fallback {
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(78px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.product-promo-fallback__image {
  width: 100%;
  height: 100%;
  min-height: 104px;
  object-fit: cover;
  border-radius: 4px;
}

.product-promo-fallback__text {
  color: var(--accent, #ea580c);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.memory-layout--promo-external {
  grid-template-areas:
    "game"
    "google";
}

.memory-layout--promo-external .sponsor-rail {
  width: 100%;
  max-width: min(1120px, calc(100vw - 1.1rem));
  margin-inline: auto;
}

.memory-layout--promo-external .sample-sponsor--tower {
  min-height: 0;
  height: var(--product-promo-height, auto);
  display: grid;
  grid-template-columns: minmax(96px, 0.62fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "chrome headline cta"
    "image copy cta";
  align-items: center;
  gap: 0.32rem 0.55rem;
}

.memory-layout--promo-external .sample-sponsor__chrome {
  grid-area: chrome;
}

.memory-layout--promo-external .sample-sponsor__image {
  grid-area: image;
  min-height: 0;
  height: calc(var(--product-promo-height, 96px) - 2.25rem);
}

.memory-layout--promo-external .sample-sponsor__headline {
  grid-area: headline;
  margin: 0;
}

.memory-layout--promo-external .sample-sponsor__url {
  display: none;
}

.memory-layout--promo-external .sample-sponsor__copy {
  grid-area: copy;
  margin: 0;
}

.memory-layout--promo-external .sample-sponsor__cta {
  grid-area: cta;
  min-width: 6.2rem;
}

.ad-layout--promo-external .ww-google-placeholder {
  min-height: 0;
  height: var(--product-promo-height, auto);
  display: grid;
  grid-template-columns: minmax(96px, 0.62fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "badge title cta"
    "image copy cta";
  align-items: center;
  gap: 0.32rem 0.55rem;
}

.ww-google-placeholder {
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.55rem;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  color: #3c4043;
  overflow: hidden;
}

.ww-google-placeholder__badge {
  grid-area: badge;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid #dadce0;
  border-radius: 2px;
  color: #5f6368;
  background: #fff;
  font: 600 0.58rem Arial, sans-serif;
}

.ww-google-placeholder__image {
  grid-area: image;
  min-height: 120px;
  border-radius: 3px;
  background:
    linear-gradient(145deg, rgba(66, 133, 244, 0.92), rgba(52, 168, 83, 0.78)),
    radial-gradient(circle at 74% 28%, rgba(251, 188, 5, 0.85) 0 18%, transparent 19%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.ww-google-placeholder__title {
  grid-area: title;
  margin: 0;
  color: #1a0dab;
  font: 700 0.94rem/1.15 Arial, sans-serif;
}

.ww-google-placeholder__copy {
  grid-area: copy;
  margin: 0;
  color: #3c4043;
  font: 0.76rem/1.28 Arial, sans-serif;
}

.ww-google-placeholder__cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 6.2rem;
  padding: 0.38rem 0.55rem;
  border-radius: 3px;
  color: #fff;
  background: #1a73e8;
  font: 700 0.72rem Arial, sans-serif;
}

.product-promo-card__button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}

@media (max-width: 960px) {
  .ad-layout {
    grid-template-areas:
      "promo"
      "main"
      "google";
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .ad-layout__main,
  .product-promo-slot,
  .ad-layout__google {
    width: 100%;
    max-width: var(--ad-layout-main-max, 1180px);
    margin-inline: auto;
  }

  .product-promo {
    height: auto;
  }

  .product-promo__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .product-promo__subtitle {
    display: none;
  }

  .product-promo--top .product-promo-card__image-wrap {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 460px) {
  .product-promo {
    padding: 0.24rem;
  }

  .product-promo__title {
    font-size: 0.82rem;
  }

  .product-promo__items {
    gap: 0.38rem;
  }

  .product-promo-card__title {
    font-size: 0.6rem;
  }
}
