/* Shared section colors; individual cards and category areas stay white. */
:root { --market-section-background: rgb(233 244 251 / 65%); }
.homepage-banner-section,
#sooq-header + .sh-tabs-wrap,
#sooq-discovery,
#stores-discovery,
.product-grid,
.store-directory-group,
.up-products-grid,
.my-ads-content,
.fv-list {
    background-color: var(--market-section-background) !important;
}
#sooq-discovery .sooq-stacked-slider,
#stores-discovery .sooq-stacked-slider {
    background: transparent !important;
}
.opensooq-categories-grid,
.market-statistics-section {
    background-color: #fff !important;
}
#sooq-discovery { padding-bottom: 0 !important; }

/* Paint the side gutters without changing card widths or page spacing. */
.product-grid,
.store-directory-group,
.up-products-grid,
.my-ads-content,
.fv-list {
    box-shadow: 0 0 0 100vmax var(--market-section-background);
    clip-path: inset(0 -100vmax);
}

/* The sorting area belongs to the same blue store-results section. */
.listing-map-area:has(.search-container) {
    background-color: var(--market-section-background) !important;
}
.listing-map-area:has(.search-container) .store-directory-group {
    background-color: transparent !important;
    box-shadow: none;
    clip-path: none;
}

/* Arabic directory sorting starts at the right edge. */
html[lang="ar"] .listing-map-area .sort-item {
    justify-content: flex-start !important;
}

/* Keep the native sorting control as text and arrow, without a button surface. */
.listing-map-area #select_sort {
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
}
.listing-map-area #select_sort:focus-visible {
    outline: 2px solid var(--market-header-logo-blue, #37a1c5);
    outline-offset: 2px;
}

.market-sort { position: relative; display: inline-block; }
.market-sort-trigger { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; background: transparent; border: 0; color: #343a40; font: inherit; cursor: pointer; }
.market-sort-arrow { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.market-sort-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 4px); min-width: 190px; padding: 5px; border: 1px solid #d5eaf5; border-radius: 10px; background: #fff; box-shadow: 0 6px 18px rgb(55 161 197 / 12%); z-index: 100; }
.market-sort-menu[hidden] { display: none; }
.market-sort-option { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; color: #343a40; font: inherit; text-align: start; white-space: nowrap; cursor: pointer; }
.market-sort-option:hover, .market-sort-option:focus-visible { background: var(--market-section-background); outline: none; }
.market-sort-option[aria-selected="true"] { color: var(--market-header-logo-blue, #37a1c5); background: var(--market-section-background); font-weight: 700; }
.market-sort-trigger:focus-visible { outline: 2px solid var(--market-header-logo-blue, #37a1c5); outline-offset: 3px; border-radius: 3px; }

/* Product directories share the same sorting-area surface. */
.page-main:has(#catSortSelect),
.page-main:has(#mobileSortSelect) {
    background-color: var(--market-section-background);
    box-shadow: 0 0 0 100vmax var(--market-section-background);
    clip-path: inset(0 -100vmax);
}
.page-main:has(#catSortSelect) .product-grid,
.page-main:has(#mobileSortSelect) .product-grid {
    background-color: transparent !important;
    box-shadow: none;
    clip-path: none;
}
.filter-breadcrumb, .subcat-chips-scroll { background-color: #fff; }

/* Paint the management section and its side margins at one consistent tint. */
.my-ads-container {
    background-color: var(--market-section-background) !important;
    box-shadow: 0 0 0 100vmax var(--market-section-background) !important;
    clip-path: inset(0 -100vmax);
}
.my-ads-container #adsContainer {
    background-color: transparent !important;
    box-shadow: none;
    clip-path: none;
}

.desktop-page-bar-ma {
    background-color: var(--market-section-background);
    box-shadow: 0 0 0 100vmax var(--market-section-background);
    clip-path: inset(-32px -100vmax -24px);
}

/* Give the detail-page card sections the same white surface in both directions. */
.store-products-section,
.market-similar-card-section,
.store-detail-similar.sim-stores-section > .store-detail-shell {
    background-color: #fff;
}
