/**
 * Shop Page Styles
 * Single responsibility: Layout adjustments for shop page only (including RTL fixes).
 *
 * Loaded via getCssPath('shop_page') in `pages/user/shop/shop-home.php`.
 */

/* First section (category): spacing from top of page and rounded corners */
.page-wrapper .wpo-about-section {
    margin-top: 0;
    padding-top: 2.5rem;
}

.page-wrapper .wpo-about-section .wpo-about-wrap {
    -webkit-border-radius: 12px;
    border-radius: 12px;
    overflow: hidden;
}

/* Ensure rounded corners on tablet/mobile (override theme; -webkit for older iOS) */
@media (max-width: 991px) {
    .page-wrapper .wpo-about-section .wpo-about-wrap {
        -webkit-border-radius: 12px;
        border-radius: 12px;
    }
}

/* Category icon box: square with rounded corners, icon fully visible */
.wpo-category-section .category-grids .grid .category-icon-box {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.wpo-category-section .category-grids .grid .category-icon-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* RTL: fix product section horizontal padding */
.rtl-page .wpo-shop-page .wpo-product-section {
    padding-inline-start: 0;
    padding-inline-end: 30px;
}

@media (max-width: 991px) {
    .rtl-page .wpo-shop-page .wpo-product-section {
        padding-inline-end: 0;
    }
}

/* Mobile: products section filter row – prevent cut-off on small screens */
@media (max-width: 767px) {
    .wpo-shop-page .sorting-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .wpo-shop-page .sorting-section ul {
        width: 100%;
        margin: 0;
        justify-content: flex-start;
        gap: 8px;
    }

    .wpo-shop-page .sorting-section ul li {
        flex: 1 1 100%;
        min-width: 0;
        max-width: 100%;
    }

    .wpo-shop-page .sorting-section .select,
    .wpo-shop-page .sorting-section .nice-select {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .wpo-shop-page .sorting-section .nice-select .list {
        max-height: min(60vh, 320px);
        overflow-y: auto;
        left: 0;
        right: auto;
        min-width: 100%;
    }

    .rtl-page .wpo-shop-page .sorting-section .nice-select .list {
        left: auto;
        right: 0;
    }
}

