.staggs-gallery {
  --gallery-ink: #171717;
  --gallery-paper: #fff;
  --gallery-soft: #f3f1ed;
  --gallery-line: #d9d6d0;
  --gallery-accent: #f18d35;
  width: min(100%, 1440px);
  margin: 48px auto;
  color: var(--gallery-ink);
  font-family: Inter, Arial, sans-serif;
}

.staggs-gallery *,
.staggs-gallery *::before,
.staggs-gallery *::after {
  box-sizing: border-box;
}

.staggs-gallery__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--gallery-ink);
}

.staggs-gallery__eyebrow,
.staggs-gallery-card__model {
  margin: 0 0 7px;
  color: #5b5b5b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.staggs-gallery__heading h2 {
  margin: 0;
  color: var(--gallery-ink);
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .98;
}

.staggs-gallery__count {
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--gallery-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.staggs-gallery-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(160px, .8fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 32px;
  padding: 18px;
  border: 1px solid var(--gallery-line);
  background: var(--gallery-soft);
}

.staggs-gallery-filters label {
  display: grid;
  gap: 7px;
  margin: 0;
}

.staggs-gallery-filters label > span {
  color: #4b4b4b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.staggs-gallery-filters input,
.staggs-gallery-filters select,
.staggs-gallery-filters button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 2px solid var(--gallery-ink);
  border-radius: 0;
  background: var(--gallery-paper);
  color: var(--gallery-ink);
  font: inherit;
  font-size: 14px;
  box-shadow: none;
}

.staggs-gallery-filters button {
  padding-inline: 20px;
  background: var(--gallery-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
}

.staggs-gallery-filters__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.staggs-gallery-filters__actions a {
  color: var(--gallery-ink);
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.staggs-gallery-filters input:focus-visible,
.staggs-gallery-filters select:focus-visible,
.staggs-gallery-filters button:focus-visible,
.staggs-gallery-card__action a:focus-visible,
.staggs-gallery-pagination .page-numbers:focus-visible,
.staggs-gallery-empty a:focus-visible {
  outline: 3px solid var(--gallery-accent);
  outline-offset: 2px;
}

.staggs-gallery-filters button:hover {
  background: var(--gallery-accent);
  color: var(--gallery-ink);
}

.staggs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.staggs-gallery-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gallery-line);
  border-top: 4px solid var(--gallery-ink);
  background: var(--gallery-paper);
  transition: border-color .18s ease, transform .18s ease;
}

.staggs-gallery-card:hover {
  border-color: var(--gallery-ink);
  transform: translateY(-3px);
}

.staggs-gallery-card__media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gallery-line);
  background: #e9e8e4;
}

.staggs-gallery-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.staggs-gallery-card:hover .staggs-gallery-card__media img {
  transform: scale(1.025);
}

.staggs-gallery-card__media > span {
  padding: 20px;
  color: #666;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

.staggs-gallery-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.staggs-gallery-card h3 {
  margin: 0;
  color: var(--gallery-ink);
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.staggs-gallery-card__credit,
.staggs-gallery-card__excerpt {
  margin: 9px 0 0;
  color: #5c5c5c;
  font-size: 13px;
  line-height: 1.55;
}

.staggs-gallery-card__credit {
  font-weight: 700;
}

.staggs-gallery-card__specs {
  display: grid;
  margin: 20px 0 0;
  border: 1px solid var(--gallery-line);
}

.staggs-gallery-card__specs > div {
  display: grid;
  grid-template-columns: minmax(90px, .85fr) minmax(0, 1.15fr);
  border-bottom: 1px solid var(--gallery-line);
  font-size: 11px;
  line-height: 1.35;
}

.staggs-gallery-card__specs > div:last-child {
  border-bottom: 0;
}

.staggs-gallery-card__specs > .is-first-product-spec {
  border-top: 3px solid var(--gallery-ink);
}

.staggs-gallery-card__specs dt,
.staggs-gallery-card__specs dd {
  margin: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.staggs-gallery-card__specs dt {
  background: var(--gallery-ink);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.staggs-gallery-card__specs dd {
  background: #fff;
  color: var(--gallery-ink);
}

.staggs-gallery-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.staggs-gallery-card__tags li {
  padding: 5px 8px;
  border: 1px solid var(--gallery-ink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.staggs-gallery-card__action {
  margin-top: auto;
  padding-top: 22px;
}

.staggs-gallery-card__action a,
.staggs-gallery-card__action > span,
.staggs-gallery-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 2px solid var(--gallery-ink);
  background: var(--gallery-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.staggs-gallery-card__action a:hover,
.staggs-gallery-empty a:hover {
  background: var(--gallery-accent);
  color: var(--gallery-ink);
}

.staggs-gallery-card__action > span {
  border-color: #b8b8b8;
  background: #ededed;
  color: #777;
}

.staggs-gallery-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 36px;
}

.staggs-gallery-pagination .page-numbers {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  place-items: center;
  border: 2px solid var(--gallery-ink);
  background: #fff;
  color: var(--gallery-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.staggs-gallery-pagination .page-numbers.current,
.staggs-gallery-pagination a.page-numbers:hover {
  background: var(--gallery-ink);
  color: #fff;
}

.staggs-gallery-empty {
  padding: clamp(32px, 7vw, 80px);
  border: 2px dashed #a9a69f;
  background: var(--gallery-soft);
  text-align: center;
}

.staggs-gallery-empty h3 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 38px);
}

.staggs-gallery-empty p {
  margin: 0 auto 22px;
  color: #5a5a5a;
}

.staggs-gallery-empty a {
  width: auto;
}

@media (max-width: 1050px) {
  .staggs-gallery-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staggs-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .staggs-gallery {
    margin-block: 32px;
  }

  .staggs-gallery__heading {
    align-items: start;
    flex-direction: column;
  }

  .staggs-gallery-filters,
  .staggs-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .staggs-gallery-filters {
    padding: 14px;
  }

  .staggs-gallery-filters__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .staggs-gallery-filters__actions a {
    text-align: center;
  }

  .staggs-gallery-card__body {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staggs-gallery-card,
  .staggs-gallery-card__media img {
    transition: none;
  }
}
