/* Shop landing pages (/shops/<name>). Figma sets this template in Inter;
   it uses the site's sans-serif (see TODO.md, fonts). Desktop sizes follow
   the 1512px frame. */

.shop-eyebrow {
  margin: 0;
  padding-bottom: 8px;
  color: var(--color-mauve);
  line-height: 20px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  /* 60px rule underneath */
  background: linear-gradient(var(--color-mauve), var(--color-mauve)) left bottom / 60px 1px no-repeat;
}

.shop-title {
  margin: 0;
  font-weight: 400;
  color: var(--color-mauve);
}

.shop-body {
  margin: 0;
  color: #6b7280;
  letter-spacing: 0.05em;
}

.shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 4px;
  background: var(--color-mauve);
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.shop-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.shop-button:focus-visible {
  outline-color: var(--color-mauve);
}

.shop-hero__photo,
.shop-founder__photo {
  width: 100%;
  object-fit: cover;
}

.shop-founder__photo--pending {
  background: #e2dcd3;
}

.shop-hero__text,
.shop-founder__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ---------- Details card ---------- */

.shop-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: var(--color-pink);
  color: var(--color-mauve);
}

.shop-card__title {
  margin: 0;
  font-weight: 400;
}

.shop-card__info {
  margin: 0;
}

.shop-card__info dt {
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 16px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.shop-card__info dd {
  margin: 12px 0 0;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 28px;
  letter-spacing: 0;
  /* Long email addresses wrap instead of overflowing on small phones */
  overflow-wrap: anywhere;
}

.shop-card__info a {
  text-decoration: none;
}

.shop-card__info a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-card__actions {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(88, 68, 70, 0.22);
}

.shop-card__social {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.shop-card__social ul {
  display: flex;
  gap: 12px;
}

.shop-card__social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(88, 68, 70, 0.4);
  border-radius: 50%;
}

.shop-card__social a:hover {
  border-color: var(--color-mauve);
}

.shop-button--website {
  min-height: 56px;
  padding: 16px 32px;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* ---------- Large screens ---------- */

@media (min-width: 900px) {
  .shop-hero,
  .shop-founder {
    display: flex;
    align-items: center;
    gap: calc(80 * var(--u, 1px));
  }

  .shop-hero {
    padding: 80px calc(135 * var(--u, 1px));
  }

  .shop-hero__text {
    flex: 1;
    gap: 32px;
  }

  .shop-hero__photo {
    flex: none;
    width: calc(580 * var(--u, 1px));
    height: calc(700 * var(--u, 1px));
  }

  .shop-founder {
    padding: 80px calc(240 * var(--u, 1px));
    background: #f6f4f1;
  }

  .shop-founder__photo {
    flex: none;
    width: calc(394 * var(--u, 1px));
    height: calc(700 * var(--u, 1px));
  }

  .shop-founder__text {
    flex: 0 1 584px;
    gap: 32px;
  }

  .shop-title {
    font-size: max(2.5rem, calc(64 * var(--u, 1px)));
    line-height: 1.16;
    letter-spacing: 0.02em;
  }

  .shop-body {
    font-size: 1.125rem;
    line-height: 32px;
  }

  .shop-details {
    padding: 120px calc(135 * var(--u, 1px));
  }

  .shop-card {
    gap: 40px;
    padding: 48px;
  }

  .shop-card__title {
    font-size: 2.25rem;
    line-height: 44px;
    letter-spacing: -0.03em;
  }

  .shop-card__info {
    display: grid;
    grid-template-columns: 350fr 300fr 385fr;
    gap: 48px;
  }

  .shop-card__actions {
    justify-content: space-between;
    gap: 24px;
    padding-top: 58px;
  }

  .shop-button--website {
    width: min(352px, 100%);
    margin-left: auto;
  }
}

/* The scaling unit, from the 1512px frame, for these full-width sections */
main:has(.shop-hero) {
  container-type: inline-size;
  --u: calc(min(100cqw, 1512px) / 1512);
}

@media (min-width: 1512px) {
  .shop-hero,
  .shop-founder,
  .shop-details {
    padding-inline: calc((100% - 1512px) / 2 + var(--pad));
  }

  .shop-hero { --pad: 135px; }
  .shop-founder { --pad: 240px; }
  .shop-details { --pad: 135px; }
}

/* ---------- Small screens ---------- */

@media (max-width: 899px) {
  main:has(.shop-hero) {
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding-bottom: 80px;
  }

  .shop-hero,
  .shop-founder {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  /* Photo first on mobile */
  .shop-hero__photo {
    order: -1;
    aspect-ratio: 393 / 475;
  }

  .shop-founder__photo {
    aspect-ratio: 393 / 553;
  }

  /* An empty photo slot would fill a whole screen on a phone */
  .shop-founder__photo--pending {
    display: none;
  }

  .shop-hero__text,
  .shop-founder__text {
    gap: 20px;
    padding-inline: 33px;
  }

  .shop-title {
    font-size: 2.375rem;
    line-height: 44px;
    letter-spacing: 0.02em;
  }

  .shop-body {
    font-size: 1rem;
    line-height: 28px;
  }

  .shop-details {
    padding-inline: 33px;
  }

  .shop-card {
    gap: 24px;
    padding: 32px 24px;
  }

  .shop-card__title {
    font-size: 1.75rem;
    line-height: 34px;
    letter-spacing: -0.03em;
  }

  .shop-card__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .shop-card__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 16px;
  }

  .shop-button--website {
    width: 100%;
  }
}
