/* Frontend Styles for Gallery Search Filter */

.gsf-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Open Sans', sans-serif;
    /* Matching the user's font style ideally */
}

/* Controls Area (Search & Filter) */
.gsf-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaecf0;
}

.gsf-search-wrap,
.gsf-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gsf-search-wrap {
    flex-grow: 1;
}

.gsf-filter-wrap {
    min-width: 250px;
}

.gsf-controls label {
    font-size: 14px;
    font-weight: 500;
    color: #344054;
}

/* Search Input Styling */
.gsf-search-input-wrap {
    position: relative;
    width: 100%;
}

.gsf-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #667085;
}

.gsf-search-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    /* Space for icon */
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    background: #f9fafb;
    transition: border-color 0.2s;
    line-height: 1.5;
}

.gsf-search-input-wrap input:focus {
    border-color: #7f56d9;
    /* Or theme color */
    background: #fff;
}

/* Filter Dropdown Styling */
#gsf-category-filter {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9fafb;
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    line-height: 1.5;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23667085%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px top 50%;
    background-size: 10px auto;
}

#gsf-category-filter:focus {
    border-color: #7f56d9;
    background-color: #fff;
}

/* Grid Layout */
.gsf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Default 4 columns */
    gap: 32px;
}

.gsf-gallery-container[data-columns="3"] .gsf-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
}

.gsf-gallery-container[data-columns="2"] .gsf-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Gallery Item Card */
.gsf-gallery-item {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px -2px rgba(16, 24, 40, 0.03), 0 12px 16px -4px rgba(16, 24, 40, 0.08);
}

.gsf-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(16, 24, 40, 0.1);
}

.gsf-item-image {
    width: 100%;
    aspect-ratio: 4/3;
    /* Consistent aspect ratio */
    overflow: hidden;
    background: #f2f4f7;
}

.gsf-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gsf-gallery-item:hover .gsf-item-image img {
    transform: scale(1.05);
}

.gsf-item-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #eaecf0;
}

.gsf-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0;
    line-height: 1.4;
}

.gsf-item-category-tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #ecfdf3;
    /* Light green/turquoise matching the image */
    color: #027a48;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    width: fit-content;
}

/* No Results & Loading state */
.gsf-no-results,
.gsf-no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px;
    color: #667085;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .gsf-gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .gsf-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .gsf-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .gsf-filter-wrap {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gsf-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}