/* ==========================================================================
   EASY3D — Catalog Stylesheet (Page Layout, Sorting Dropdown & Mobile Bar)
   ========================================================================== */

.catalog-page-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    box-sizing: border-box;
}

/* Main Catalog Area & Top Bar */
.catalog-main {
    flex: 1;
    min-width: 0;
}

.catalog-top-bar {
    position: relative;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.catalog-count-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.catalog-count-num {
    color: var(--accent-cyan);
    font-weight: 700;
}

.catalog-top-actions {
    position: relative;
    z-index: 501;
}

/* Sorting Dropdown (Pure Deep Black Theme on PC & Mobile) */
.custom-dropdown {
    position: relative;
    z-index: 502;
}

.custom-dropdown.open {
    z-index: 999999 !important;
}

.custom-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 205px;
    background: #080a0f !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 0.45rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 0, 0, 0.8) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.custom-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.custom-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    outline: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.custom-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.05);
}

.custom-dropdown .dropdown-item.active {
    background: rgba(0, 229, 255, 0.12);
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.25);
    font-weight: 700;
}

.custom-dropdown .dropdown-item .item-icon {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-left: 0.5rem;
}

/* Mobile Controls & Drawer */
.catalog-mobile-controls,
.mobile-filter-trigger-btn {
    display: none;
}

/* ==========================================================================
   Mobile & Tablet Responsive Styling
   ========================================================================== */
@media (max-width: 992px) {
    .catalog-page-container {
        padding: 0 0.85rem 3.5rem;
    }
    .catalog-sidebar {
        display: none;
    }
    .catalog-top-bar {
        display: none;
    }

    .catalog-mobile-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 1.2rem;
        position: sticky;
        top: 70px;
        z-index: 100;
        background: #080a0f !important;
        background-image: none !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.6rem;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-filter-trigger-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 38px;
        padding: 0 1rem;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        color: #fff;
        font-family: var(--font-main);
        font-size: 0.84rem;
        font-weight: 700;
        cursor: pointer;
    }

    .mobile-filter-trigger-btn.has-filters {
        border-color: var(--accent-cyan);
        color: var(--accent-cyan);
    }
}
