/* S7 Gallery Frontend Styles */

.s7-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.s7-gallery-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.s7-gallery-filter-track,
.s7-gallery-filter-search {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.s7-gallery-filter-track label,
.s7-gallery-filter-search label {
    font-weight: 600;
    font-size: 14px;
}

.s7-gallery-track-filter,
.s7-gallery-search {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.s7-gallery-search {
    min-width: 250px;
}

/* Grid */
.s7-gallery-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.s7-gallery-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.s7-gallery-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.s7-gallery-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.s7-gallery-grid[data-columns="5"] {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.s7-gallery-grid[data-columns="6"] {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

@media (max-width: 768px) {
    .s7-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .s7-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 10px;
    }
}

/* Gallery Item */
.s7-gallery-item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.s7-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.s7-gallery-item-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    /* Square aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.s7-gallery-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.s7-gallery-item:hover .s7-gallery-item-image img {
    transform: scale(1.05);
}

.s7-gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a05ff;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.s7-gallery-item:hover .s7-gallery-item-overlay {
    opacity: 1;
}

.s7-gallery-item-number,
.s7-gallery-item-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: block;
}

/* No Results */
.s7-gallery-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* Pagination */
.s7-gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.s7-gallery-prev,
.s7-gallery-next {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.s7-gallery-prev:hover:not(:disabled),
.s7-gallery-next:hover:not(:disabled) {
    background: #005177;
}

.s7-gallery-prev:disabled,
.s7-gallery-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.s7-gallery-page-info {
    font-size: 14px;
    color: #666;
}

/* Loading */
.s7-gallery-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.s7-gallery-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: s7-spin 1s linear infinite;
}

@keyframes s7-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal */
.s7-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.s7-gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.s7-gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    z-index: 10001;
}

.s7-gallery-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10002;
    transition: background 0.3s ease;
}

.s7-gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.s7-gallery-modal-prev,
.s7-gallery-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
    z-index: 10002;
    transition: background 0.3s ease;
}

.s7-gallery-modal-prev {
    left: 10px;
    border-radius: 0 50% 50% 0;
}

.s7-gallery-modal-next {
    right: 10px;
    border-radius: 50% 0 0 50%;
}

.s7-gallery-modal-prev:hover,
.s7-gallery-modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.s7-gallery-modal-body {
    display: flex;
    flex-direction: row;
    max-height: 90vh;
}

.s7-gallery-modal-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    min-width: 60%;
}

.s7-gallery-modal-image img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.s7-gallery-modal-details {
    flex: 0 0 350px;
    padding: 30px;
    overflow-y: auto;
    background: white;
    text-align: center;
}

.s7-gallery-modal-name {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
}

.s7-gallery-modal-meta p {
    margin: 10px 0;
    font-size: 16px;
    color: #666;
}

.s7-gallery-modal-meta strong {
    color: #333;
}

.s7-gallery-modal-auction {
    margin-top: 20px;
}

.s7-gallery-modal-auction a {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.s7-gallery-modal-auction a:hover {
    background: #005177;
}

@media (max-width: 768px) {
    .s7-gallery-modal-body {
        flex-direction: column;
    }

    .s7-gallery-modal-image {
        min-width: 100%;
    }

    .s7-gallery-modal-details {
        flex: 0 0 auto;
        max-height: 40vh;
    }

    .s7-gallery-modal-prev,
    .s7-gallery-modal-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}