.theme-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.theme-gallery__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-color);
    padding: 40px 0;
}

.theme-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--linix-shadow-soft);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.theme-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.theme-card__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f5f9;
}

.theme-card__thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.theme-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.theme-card:hover .theme-card__thumb img {
    transform: scale(1.05);
}

.theme-card__preview {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.theme-card:hover .theme-card__preview {
    opacity: 1;
    pointer-events: auto;
}

.theme-card__content h3 a {
    color: inherit;
}

.theme-card__preview .material-symbols-outlined {
    font-size: 22px;
}

.theme-card__content {
    padding: 20px 22px 24px;
}

.theme-card__content h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--heading-color);
}

.theme-card__content p {
    margin: 0;
    color: var(--text-color);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
}

.theme-card__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.theme-card__categories a {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--primary-color);
    background: var(--primary-color-soft, rgba(5, 79, 211, 0.12));
}

.theme-detail__categories {
    margin: 18px 0 0;
}

.theme-detail__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 28px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    background: var(--primary-color);
    box-shadow: var(--primary-color-shadow-button, 0 12px 24px rgba(5, 79, 211, 0.24));
}

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

@media (max-width: 640px) {
    .theme-gallery__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
