.sfg-root {
  --sfg-orange: var(--bde-brand-primary-color, #f59f24);
  --sfg-orange-deep: #ec7f12;
  --sfg-ink: #20242a;
  --sfg-muted: #626975;
  --sfg-line: #e3e5e8;
  --sfg-soft: #f7f7f7;
  --sfg-columns: 3;
  color: var(--sfg-ink);
  font-family: Poppins, Arial, sans-serif;
}

.sfg-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.sfg-root .sfe-pill {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid rgba(22, 22, 22, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--sfg-ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.sfg-root .sfe-pill:hover,
.sfg-root .sfe-pill:focus {
  border-color: rgba(245, 159, 36, 0.85);
  background: rgba(245, 159, 36, 0.08);
  color: var(--sfg-orange-deep) !important;
  outline: none;
}

.sfg-root .sfe-pill.is-active,
.sfg-root .sfe-pill.is-active:hover,
.sfg-root .sfe-pill.is-active:focus {
  border-color: var(--sfg-orange);
  background: var(--sfg-orange);
  color: #ffffff !important;
}

.sfg-grid {
  display: grid;
  grid-template-columns: repeat(var(--sfg-columns), minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.sfg-card {
  min-width: 0;
}

.sfg-card[hidden] {
  display: none;
}

.sfg-card-button {
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex-direction: column;
  font: inherit;
  text-align: left;
}

.sfg-card-button:focus {
  outline: none;
}

.sfg-card-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 159, 36, 0.35);
}

.sfg-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.sfg-card .sfg-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sfg-root .sfe-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid var(--sfg-orange-deep);
  border-radius: 8px;
  background: #fff0e4;
  color: var(--sfg-orange-deep) !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sfg-card-body {
  width: 100%;
}

.sfg-card-title {
  display: block;
  color: var(--sfg-ink) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0;
}

.sfg-card-button:hover .sfg-card-title,
.sfg-card-button:focus .sfg-card-title {
  color: var(--sfg-orange-deep) !important;
}

.sfg-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--sfg-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--sfg-muted);
  font-size: 15px;
  line-height: 1.5;
}

.sfg-filter-empty {
  margin-top: 20px;
}

.sfg-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(12, 14, 18, 0.88);
}

.sfg-lightbox.is-open {
  display: flex;
}

.sfg-lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(1100px, 100%);
  color: #ffffff;
}

.sfg-lightbox-figure {
  grid-column: 2;
  margin: 0;
  min-width: 0;
}

.sfg-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  border-radius: 8px;
  background: #20242a;
  object-fit: contain;
}

.sfg-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.4;
}

.sfg-lightbox-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 28px;
  line-height: 1;
}

.sfg-lightbox-button:hover,
.sfg-lightbox-button:focus {
  border-color: var(--sfg-orange);
  background: var(--sfg-orange);
  color: #ffffff;
  outline: none;
}

.sfg-lightbox-close {
  position: absolute;
  top: -56px;
  right: 0;
}

.sfg-lightbox-prev {
  grid-column: 1;
}

.sfg-lightbox-next {
  grid-column: 3;
}

.sfg-lightbox-button[disabled] {
  opacity: 0.38;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .sfg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sfg-grid {
    grid-template-columns: 1fr;
  }

  .sfg-lightbox {
    padding: 18px;
  }

  .sfg-lightbox-panel {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sfg-lightbox-figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .sfg-lightbox-image {
    max-height: calc(100vh - 170px);
  }

  .sfg-lightbox-prev,
  .sfg-lightbox-next {
    grid-column: auto;
    justify-self: center;
  }

  .sfg-lightbox-close {
    top: -54px;
  }

  .sfg-lightbox-caption {
    flex-direction: column;
    gap: 4px;
    padding-left: 15px;
    padding-right: 15px;
  }
}
