/* Customer discovery: neutral surfaces, real imagery and the existing Al-Baraka green. */
.marketplace-kicker { color: var(--primary-color); font-size: .8rem; font-weight: 700; margin-bottom: .35rem; }
.marketplace-directory .catalog-heading h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.catalog-result-count { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.catalog-search-field { display: flex; align-items: center; gap: .5rem; position: relative; }
.catalog-search-field > .bi { position: absolute; inset-inline-start: 1rem; color: var(--muted); pointer-events: none; }
.catalog-search-field input { padding-inline-start: 2.7rem; background: #fff; min-height: 48px; border-color: #dce4de; border-radius: .75rem; }
.catalog-search-field button { min-height: 48px; border-radius: .75rem; }
.live-search-status { min-height: 1.4rem; font-size: .8rem; color: var(--muted); margin: -.5rem 0 .75rem; }
.live-search-status[data-loading]::before { content: ""; display: inline-block; width: .55rem; height: .55rem; background: var(--primary-color); border-radius: 50%; margin-inline-end: .5rem; }
.store-search-preview { position: fixed; z-index: 1050; overflow-y: auto; padding: 1rem; background: #fff; border: 1px solid #e2e9e5; border-radius: .8rem; box-shadow: 0 14px 35px rgb(20 50 35 / 14%); }
.store-search-preview[hidden], .banner-controls[hidden] { display: none !important; }
.store-search-preview .marketplace-stores { grid-template-columns: minmax(0,1fr); gap: .6rem; }
.store-search-preview .marketplace-store-card { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: .65rem; padding: .65rem 0; }
.store-search-preview .marketplace-store-photo { width: 76px; height: 76px; min-height: 0; }
.store-search-preview .marketplace-store-avatar, .store-search-preview .marketplace-store-description, .store-search-preview .store-card-cue { display: none; }
.store-search-preview .marketplace-store-card > .marketplace-store-copy { padding: 0; }
.store-search-preview .marketplace-store-name { font-size: .95rem; }
.store-search-preview .marketplace-store-actions { margin-top: .3rem; }
.store-search-preview .catalog-empty { padding: 1rem .25rem; }
.store-search-preview .live-search-status { margin: 0 0 .5rem; }
.store-search-preview .catalog-result-count { display: none; }

.marketplace-category-label strong { font-size: .9rem; line-height: 1.6; }
.marketplace-category-label small { font-size: .72rem; color: var(--muted); }

/* Native swipe rails keep their content cue without a scrollbar track. */
:is(.home-page .marketplace-categories, .home-store-rail, .storefront-categories, .marketplace-banner-rail) { scrollbar-width: none; }
:is(.home-page .marketplace-categories, .home-store-rail, .storefront-categories, .marketplace-banner-rail)::-webkit-scrollbar { display: none; }
.marketplace-store-card > .marketplace-store-avatar { display: none; }
:is(.home-store-rail, .marketplace-directory) .marketplace-store-card > .marketplace-store-avatar { display: grid; place-items: center; position: absolute; inset-inline-end: .9rem; inset-block-start: .9rem; width: 64px; height: 64px; border-radius: .7rem; background: #fff; border: 1px solid #edf1ee; color: #718078; font-size: 1.6rem; pointer-events: none; }
.marketplace-store-card > .marketplace-store-avatar img { width: 100%; height: 100%; object-fit: contain; padding: .3rem; border-radius: inherit; }
.marketplace-store-card > .marketplace-store-avatar img + i { display: none; }
.marketplace-store-card > .marketplace-store-avatar img[hidden] + i { display: block; }
.category-rail-shell { position: relative; min-width: 0; }
.category-rail-next { position: absolute; inset-inline-end: -.5rem; inset-block-start: 1.6rem; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #edf1ee; border-radius: 50%; background: #fff; color: #6d7772; box-shadow: 0 2px 8px rgb(15 46 31 / 7%); }
.category-rail-next[hidden], .category-rail-dots[hidden] { display: none; }
.category-rail-next[aria-disabled="true"] { opacity: .4; }
.category-rail-dots { display: flex; justify-content: center; align-items: center; gap: .4rem; padding-block: .35rem; }
.category-rail-dots span { width: 7px; height: 7px; border-radius: 50%; background: #e1ebe5; }
.category-rail-dots .is-current { background: var(--primary-color); }
#category-results .discovery-paging { margin-block: .15rem; }
#category-results[data-category-autoload="true"] .discovery-paging { display: none; }
#category-results .discovery-more { padding-block: .2rem; background: transparent; font-size: .75rem; }
.store-carousel-controls { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 44px; }
.store-carousel-controls[hidden], .store-carousel-pause[hidden] { display: none; }
.store-carousel-dots { display: flex; align-items: center; gap: 5px; }
.store-carousel-dots span { width: 5px; height: 5px; border-radius: 50%; background: #d5dfd8; }
.store-carousel-dots .is-current { width: 15px; border-radius: 4px; background: var(--primary-color); }
.store-carousel-pause { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.1rem; }
.discovery-paging { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; margin-block: .75rem .25rem; }
.discovery-paging a { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .35rem .85rem; font-size: .85rem; text-decoration: none; }
.discovery-more { color: var(--primary-dark); border-radius: 2rem; background: #eaf3ed; }
.discovery-previous { color: var(--muted); }
.discovery-more[aria-disabled="true"] { opacity: .6; cursor: progress; }
.discovery-status:not(.visually-hidden) { color: var(--muted); text-align: center; font-size: .8rem; margin-block: .5rem; }
:is([data-swipe-rail], .home-store-rail, .store-carousel-pause, .category-rail-next, .discovery-paging a):focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.marketplace-stores { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 2rem; align-items: start; }
.marketplace-store-card { position: relative; display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 1rem; padding: 1.15rem .5rem; border: 0; border-bottom: 1px solid #dfe7e2; border-radius: 0; box-shadow: none; overflow: visible; background: transparent; transition: background-color 180ms ease; }
.marketplace-store-photo { position: relative; display: grid; place-items: center; width: 112px; height: 112px; aspect-ratio: 1; background: #e8efea; color: #60806d; border-radius: .75rem; overflow: hidden; font-size: 2rem; }
.marketplace-store-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.marketplace-store-photo.has-logo > img { object-fit: contain; padding: .5rem; background: #fff; }
.marketplace-store-photo > img + i { display: none; }
.marketplace-store-photo > img[hidden] + i { display: block; }
.marketplace-store-card > .marketplace-store-copy { padding: 0; display: flex; flex-direction: column; flex: 1; gap: .35rem; }
.marketplace-store-name { font-size: 1.08rem; line-height: 1.6; margin: 0; order: -1; }
.marketplace-store-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .65rem; min-width: 0; }
.marketplace-store-meta .marketplace-store-category { margin: 0; min-width: 0; max-width: 100%; font-size: .77rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-store-name a { display: inline; min-height: 0; }
.store-card-link::after { content: ""; position: absolute; inset: 0; border-radius: .4rem; z-index: 1; }
.store-card-link:focus-visible { outline: none; }
.store-card-link:focus-visible::after { outline: 3px solid var(--primary-color); outline-offset: 4px; }
.marketplace-store-card [data-independent-control] { position: relative; z-index: 2; }
.marketplace-store-actions { border: 0; padding: .35rem 0 0; margin-top: 0; gap: .5rem; }
.marketplace-store-card :is(.marketplace-store-description, .marketplace-store-location, .store-card-cue) { display: none; }
.marketplace-store-state { padding: 0; background: none !important; font-size: .76rem; }
.marketplace-store-state.is-closed { color: #685c42; }
.marketplace-directory .marketplace-stores { gap: .85rem; }
.marketplace-directory .marketplace-store-card { grid-template-columns: minmax(0,1fr) 30%; align-items: stretch; padding: .5rem; gap: .65rem; background: #fff; border: 1px solid #e9eeea; border-radius: .9rem; }
.marketplace-directory .marketplace-store-photo { grid-area: 1 / 2; width: 100%; height: 100%; min-height: 140px; border-radius: .65rem; }
.marketplace-directory .marketplace-store-card > .marketplace-store-copy { grid-area: 1 / 1; padding: .5rem .25rem; justify-content: center; }
.marketplace-directory .marketplace-store-card:has(> .marketplace-store-avatar) > .marketplace-store-copy { padding-inline-start: 76px; }
.marketplace-directory .marketplace-store-card > .marketplace-store-avatar { inset-inline-start: .85rem; inset-inline-end: auto; }
.marketplace-directory .marketplace-store-state { display: inline-flex; align-items: center; gap: .3rem; width: fit-content; padding: .25rem .55rem; border-radius: 2rem; background: #eaf6ee !important; color: var(--primary-dark); }
.marketplace-directory .marketplace-store-state.is-closed { background: #f5ead8 !important; color: #715b34; }
.marketplace-store-identity { padding: 1.2rem 0; border: 0; border-bottom: 1px solid #e1e8e3; border-radius: 0; background: none; gap: 1rem; }
.marketplace-identity-name { font-size: clamp(1.35rem,2.5vw,2rem); line-height: 1.55; }
.marketplace-store-identity .marketplace-store-state { flex: 0 0 auto; }
.storefront-description { color: #526258; max-width: 60rem; font-size: .95rem; line-height: 1.9; }
.storefront-browse { display: block; padding: .25rem 0 1rem; border: 0; border-radius: 0; background: none; }
.storefront-browse .storefront-product-search { max-width: 640px; margin-bottom: 1rem; }
.storefront-browse .live-search-status { margin: -.6rem 0 .6rem; }
.storefront-categories { gap: .7rem; align-items: flex-start; padding: .25rem .2rem .8rem; }
.storefront-categories .category-chip { position: relative; flex-direction: column; justify-content: flex-start; gap: .45rem; flex: 0 0 96px; width: 96px; max-width: 96px; padding: .55rem .35rem; border: 0; background: transparent; color: var(--text); border-radius: .65rem; font-size: .8rem; text-align: center; line-height: 1.6; transition: background-color 180ms ease, color 180ms ease; }
.storefront-categories .category-chip .category-visual { width: 48px; height: 48px; flex-basis: 48px; border-radius: .8rem; font-size: 1.45rem; }
.storefront-categories .category-chip .category-visual img { width: 100%; height: 100%; object-fit: contain; }
.storefront-categories .category-chip .category-chip-name { font-size: inherit; padding: 0; background: none; border-radius: 0; color: inherit; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.storefront-categories .category-chip .category-chip-count { font-size: .65rem; color: var(--muted); background: none; padding: 0; margin-top: auto; }
.storefront-categories .category-chip[aria-current="page"] { color: var(--primary-dark); background: #eaf3ed; box-shadow: inset 0 -2px var(--primary-color); }
.storefront-categories .category-chip[aria-current="page"] > span:last-child:not(.category-visual) { background: none; color: inherit; }

.catalog-card { border: 0; border-radius: .8rem; background: #fff; box-shadow: 0 2px 8px rgb(15 46 31 / 4%); transition: box-shadow 200ms ease, transform 200ms ease; }
.catalog-image { border: 0; background: #f3f5f2; aspect-ratio: 1.2; border-radius: .8rem .8rem 0 0; overflow: hidden; }
.catalog-image img { padding: .65rem; mix-blend-mode: multiply; }
.catalog-image-link { position: absolute; inset: 0; z-index: 1; }
.catalog-favorite { z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; border: 0; background: #fff; }
.catalog-card-body { padding: .9rem; }
.catalog-product-name { font-size: .98rem; line-height: 1.6; }
.catalog-product-name a { text-decoration: none; }
.catalog-price { font-size: 1.2rem; padding-top: .2rem; }
.catalog-add { border-radius: .6rem; min-height: 44px; font-size: .8rem; }
.catalog-empty { border: 0; background: #f1f5f2; }
.product-detail { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); align-items: start; gap: clamp(1.5rem,4vw,4rem); padding-block: 1.5rem; }
.product-detail-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #f1f4ef; border-radius: 1rem; overflow: hidden; }
.product-detail-media img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; padding: 1.5rem; mix-blend-mode: multiply; }
.product-detail-media [hidden] { display: none; }
.product-detail-copy h1 { font-size: clamp(1.45rem,2.5vw,2.1rem); font-weight: 700; line-height: 1.65; }
.product-detail-description { white-space: pre-wrap; overflow-wrap: anywhere; color: #526258; line-height: 1.9; }
.product-detail-actions { padding-block: 1.1rem; border-top: 1px solid #e2e9e3; margin-top: 1.5rem; }
.product-detail-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 200px; gap: .6rem; }
.weight-config-page { padding-block: 1.5rem !important; }
.weight-config-page .card { background: #fff; }
.weight-config-page .weight-config-media { height: 100%; min-height: 240px; max-height: 520px; border-radius: 0; }

.marketplace-promotions { max-width: 960px; min-width: 0; margin: 1.5rem auto 2rem; }
.marketplace-banner-rail { display: flex; gap: 1rem; overflow-x: auto; border-radius: 1.1rem; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; box-shadow: 0 6px 24px rgb(34 70 46 / 8%); }
.marketplace-banner { flex: 0 0 100%; min-width: 0; display: block; aspect-ratio: 3; border-radius: 1.1rem; overflow: hidden; background: #edf3ed; scroll-snap-align: start; }
.marketplace-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.marketplace-banner-rail.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.banner-controls { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .35rem; }
.banner-dots { display: flex; align-items: center; }
.banner-dots button, .banner-pause { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #526954; border-radius: 50%; }
.banner-dots span { width: 6px; height: 6px; border-radius: 50%; background: #c4d2c6; transition: width .25s ease, background-color .25s ease; }
.banner-dots [aria-current="true"] span { width: 18px; border-radius: 8px; background: var(--primary-color); }
.banner-dots button:focus-visible, .banner-pause:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.banner-pause[hidden], [data-banner-picker] [hidden] { display: none !important; }
.banner-admin-thumbnail { object-fit: contain; background: #f1f4ef; }
.banner-admin-preview { display: block; max-width: 600px; width: 100%; height: auto; }

:is(.store-card-link, .discovery-link, .category-chip, .catalog-image-link, .catalog-add, .catalog-favorite, .marketplace-banner, .marketplace-banner-rail):focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.store-card-link:focus-visible { outline: none; }
@media (hover: hover) and (pointer: fine) {
    .marketplace-store-card:hover { background: rgb(255 255 255 / 75%); }
    .catalog-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(15 46 31 / 10%); }
    .storefront-categories .category-chip:hover { background: #edf4ee; }
    .marketplace-categories .discovery-link:hover { background: #edf4ee; }
}
@media (max-width: 767.98px) {
    .marketplace-category-label strong { font-size: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
    .marketplace-category-label small { font-size: .65rem; }
    .marketplace-stores { grid-template-columns: minmax(0,1fr); gap: 0; }
    .marketplace-store-card { grid-template-columns: 88px minmax(0,1fr); gap: .85rem; padding: 1rem .2rem; }
    .marketplace-store-photo { width: 88px; height: 88px; border-radius: .65rem; font-size: 1.7rem; }
    .marketplace-store-name { font-size: 1rem; }
    .marketplace-directory .marketplace-store-card > .marketplace-store-avatar { width: 46px; height: 46px; font-size: 1.35rem; }
    .marketplace-directory .marketplace-store-card:has(> .marketplace-store-avatar) > .marketplace-store-copy { padding-inline-start: 54px; }
    .marketplace-directory .marketplace-store-name { font-size: .88rem; }
    .marketplace-directory .marketplace-store-photo { min-height: 120px; }
    .marketplace-directory .marketplace-store-state { font-size: .65rem; }
    .marketplace-store-identity { padding-inline: 0; }
    .storefront-categories .category-chip { flex-basis: 88px; width: 88px; max-width: 88px; }
    .catalog-grid { gap: .75rem; }
    .catalog-card-body { padding: .65rem; }
    .catalog-product-name { font-size: .87rem; }
    .catalog-price { font-size: 1.05rem; }
    .catalog-add { min-height: 44px; font-size: .76rem; }
    .product-detail { grid-template-columns: minmax(0,1fr); gap: 1.25rem; }
    .product-detail-media { max-height: 390px; }
    .product-detail-actions .btn { width: 100%; }
    .marketplace-promotions { margin-block: 1rem 1.5rem; }
    .marketplace-banner, .marketplace-banner-rail { border-radius: .9rem; }
    .marketplace-promotions { margin-block: 1.25rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .marketplace-store-card, .catalog-card, .category-chip, .discovery-link { transition: none; }
    .marketplace-store-card:hover, .catalog-card:hover { transform: none; }
    .marketplace-banner-rail, .storefront-categories, .home-store-rail, [data-swipe-rail] { scroll-behavior: auto; }
    .banner-dots span { transition: none; }
}
