/* Mobile catalog presentation. Existing carousel, tenant data and ordering handlers are reused. */
.mobile-catalog-theme .catalog-home-categories { scrollbar-width: none; }
.mobile-catalog-theme .catalog-home-categories::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
    .mobile-catalog-theme .order-edit-search { margin-inline: 4px; }
    .mobile-catalog-theme .catalog-search-slot input { height: 40px; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
    .mobile-catalog-theme .catalog-search-slot [data-product-search-submit] { font-size: 14px; }
    .mobile-catalog-theme body,
    .mobile-catalog-theme #content,
    .mobile-catalog-theme #content > .content-wrap,
    .mobile-catalog-theme .catalog-mobile { background: #f8f9fa !important; color: #142638; }
    .mobile-catalog-theme .catalog-mobile { padding-inline: 16px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
    .mobile-catalog-theme .catalog-detail .catalog-header,
    .mobile-catalog-theme .catalog-products.mobile-storefront-zero,
    .mobile-catalog-theme .catalog-products .mobile-zero-products-area,
    .mobile-catalog-theme .catalog-products .mobile-zero-products,
    .mobile-catalog-theme .catalog-products .mobile-zero-categories { background: #f8f9fa !important; background-image: none !important; }
    .mobile-catalog-theme .catalog-header { margin-bottom: 14px; gap: 14px; }
    .mobile-catalog-theme .catalog-brand { gap: 10px; }
    .mobile-catalog-theme .catalog-brand img { width: 48px; height: 48px; background: #fff; border: 1px solid #edf0eb; }
    .mobile-catalog-theme .catalog-brand strong { font-size: 19px; font-weight: 750; color: #142638; }
    .mobile-catalog-theme .catalog-brand small { color: #7b837e; font-size: 11px; line-height: 1.8; }
    .mobile-catalog-theme .catalog-icon { color: #142638; border-radius: 12px; }
    .mobile-catalog-theme .catalog-search-slot { margin-bottom: 22px; min-height: 52px; }
    .mobile-catalog-theme .catalog-search-slot .footer-product-search-box { min-height: 52px; padding: 6px 10px !important; border: 1px solid #e7eae5 !important; border-radius: 18px !important; background: #fff !important; box-shadow: 0 3px 12px #21362a05 !important; }
    .mobile-catalog-theme .catalog-search-slot input { font-size: 13px !important; background: transparent !important; color: #142638; }
    .mobile-catalog-theme .catalog-search-slot [data-product-search-submit] { display: grid; place-items: center; min-width: 38px; min-height: 38px; background: #edf7f1 !important; color: #08765a !important; border-radius: 12px; box-shadow: none !important; }
    .mobile-catalog-theme .catalog-search-slot .footer-product-search-results { border-radius: 14px; border: 1px solid #e5ece7; background: #fff; box-shadow: 0 10px 24px #14382712; }
    .mobile-catalog-theme .catalog-mobile h2 { margin-bottom: 14px; font-size: 21px; font-weight: 750; color: #142638 !important; }
    .mobile-catalog-theme .catalog-carousel-wrap { height: 270px; }
    .mobile-catalog-theme .catalog-category { height: 238px; padding: 14px; gap: 10px; border: 1px solid #ffffffc9; border-radius: 26px; box-shadow: 0 5px 18px #2347340a; }
    .mobile-catalog-theme .catalog-category.is-selected { box-shadow: 0 8px 20px #23473410; }
    .mobile-catalog-theme .catalog-category.tone-0 { background: #fbf0dd; }
    .mobile-catalog-theme .catalog-category.tone-1 { background: #ebf0de; }
    .mobile-catalog-theme .catalog-category.tone-2 { background: #f5e9e5; }
    .mobile-catalog-theme .catalog-category.tone-3 { background: #ebe7f5; }
    .mobile-catalog-theme .catalog-category.tone-4 { background: #f4f1d9; }
    .mobile-catalog-theme .catalog-category-image { width: 100%; height: 162px; flex: 0 0 162px; border: 0; border-radius: 16px; background: transparent; box-shadow: none; transform: none !important; }
    .mobile-catalog-theme .catalog-category-image img { object-fit: contain; border-radius: 12px; }
    .mobile-catalog-theme .catalog-category > strong { font-size: 17px; font-weight: 750; color: #142638; }
    .mobile-catalog-theme .catalog-wheel-arrow { width: 40px; height: 40px; color: #142638; box-shadow: 0 3px 12px #23473412; }
    .mobile-catalog-theme .catalog-brands { margin-top: 12px; }
    .mobile-catalog-theme .catalog-brands-list { grid-auto-columns: calc((100% - 20px)/3); gap: 10px; padding-bottom: 8px; scrollbar-width: none; }
    .mobile-catalog-theme .catalog-brands-list::-webkit-scrollbar { display: none; }
    .mobile-catalog-theme .catalog-brand-item { min-height: 86px; gap: 5px; border: 1px solid #e9ece6; border-radius: 16px; background: #fff; box-shadow: 0 4px 12px #23473405; }
    .mobile-catalog-theme .catalog-brand-item img { width: 100%; height: 43px; object-fit: contain; }
    .mobile-catalog-theme .catalog-brand-item span { font-size: 10px; line-height: 1.4; color: #6c7c72; }
    .mobile-catalog-theme .catalog-new-products { margin-top: 24px; }
    .mobile-catalog-theme .catalog-new-products > h2 { margin-bottom: 4px; }
    .mobile-catalog-theme .catalog-section-caption { margin: 0 0 16px; font-size: 12px; color: #7a857c; }
    .mobile-catalog-theme .catalog-new-products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-inline: -4px; align-items: stretch; }
    .mobile-catalog-theme .catalog-products .mobile-zero-products.active { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 10px !important; padding: 0 !important; margin-inline: -4px !important; align-items: stretch; }
    .mobile-catalog-theme .catalog-products .mobile-zero-products > .mobile-zero-product { display: flex !important; flex-direction: column; align-items: stretch !important; min-width: 0; gap: 2px; padding: 0 !important; border: 1px solid #eceee8 !important; border-radius: 14px !important; background: #fff !important; box-shadow: 0 4px 14px #23473405 !important; }
    .mobile-catalog-theme .catalog-products .category-load-more-wrap, .mobile-catalog-theme .catalog-products .category-products-placeholder { grid-column: 1 / -1; }
    .mobile-catalog-theme .catalog-new-products-grid > :is(.catalog-new-product, .catalog-products .mobile-zero-product) { gap: 2px; padding: 0 !important; border: 1px solid #eceee8 !important; border-radius: 14px !important; background: #fff !important; box-shadow: 0 4px 14px #23473405 !important; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-product-image { position: relative; width: 100% !important; margin: 0 !important; height: 200px !important; min-height: 200px !important; max-height: 200px !important; aspect-ratio: auto !important; flex: 0 0 200px; border-radius: 14px 14px 0 0 !important; background: #fff !important; overflow: hidden; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-product-image img { position: absolute !important; inset: 0; display: block; width: 100% !important; height: 100% !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; padding: 0; box-sizing: border-box; object-fit: cover !important; object-position: center; border-radius: 14px 14px 0 0; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-view-image { width: 32px; height: 32px; top: 6px; left: 6px; border: 1px solid #eff0ed; background: #fff !important; color: #142638 !important; box-shadow: 0 2px 8px #2347340a; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) h4 { display: block !important; flex: 0 0 auto; width: auto !important; height: auto !important; min-height: 0 !important; margin: 0 12px !important; padding: 0 !important; color: #142638 !important; font-size: 16px !important; font-weight: 700; line-height: 1.4; text-align: start !important; white-space: normal !important; overflow-wrap: anywhere; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-product-image + h4 { margin-top: 2px !important; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-price { display: block !important; align-self: stretch !important; width: auto !important; max-width: none !important; margin: 0 12px 2px !important; text-align: start !important; line-height: 1.3; min-height: 22px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; color: #08765a !important; font-size: 17px !important; font-weight: 750; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-add { margin: auto 12px 8px !important; flex: 0 0 auto; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-price span { color: #7a857c; font-size: 10px; font-weight: 400; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-price > span[data-product-unit="قطعة"] { display: none !important; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-add { display: flex; align-items: center; justify-content: center; gap: 7px; width: calc(100% - 24px) !important; min-width: 0 !important; max-width: calc(100% - 24px) !important; min-height: 44px; padding: 8px !important; border: 1px solid #08765a !important; border-radius: 11px !important; background: #08765a !important; color: #fff !important; box-shadow: none !important; font-size: 12px !important; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-add :is(span,i) { color: inherit !important; }
    .mobile-catalog-theme :is(.catalog-new-product, .catalog-products .mobile-zero-product) .mobile-zero-add:disabled { opacity: .5; border-color: #c5cfc8 !important; background: #eaf0ec !important; color: #67776c !important; }
    .mobile-catalog-theme .catalog-load-more { min-height: 46px; border-radius: 14px; color: #08765a; border-color: #dce8df; }
    .mobile-catalog-theme .mobile-shop-tabs { padding: 8px 10px max(8px,env(safe-area-inset-bottom)) !important; border-radius: 20px 20px 0 0 !important; background: #fff !important; box-shadow: 0 -5px 20px #23473406 !important; }
    .mobile-catalog-theme .mobile-shop-tabs :is(a,button) { min-height: 54px; color: #142638 !important; border-radius: 16px !important; background: transparent !important; }
    .mobile-catalog-theme .mobile-shop-tabs :is(a,button) :is(i,span) { color: #142638 !important; }
    .mobile-catalog-theme .mobile-shop-tabs #mobile-shop-menu-btn { border-radius: 16px !important; background: #e2f5e9 !important; color: #08765a !important; }
    .mobile-catalog-theme .mobile-shop-tabs #mobile-shop-menu-btn :is(i,span) { color: #08765a !important; }
    .mobile-catalog-theme .mobile-shop-tabs b { background: #08765a !important; }
    .mobile-catalog-theme .store-pwa-install { position: fixed !important; top: auto !important; right: auto !important; left: 12px !important; bottom: calc(94px + env(safe-area-inset-bottom)) !important; margin: 0 !important; min-height: 40px; max-width: min(180px,calc(100% - 24px)) !important; padding: 0 12px; background: #08765a; box-shadow: 0 4px 16px #183b2924 !important; border-radius: 14px !important; font-size: 11px; }
    .mobile-catalog-theme .catalog-mobile :is(a,button):focus-visible { outline: 2px solid #08765a; outline-offset: 3px; }
}

@media (max-width: 768px) {
    .mobile-catalog-theme .catalog-products.mobile-storefront-zero,
    .mobile-catalog-theme .catalog-products .mobile-zero-products-area {
        overflow: visible !important;
    }
    .mobile-catalog-theme .catalog-new-products-grid,
    .mobile-catalog-theme .catalog-products .mobile-zero-products.active {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: calc(100% + 20px) !important;
        max-width: none !important;
        gap: 8px !important;
        margin-inline: -10px !important;
    }
}

@media (max-width: 768px) {
    .mobile-catalog-theme .catalog-home-categories { display: flex; flex-wrap: nowrap; gap: 16px; overflow-x: auto; padding: 8px 2px 16px; scroll-snap-type: x proximity; }
    .mobile-catalog-theme .catalog-home-category { display: flex; flex: 0 0 84px; flex-direction: column; align-items: center; gap: 8px; color: #142638; text-align: center; scroll-snap-align: start; text-decoration: none; }
    .mobile-catalog-theme .catalog-home-category-image { display: block; width: 84px; height: 84px; padding: 5px; box-sizing: border-box; border: 2px solid #cdd7d2; border-radius: 50%; background: #fff; box-shadow: 0 5px 14px #2347340a; overflow: hidden; }
    .mobile-catalog-theme .catalog-home-category-image img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
    .mobile-catalog-theme .catalog-home-category strong { font-size: 13px; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere; }
}

@media (max-width: 768px) {
    .mobile-catalog-theme .mobile-zero-product { cursor: pointer; overflow: hidden; }
    .mobile-catalog-theme .mobile-zero-product:focus-visible { outline: 2px solid #08765a; outline-offset: 3px; }
}

@media (max-width: 768px) {
    .mobile-catalog-theme .catalog-root-navigation { margin-bottom: 12px; }
    .mobile-catalog-theme .catalog-home-category.is-current { color: #08765a; }
    .mobile-catalog-theme .catalog-home-category.is-current .catalog-home-category-image { border-color: #08765a; box-shadow: 0 0 0 3px #e5f5ed; }
}
