.slp-gallery {
    color: #171717;
    margin: 24px 0;
}

.slp-gallery-page__inner {
    margin: 0 auto;
    max-width: 1320px;
    padding: 28px 16px 48px;
}

.slp-gallery-page__header {
    margin-bottom: 18px;
}

.slp-gallery-page__header h1 {
    color: #171717;
    font-size: 34px;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0 0 8px;
}

.slp-gallery-page__description {
    color: #555;
    max-width: 760px;
}

.slp-gallery__toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.slp-gallery__search {
    flex: 1 1 260px;
    margin: 0;
}

.slp-gallery__search input {
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    box-shadow: none;
    color: #171717;
    min-height: 44px;
    padding: 10px 14px;
    width: 100%;
}

.slp-gallery__filters {
    display: flex;
    flex: 999 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.slp-gallery__filters button,
.slp-card__button {
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    line-height: 1.2;
    min-height: 38px;
    padding: 9px 12px;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.slp-gallery__filters button {
    background: #fff;
    border: 1px solid #d8d8d8;
    color: #333;
}

.slp-gallery__filters button:hover,
.slp-gallery__filters button.is-active {
    background: #171717;
    border-color: #171717;
    color: #fff;
}

.slp-gallery__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(var(--slp-columns, 4), minmax(0, 1fr));
}

.slp-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    display: block;
    margin: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

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

.slp-card__image {
    background: #f3f3f3;
    display: block;
    min-height: 160px;
    overflow: hidden;
}

.slp-card__image img {
    display: block;
    height: auto;
    transform: scale(1);
    transition: transform 220ms ease;
    width: 100%;
}

.slp-card:hover .slp-card__image img {
    transform: scale(1.025);
}

.slp-card__placeholder {
    align-items: center;
    color: #777;
    display: flex;
    min-height: 180px;
    justify-content: center;
    padding: 20px;
}

.slp-card__body {
    padding: 13px;
}

.slp-card__meta {
    min-height: 22px;
}

.slp-card__badge {
    background: #f1eee8;
    border: 1px solid #e4ded3;
    border-radius: 999px;
    color: #544636;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 8px;
}

.slp-card__title {
    color: #171717;
    font-size: 18px;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 8px 0 6px;
}

.slp-card__prompt {
    color: #555;
    display: -webkit-box;
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.slp-card__actions {
    display: flex;
    gap: 8px;
}

.slp-card__button {
    border: 1px solid transparent;
    flex: 1 1 0;
    text-align: center;
}

.slp-card__button--secondary {
    background: #fff;
    border-color: #d8d8d8;
    color: #222;
}

.slp-card__button--secondary:hover {
    background: #f5f5f5;
    color: #111;
}

.slp-card__button--primary {
    background: #171717;
    border-color: #171717;
    color: #fff;
}

.slp-card__button--primary:hover {
    background: #b38a4c;
    border-color: #b38a4c;
    color: #fff;
}

.slp-gallery__empty {
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 18px;
}

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

@media (max-width: 720px) {
    .slp-gallery__toolbar,
    .slp-gallery__filters {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .slp-gallery__grid {
        grid-template-columns: 1fr;
    }

    .slp-card__actions {
        flex-direction: column;
    }
}
