/* Mobile-first display safeguards */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.hero-image,
.color-hero,
.gallery figure {
  width: 100%;
  max-width: 100%;
}

.hero-image img,
.color-hero img,
.gallery img {
  width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 24px);
  }

  .topbar {
    line-height: 1.55;
    padding-inline: 14px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 8px 0 48px;
  }

  .hero-image {
    order: -1;
    margin: 0;
    border-radius: 22px;
  }

  .hero-image img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f7f2eb;
  }

  .hero-image figcaption,
  .gallery figcaption {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
  }

  .hero-copy {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .price-box {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .two-offer {
    line-height: 1.6;
  }

  .color-hero {
    margin-inline: 0;
    border-radius: 18px;
  }

  .color-hero img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
  }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .gallery figure {
    margin: 0;
    border-radius: 18px;
  }

  .gallery img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #f7f2eb;
  }

  .order-card {
    width: 100%;
    padding: 20px 16px;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  textarea {
    min-height: 96px;
  }

  .sticky {
    gap: 12px;
  }

  .sticky button {
    min-width: 142px;
  }
}

@media (max-width: 390px) {
  .wrap {
    width: calc(100% - 20px);
  }

  .section {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 31px;
  }

  .price-box > strong {
    font-size: 43px;
  }

  .swatches {
    gap: 12px;
  }

  .order-card {
    padding: 18px 13px;
  }
}
