/* ====== Queen Cosmetics — Retailers page ======
   Full-width hero banner followed by a centered, vertically-stacked list of
   stockists (logo image + underlined link), matching the live retailers page. */

.retailers {
  background-color: rgb(var(--color-background));
  color: rgb(var(--color-text));
}

/* Hero banner. Width, height/crop, alignment and background are all driven by
   section settings via the inline custom properties (--hero-*). */
.retailers__hero {
  width: 100%;
  overflow: hidden;
  background-color: var(--hero-bg, transparent);
}

/* Page-width mode — constrain to the content column with side margins */
.retailers__hero--page {
  max-width: var(--page-width, 1480px);
  margin-inline: auto;
  padding-inline: 30px;
}
@media (max-width: 959px) {
  .retailers__hero--page {
    padding-inline: 16px;
  }
}

.retailers__hero-image,
.retailers__hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Original height — image shows in full, no cropping */
.retailers__hero--auto .retailers__hero-image,
.retailers__hero--auto img {
  height: auto;
}

/* Fixed height — crop the image to the chosen height, keeping the chosen edge
   visible (e.g. bottom-aligned crops the top off).

   The height is RESPONSIVE: the merchant's px value is the height at the
   reference width (1440px). Below that it holds steady; above it, the height
   scales up proportionally with the viewport (100vw / 1440) so the banner keeps
   the same visual proportion and crop ratio on very large screens instead of
   looking like a thin, over-cropped strip. */
.retailers__hero--fixed .retailers__hero-image,
.retailers__hero--fixed img {
  height: max(
    var(--hero-height, 420px),
    var(--hero-height, 420px) * (100vw / 1440px)
  );
  object-fit: cover;
  object-position: center var(--hero-position, center);
}
@media (max-width: 959px) {
  .retailers__hero--fixed .retailers__hero-image,
  .retailers__hero--fixed img {
    /* On mobile the viewport is always narrower than the reference, so the
       max() floor keeps the set mobile height without runaway scaling. */
    height: max(
      var(--hero-height-mobile, 280px),
      var(--hero-height-mobile, 280px) * (100vw / 1440px)
    );
  }
}

/* Optional heading / intro above the retailer list */
.retailers__title {
  margin-block: 0 24px;
  text-align: center;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.3;
}
.retailers__intro {
  max-width: 720px;
  margin-inline: auto;
  margin-block-end: 48px;
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
}

/* Retailer list — single centered column */
.retailers__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

@media (max-width: 959px) {
  .retailers__list {
    gap: 44px;
  }
}

.retailers__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

/* Logo */
.retailers__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.retailers__logo-link {
  display: block;
  width: 100%;
}
.retailers__logo-image,
.retailers__logo img {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
.retailers__logo--placeholder svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  opacity: 0.35;
}

/* Underlined website link below the logo */
.retailers .retailers__url {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--color-text));
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: opacity 200ms ease;
}
.retailers .retailers__url:hover {
  opacity: 0.65;
  text-decoration: underline;
}

@media (max-width: 959px) {
  .retailers__url {
    font-size: 15px;
  }
}
