.gallery {
  .restaurant-gallery-filters {
    list-style: none;
    margin-bottom: 2rem;
    padding-left: 0;

    li {
      cursor: pointer;
      padding: 0.5rem 1.5rem;
      border-radius: 30px;
      color: var(--heading-color);
      background-color: color-mix(in srgb, var(--surface-color), var(--accent-color) 7%);
      border: none;
      transition: background .3s, color .3s, box-shadow .3s;
      font-family: var(--heading-font);
      font-size: 1.05rem;
      font-weight: 600;

      &.filter-active,
      &:hover {
        background-color: var(--accent-color);
        color: var(--contrast-color);
        box-shadow: 0 2px 12px color-mix(in srgb, var(--accent-color), transparent 85%);
      }
    }
  }

  /* Make isotope columns behave as flex containers so cards stretch to full column height */
  .isotope-item {
    display: flex;
    flex-direction: column;
  }

  .gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 0;
    box-shadow: 0 2px 16px color-mix(in srgb, var(--default-color), transparent 94%);
    background: var(--surface-color);
    display: flex;
    flex-direction: column;
    height: 400px;

    a {
      display: block;
      overflow: hidden;
      flex-shrink: 0;

      img {
        display: block;
        width: 100%;
        height: 260px;
        border-radius: 16px 16px 0 0;
        object-fit: cover;
        transition: transform .3s, filter .3s;
      }
    }

    &:hover img,
    a:focus img {
      transform: scale(1.07);
      filter: brightness(0.92) saturate(1.2);
    }

    .caption {
      padding: 1.1rem 1rem 1.2rem;
      background: var(--surface-color);
      border-radius: 0 0 16px 16px;
      flex: 1;

      .caption-title {
        color: var(--heading-color);
        font-family: var(--heading-font);
        font-weight: 700;
        font-size: 1.08rem;
        display: block;
        margin-bottom: 0.18rem;
        letter-spacing: 0.01em;
      }

      span:not(.caption-title) {
        color: color-mix(in srgb, var(--default-color), transparent 25%);
        font-size: 0.96rem;
        font-family: var(--default-font);
        display: block;
      }
    }
  }

  @media (max-width: 992px) {
    .gallery-card {
      .caption {
        padding: 0.85rem 0.7rem 1rem;
      }
    }
    .restaurant-gallery-filters li {
      font-size: 1rem;
      padding: 0.45rem 1rem;
    }
  }

  @media (max-width: 576px) {
    .gallery-card {
      .caption {
        padding: 0.7rem 0.6rem 0.75rem;
        .caption-title {
          font-size: 1rem;
        }
        span:not(.caption-title) {
          font-size: 0.92rem;
        }
      }
      a img {
        border-radius: 12px 12px 0 0;
      }
    }
    .restaurant-gallery-filters {
      flex-wrap: wrap;
      gap: 0.5rem;
      li {
        font-size: 0.95rem;
        padding: 0.38rem 0.8rem;
      }
    }
  }
}