/* =========================================================
   PRODUCT LISTING PAGE
========================================================= */

.product-listing-page {
    padding: 40px 0 70px;

    background: #f9f9f9;
}


/* =========================================================
   PAGE HEADER
========================================================= */

.page-header {
    text-align: center;

    margin-bottom: 42px;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;

    color: #111;

    letter-spacing: -1px;

    margin-bottom: 14px;
}

.page-subtitle {
    max-width: 700px;

    margin: 0 auto;

    color: #666;

    line-height: 1.7;

    font-size: 0.96rem;
}


/* =========================================================
   LAYOUT
========================================================= */

.product-listing-container {
    display: flex;

    gap: 30px;
}

.product-grid-section {
    flex: 1;

    min-width: 0;
}


/* =========================================================
   GRID HEADER
========================================================= */

.product-grid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #fff;

    padding: 18px 20px;

    border-radius: 18px;

    margin-bottom: 28px;

    box-shadow:
        0 2px 14px rgba(0, 0, 0, 0.04);
}

.product-count {
    font-size: 14px;

    color: #666;

    line-height: 1.5;
}


/* =========================================================
   SORT
========================================================= */

.sort-dropdown {
    flex-shrink: 0;
}

.sort-dropdown select {
    height: 44px;

    border-radius: 12px;

    border: 1px solid #e4e4e4;

    padding: 0 14px;

    font-size: 14px;

    cursor: pointer;

    background: #fff;

    box-shadow: none !important;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.sort-dropdown select:focus {
    border-color: #111;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   MOBILE SEARCH
========================================================= */

.mobile-collection-search {
    display: none;

    margin-bottom: 18px;
}

.mobile-search-wrapper {
    position: relative;
}

.mobile-search-wrapper input {
    width: 100%;
    height: 48px;

    border: 1px solid #e4e4e4;

    border-radius: 999px;

    padding: 0 48px 0 18px;

    background: #fff;

    font-size: 14px;

    outline: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.mobile-search-wrapper input:focus {
    border-color: #111;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.06);
}

.mobile-search-wrapper button {
    position: absolute;

    top: 50%;
    right: 16px;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    cursor: pointer;

    color: #666;

    font-size: 14px;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;
}

.product-card-wrapper {
    min-width: 0;
}


/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    display: flex;
    justify-content: center;

    margin-top: 55px;
}

.pagination-list {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;
}

.pagination-item {
    min-width: 42px;
    height: 42px;

    padding: 0 14px;

    border-radius: 12px;

    background: #fff;

    border: 1px solid #e8e8e8;

    color: #555;

    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        all 0.25s ease;
}

.pagination-item:hover {
    background: #111;

    color: #fff;
}

.pagination-item.active {
    background: #111;

    color: #fff;

    border-color: #111;

    pointer-events: none;
}


/* =========================================================
   MOBILE FILTER BUTTON
========================================================= */

.mobile-filter-toggle {
    display: none;

    width: 100%;
    height: 48px;

    border: none;

    border-radius: 14px;

    background: #111;

    color: #fff;

    font-weight: 600;

    margin-bottom: 16px;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.mobile-filter-toggle:hover {
    opacity: 0.96;
}


/* =========================================================
   NO PRODUCTS
========================================================= */

.no-products {
    background: #fff;

    border-radius: 24px;

    padding: 70px 20px !important;

    text-align: center;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.04);
}

.no-products h3 {
    margin-bottom: 10px;

    color: #111;
}

.no-products p {
    color: #666;

    margin-bottom: 24px;
}


/* =========================================================
   LARGE TABLET
========================================================= */

@media (max-width: 1200px) {

    .product-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 992px) {

    .product-listing-container {
        flex-direction: column;
    }

    .filter-sidebar {
        display: none;

        width: 100%;
    }

    .filter-sidebar.show {
        display: block;
    }

    .mobile-filter-toggle {
        display: block;
    }

    .mobile-collection-search {
        display: block;
    }

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .product-listing-page {
        padding: 24px 0 50px;
    }

    .page-header {
        margin-bottom: 28px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 14px;

        line-height: 1.7;
    }

    .product-grid-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 16px;

        padding: 16px;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-dropdown form,
    .sort-dropdown select {
        width: 100%;
    }

    .product-grid {
        gap: 16px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 576px) {

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .pagination {
        margin-top: 40px;
    }

}


/* =========================================================
   EXTRA SMALL
========================================================= */

@media (max-width: 420px) {

    .product-grid {
        gap: 10px;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .product-grid-header {
        padding: 14px;
    }

}