.sp-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .sp-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .sp-item {
        grid-column: span 2;
    }

    .sp-item.sp-span-1-5 {
        grid-column: span 3;
    }

    .sp-item.sp-span-2 {
        grid-column: span 4;
    }

    .sp-item.sp-span-3 {
        grid-column: span 6;
    }
}

.sp-item {
    border: 1px solid var(--wp--custom--light--1);
    border-radius: var(--wp--custom--radius--sm);
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

.sp-img-link {
    display: flex;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    transition: all 300ms ease-in-out;
}

.sp-img-link:hover {
    transform: scale(1.03);
}

.sp-img {
    max-width: 100%;
    height: 250px;
    object-fit: contain;
}

.sp-item-content {
    padding: 15px;
    border-top: 1px solid var(--wp--custom--light--1);
    font-size: 0.95em;
    line-height: 1.5;
}


/* Lightbox Styles */
.sp-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    max-width: unset !important;
}

.sp-lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    background-color: white;
}

.sp-lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.sp-lightbox-close:hover,
.sp-lightbox-close:focus {
    color: #bbb;
}

/* Category Filters Styles */
.sp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    justify-content: center;
}

.sp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    background-color: var(--wp--custom--light--1);
    border: 1px solid var(--wp--custom--light--1);
    border-radius: var(--wp--custom--radius--xs);
    padding: 10px 10px 5px;
    cursor: pointer;
    transition: all 300ms ease-in-out;
    flex-direction: column;
}

.sp-cat-filter-img {
    width: 60px;
    height: 34px;
    object-fit: contain;
    margin-right: 0;
    display: block;
}

.sp-filter-btn:hover {
    background-color: var(--wp--custom--primary--light);
    border-color: var(--wp--custom--primary--light);
    color: var(--wp--custom--dark--1);
}

.sp-filter-btn.active {
    background-color: var(--wp--custom--primary--dark-2);
    border-color: var(--wp--custom--primary--dark-2);
    color: white;
}

.sp-grid-container {
    position: relative;
}

.sp-grid-container.sp-loading {
    pointer-events: none;
}