/* ===================================
   DISCOVERY PAGES STYLES (Grid views)
   =================================== */

.discovery-main {
    padding-top: 80px;
    padding-bottom: var(--spacing-2xl);
    min-height: 100vh;
    background: var(--bg-primary);
}

.discovery-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-sm);
}

.discovery-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
}

.discovery-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    justify-content: center;
}

.filter-group {
    min-width: 150px;
}

.filter-select {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.filter-select:hover {
    border-color: var(--accent);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

@media (max-width: 768px) {
    .filter-group {
        flex: 1;
        min-width: 140px;
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* Reduced from 280px */
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-3xl);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .discovery-header h2 {
        font-size: 1.5rem;
    }

    .discovery-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: var(--spacing-sm);
    }
}

/* Skeleton Grid */
.skeleton-grid {
    display: contents;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    color: var(--accent);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .scroll-top {
        bottom: 80px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}