/* Categories page (Ritaj Simsim): square cards, as the YouCan category thumbnail is square, so each photo is shown
   whole; the category name is always visible under its photo (Chameleon showed it on hover only, over a blurred
   photo, and cut the photos into 350 px high frames). */
[section="all-collections"] {
  display: grid;
  gap: 24px;
  padding-block: 8px 48px;

  .all-collections-head {
    display: grid;
    gap: 8px;
    padding: 28px 20px;
    border-radius: var(--rs-radius);
    background-color: var(--rs-sand-100);
    text-align: center;

    .title {
      font-size: clamp(24px, 1.2rem + 1.2vw, 34px);
      font-weight: 700;
      line-height: 1.4;
      color: var(--rs-text);
    }

    .description {
      color: var(--rs-muted);
      text-wrap: balance;
    }
  }

  .all-collections-core {
    display: grid;
    gap: 24px;
  }

  .items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 340px));
    justify-content: center;
    gap: 16px;
  }

  .item > a {
    display: grid;
    gap: 12px;
    height: 100%;
    padding: 10px 10px 14px;
    border: 1px solid var(--rs-line);
    border-radius: var(--rs-radius);
    color: var(--rs-text);
    background-color: var(--rs-surface);
    box-shadow: var(--rs-shadow-soft);
    text-decoration: none;
    transition:
      border-color 0.2s,
      box-shadow 0.3s var(--rs-ease);

    &:hover {
      border-color: var(--rs-gold);
      box-shadow: var(--rs-shadow);
    }
  }

  .media {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background-color: var(--rs-sand-100);

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    & > [ui-icon] {
      position: absolute;
      inset: 0;
      margin: auto;
      width: fit-content;
      height: fit-content;
      opacity: 0.3;
    }
  }

  .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding-inline: 6px;

    .title {
      font-size: 18px;
      font-weight: 700;
      line-height: 1.5;
    }

    [ui-icon] {
      color: var(--rs-primary);
    }
  }
}
