/* Metamock Gallery Styles */

.metamock-gallery-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Filters */
.metamock-filters {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
}

.metamock-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.metamock-filter-row:last-child {
    margin-bottom: 0;
}

.metamock-filter-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.metamock-filter-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.metamock-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.metamock-select:hover {
    border-color: #9ca3af;
}

.metamock-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.metamock-attribute-filters {
    display: none;
}

.metamock-attribute-filters.active {
    display: flex;
}

.metamock-filter-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.metamock-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.metamock-btn-primary {
    background: #3b82f6;
    color: white;
}

.metamock-btn-primary:hover {
    background: #2563eb;
}

.metamock-btn-secondary {
    background: #7D03E0;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    border: none;
}

.metamock-btn-secondary:hover {
    background: #6502b8;
}

.metamock-results-count {
    color: #6b7280;
    font-size: 14px;
}

/* Loading */
.metamock-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.metamock-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: metamock-spin 0.8s linear infinite;
}

@keyframes metamock-spin {
    to { transform: rotate(360deg); }
}

/* Image Grid */
.metamock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.metamock-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.metamock-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.metamock-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f3f4f6;
}

.metamock-card-content {
    padding: 16px;
}

.metamock-card-category {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.metamock-card-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.metamock-card-attr {
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
}

.metamock-card-attr strong {
    color: #374151;
}

/* Load More */
.metamock-load-more-wrap {
    text-align: center;
    padding: 40px 20px;
}

/* Modal - must be above sticky header */
.metamock-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2147483647;
    padding: 20px;
    box-sizing: border-box;
    overflow: auto;
}

.metamock-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metamock-modal-content {
    position: relative;
    display: flex;
    flex-direction: row;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    z-index: 2147483647;
}

.metamock-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    font-size: 30px !important;
    color: #333 !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
    transition: transform 0.2s;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.metamock-modal-close:hover {
    transform: scale(1.2);
}

.metamock-modal-image-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #000;
    overflow: hidden;
}

#metamock-modal-image {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: block;
    object-fit: contain;
}

/* CTA Section */
.metamock-modal-cta {
    width: 100%;
    padding: 20px 30px 24px;
    background: linear-gradient(135deg, #7D03E0 0%, #5a02a3 100%);
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.metamock-cta-text {
    margin: 0 0 14px 0;
    color: white;
    font-size: 15px;
    line-height: 1.5;
}

.metamock-cta-text strong {
    color: #ffd700;
}

.metamock-cta-button {
    display: inline-block;
    padding: 12px 32px;
    background: white;
    color: #7D03E0;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.metamock-cta-button:hover {
    background: #ffd700;
    color: #5a02a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.metamock-cta-tagline {
    margin: 14px 0 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-style: italic;
}

.metamock-cta-disclaimer {
    margin: 10px 0 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.metamock-modal-details {
    width: 320px;
    min-width: 280px;
    padding: 30px 24px;
    background: white;
    overflow-y: auto;
    max-height: 90vh;
    box-sizing: border-box;
}

.metamock-modal-details h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.metamock-modal-caption {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.metamock-modal-attr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metamock-modal-attr {
    font-size: 14px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 8px;
}

.metamock-modal-attr strong {
    color: #374151;
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Modal responsive - stack on smaller screens */
@media (max-width: 900px) {
    .metamock-modal-content {
        flex-direction: column;
        max-height: 95vh;
    }

    .metamock-modal-image-wrap {
        max-height: none;
    }

    #metamock-modal-image {
        max-height: 45vh;
    }

    .metamock-modal-cta {
        padding: 16px 20px 20px;
    }

    .metamock-cta-text {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .metamock-cta-button {
        padding: 10px 24px;
        font-size: 14px;
    }

    .metamock-cta-tagline {
        font-size: 12px;
        margin-top: 12px;
    }

    .metamock-cta-disclaimer {
        font-size: 10px;
        margin-top: 8px;
    }

    .metamock-modal-details {
        width: 100%;
        min-width: unset;
        max-height: 30vh;
        padding: 20px;
    }

    .metamock-modal-attr-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .metamock-modal-attr {
        padding: 8px 12px;
    }

    .metamock-modal-attr strong {
        display: inline;
        margin-bottom: 0;
    }
}

/* No results */
.metamock-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.metamock-no-results h3 {
    margin: 0 0 8px;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .metamock-gallery-wrap {
        padding: 12px;
    }

    .metamock-filters {
        padding: 16px;
    }

    .metamock-filter-group {
        min-width: 100%;
        max-width: 100%;
    }

    .metamock-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .metamock-card-content {
        padding: 12px;
    }
}
