@layer pages {
  #hero {
    figure {
      margin-block-end: 0;
      flex-shrink: 0;

      svg {
        inline-size: 15rem;
        max-width: none;
        aspect-ratio: 406/426;
      }
    }
  }

  #brands {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    margin-block-end: var(--section-padding);
  }

  .brand {
    scroll-padding-top: var(--space-l);
    display: flex;
    flex-direction: column;
    gap: var(--space-m);

    @media (width > 60rem) {
      display: grid;
      grid-template-columns: 1fr 3fr;
      gap: var(--space-l);

      &:nth-child(even) {
        grid-template-columns: 3fr 1fr;
      }
    }
  }

  .brand__description {
    font-size: var(--step--1);
    font-weight: 600;
  }

  .brand__products {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    @media (width > 60rem) {
      .brand:nth-child(even) & {
        order: -1;
      }
    }
  }

  .brand-products__label {
    font-size: var(--step-1);
    font-family: var(--font-hand);
    font-weight: 600;
    inline-size: fit-content;
    text-decoration: underline;
    text-decoration-color: var(--color-fuchsia-40);
    text-decoration-style: wavy;
    text-underline-offset: 0.25em;
    border-radius: 2em;
    padding-block: 0.5em;
    position: relative;
    z-index: 1;
    .brand:nth-child(even) & {
      text-decoration-color: var(--color-purple-50);
    }
    @media (width > 60rem) {
      margin-inline: auto;
      margin-block-end: calc(-1 * var(--space-m));
      rotate: -2deg;
      .brand:nth-child(even) & {
         rotate: 2deg;
      }
    }
  }

  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: var(--space-s);
    @media (width > 60rem) {
      rotate: 1deg;
       .brand:nth-child(even) & {
        rotate: -1deg;
      }
    }

    .product-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: var(--space-m);
      border-radius: 1rem;
      background-color: var(--color-white);
    }
  
    a {
      text-decoration: none;
    }
  
    .product-title {
      font-size: var(--step--1);
      color: var(--theme-color-text-dark);
    }

  }

}
/* Pages layer end */
