.storefront-home {
  color: #241a18;
  background: #fff;
}

.storefront-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(420px, 31vw, 500px);
  overflow: hidden;
  background: #f7eee5;
}

.storefront-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.storefront-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.storefront-hero__inner {
  display: flex;
  align-items: center;
  width: min(100% - 80px, 1420px);
  min-height: clamp(420px, 31vw, 500px);
  margin-inline: auto;
}

.storefront-hero__copy {
  width: min(55%, 780px);
  padding-block: 56px;
}

.storefront-hero h1,
.storefront-categories h2 {
  font-family: 'Iowan Old Style', 'Baskerville', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.storefront-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(54px, 4.75vw, 72px);
  line-height: 0.98;
  color: #761124;
}

.storefront-hero__copy > p {
  max-width: 420px;
  margin: 24px 0 0;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.55;
  color: #39302e;
}

.storefront-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  align-items: center;
  margin-top: 36px;
}

.storefront-hero__primary {
  display: inline-flex;
  gap: 38px;
  align-items: center;
  justify-content: space-between;
  min-width: 270px;
  min-height: 64px;
  padding: 16px 26px 16px 30px;
  font-size: 17px;
  color: #fff;
  background: #7b1023;
  border: 1px solid #7b1023;
  border-radius: 4px;
  box-shadow: 0 12px 28px rgb(91 7 27 / 12%);
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.storefront-hero__primary:hover {
  background: #5f0b1a;
  transform: translateY(-1px);
}

.storefront-hero__primary svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}

.storefront-hero__secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 17px;
  color: #741124;
}

.storefront-hero__secondary::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  content: '';
  background: currentcolor;
  transform-origin: left;
  transition: transform 160ms ease;
}

.storefront-hero__secondary:hover::after {
  transform: scaleX(0.65);
}

.storefront-categories {
  width: min(100% - 80px, 1420px);
  padding-block: 34px 68px;
  margin-inline: auto;
}

.storefront-categories__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.storefront-categories h2 {
  margin: 0;
  font-size: clamp(36px, 3vw, 46px);
  line-height: 1.1;
  color: #211815;
}

.storefront-categories__header > a {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  color: #741124;
}

.storefront-categories__header > a svg,
.category-card__label svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
  transition: transform 160ms ease;
}

.storefront-categories__header > a:hover svg,
.category-card:hover .category-card__label svg {
  transform: translateX(4px);
}

.storefront-categories__rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 14px;
}

.category-card {
  min-width: 0;
  overflow: hidden;
  color: #241a18;
  background: #fff;
  border: 1px solid #e1d9d0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgb(63 31 19 / 3%);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.category-card:hover {
  border-color: #c6ad8f;
  box-shadow: 0 14px 34px rgb(85 48 30 / 9%);
  transform: translateY(-3px);
}

.category-card__visual {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.03;
  overflow: hidden;
  background-color: #f7f0e8;
}

.category-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card__label {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.2;
  background: #fff;
}

@media (max-width: 1240px) {
  .storefront-categories__rail {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 3px 3px 18px;
    margin-inline: -3px;
    scroll-snap-type: x proximity;
    scrollbar-color: #d1b998 transparent;
    scrollbar-width: thin;
  }

  .category-card {
    flex: 0 0 184px;
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  .storefront-hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .storefront-hero__media {
    position: relative;
    z-index: auto;
    order: 1;
    width: 100%;
    height: clamp(250px, 70vw, 400px);
  }

  .storefront-hero__image {
    object-position: 69% center;
  }

  .storefront-hero__inner {
    order: 2;
    width: 100%;
    min-height: auto;
    padding: 36px 24px 44px;
    background: #f7eee5;
  }

  .storefront-hero__copy {
    width: 100%;
    padding: 0;
  }

  .storefront-hero h1 {
    max-width: 500px;
    font-size: clamp(46px, 13vw, 66px);
  }

  .storefront-hero__copy > p {
    margin-top: 18px;
    font-size: 18px;
  }

  .storefront-hero__actions {
    gap: 18px 28px;
    margin-top: 28px;
  }

  .storefront-hero__primary {
    min-width: min(100%, 272px);
  }

  .storefront-categories {
    width: 100%;
    padding: 32px 20px 50px;
  }

  .storefront-categories h2 {
    font-size: 36px;
  }

  .storefront-categories__rail {
    padding-right: 22px;
    margin-right: -20px;
  }
}

@media (max-width: 440px) {
  .storefront-hero__media {
    height: 260px;
  }

  .storefront-hero__actions {
    align-items: flex-start;
  }

  .storefront-hero__primary {
    width: 100%;
  }

  .storefront-categories__header {
    align-items: flex-end;
  }

  .storefront-categories h2 {
    max-width: 220px;
    font-size: 34px;
  }

  .storefront-categories__header > a {
    padding-bottom: 3px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-card,
  .category-card__label svg,
  .storefront-categories__header > a svg,
  .storefront-hero__primary,
  .storefront-hero__secondary::after {
    transition: none;
  }
}
