/* Mahan v8 category browsing: grocery taxonomy and product sheet. Original styling; no Snapp assets. */
:root{--cat-ink:#292c35;--cat-surface:#f2f3f5;--cat-accent:#d60036}
body:has(.mobile-bottom-nav) .category-showcase{margin:20px 0 26px}
body:has(.mobile-bottom-nav) .category-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
body:has(.mobile-bottom-nav) .category-tile.retail-category-tile{
 display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;
 border-radius:19px;background:#f1f1f2;border:1px solid #ededf0;
 min-width:0;min-height:158px;text-align:right;color:var(--cat-ink);padding:13px 12px 8px;
 box-shadow:none;text-decoration:none;gap:2px
}
.retail-category-title{display:block;font-size:13px;line-height:1.55;font-weight:750;min-height:38px}
.retail-category-count{font-size:10px;color:#6b727f;font-weight:500}
.retail-category-visual{margin-top:auto;width:100%;height:85px;display:flex;align-items:end;justify-content:center;gap:1px;overflow:hidden;position:relative}
.retail-category-visual img{max-width:55%;width:50%;height:85px;object-fit:contain;filter:drop-shadow(0 4px 3px #1d1d1d17)}
.retail-category-visual img:only-child{max-width:85%;width:82%}
.retail-category-icon{font-size:45px;display:block;line-height:1;text-align:center;padding-bottom:12px}
#retailGroupTabs{display:flex;flex-direction:row;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:thin;padding:12px 0 10px;position:sticky;top:74px;z-index:15;background:var(--page-surface,#f6f7fa);direction:rtl}
#retailGroupTabs button{background:none!important;box-shadow:none!important;white-space:nowrap;color:#393d44!important;border:0;border-bottom:3px solid transparent;border-radius:0;min-height:41px;padding:7px 12px;font-weight:700}
#retailGroupTabs button[aria-selected=true]{border-bottom-color:#d60036;color:#ad002b!important}
#retailSubChips{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;align-items:center;scrollbar-width:thin;margin:8px 0 14px;padding-bottom:7px}
#retailSubChips button{border-radius:99px;white-space:nowrap;background:#f0f1f4!important;color:#4c515b!important;border:1px solid #e2e4e8;padding:6px 14px;min-height:36px;font-size:12px}
#retailSubChips button[aria-pressed=true]{background:#222428!important;color:white!important;border-color:#222428}
body:has(.mobile-bottom-nav) #catalog .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
body:has(.mobile-bottom-nav) #catalog .card{position:relative;padding:11px 11px 16px;gap:5px;box-shadow:none;border:1px solid #e9e9eb;border-radius:16px;background:#fff;min-width:0}
body:has(.mobile-bottom-nav) #catalog .card:hover{transform:none}
body:has(.mobile-bottom-nav) #catalog .card .product-photo{min-height:150px;margin:0 0 2px;padding:0 0 24px;border-radius:12px;background:#fff}
body:has(.mobile-bottom-nav) #catalog .card .product-photo img{height:145px;max-height:145px}
body:has(.mobile-bottom-nav) #catalog .card h3{font-size:13px;line-height:1.7;min-height:44px;margin:2px 0;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body:has(.mobile-bottom-nav) #catalog .card p{margin:2px 0;color:#666c78;font-size:11px}
body:has(.mobile-bottom-nav) #catalog .card strong{color:#2e3039;font-size:14px}
body:has(.mobile-bottom-nav) #catalog .card .retail-add{position:absolute;top:108px;left:12px;right:auto;width:39px;height:39px;border:1px solid #e5e8eb!important;border-radius:50%;padding:0;display:grid;place-items:center;background:#fff!important;color:#272b31!important;font-size:27px;box-shadow:0 2px 11px #0002;line-height:1}
body:has(.mobile-bottom-nav) #catalog .card .retail-detail-button{margin-top:5px;background:#f7f8fa!important;color:#313640!important;width:100%;min-height:35px;padding:4px 5px;font-size:11px}
body:has(.mobile-bottom-nav) #catalog .card .image-badge{font-size:10px;inset-inline:3px;background:#fffcf8}
body:has(.mobile-bottom-nav) #productDetails:not([hidden]){position:fixed;z-index:120;bottom:0;left:50%;transform:translateX(-50%);margin:0;width:min(760px,100%);max-height:88dvh;overflow-y:auto;background:#fff;border-radius:22px 22px 0 0;display:grid;grid-template-columns:1fr;gap:8px;padding:18px 20px calc(20px + env(safe-area-inset-bottom));box-shadow:0 0 0 100vmax #0007,0 -9px 35px #0002;border:none}
body.detail-modal-open{overflow:hidden}
body:has(.mobile-bottom-nav) #productDetails .detail-visual{background:#fff;min-height:190px;max-height:38dvh;overflow:hidden}
body:has(.mobile-bottom-nav) #productDetails .detail-visual .product-photo{width:100%;height:min(36dvh,285px);min-height:160px}
body:has(.mobile-bottom-nav) #productDetails .detail-visual .product-photo img{height:calc(min(36dvh,285px) - 25px)}
body:has(.mobile-bottom-nav) #productDetails .detail-copy h2{font-size:18px;text-align:center;margin:8px 0}
body:has(.mobile-bottom-nav) #productDetails .detail-price{color:#262b33;font-size:20px}
body:has(.mobile-bottom-nav) #productDetails #addFromDetails{background:#d60036!important;border-radius:13px;min-height:52px;font-weight:bold}
body:has(.mobile-bottom-nav) #productDetails #closeDetails{min-height:41px;background:#f5f5f7!important;color:#454951!important}
body:has(.mobile-bottom-nav) #productDetails .detail-benefits{margin-top:7px}
@media(max-width:900px){body:has(.mobile-bottom-nav) #catalog .grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
 body:has(.mobile-bottom-nav) .category-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
 body:has(.mobile-bottom-nav) .category-tile.retail-category-tile{min-height:152px;padding:12px 9px 6px;border-radius:15px}
 .retail-category-title{font-size:11px;min-height:42px;line-height:1.5}
 .retail-category-count{font-size:9px}
 .retail-category-visual{height:76px}
 .retail-category-visual img{height:76px}
 #retailGroupTabs{top:0;margin-inline:-12px;padding-inline:12px;background:#fafafa}
 body:has(.mobile-bottom-nav) #catalog .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 body:has(.mobile-bottom-nav) #catalog .card{padding:9px 8px 13px}
 body:has(.mobile-bottom-nav) #catalog .card .product-photo{min-height:145px}
 body:has(.mobile-bottom-nav) #catalog .card .product-photo img{height:137px}
 body:has(.mobile-bottom-nav) #catalog .card .retail-add{top:103px;left:9px}
 body:has(.mobile-bottom-nav) #productDetails:not([hidden]){padding:12px 15px calc(16px + env(safe-area-inset-bottom));border-radius:25px 25px 0 0}
 body:has(.mobile-bottom-nav) #productDetails .detail-benefits{display:none}
}

/* Search-first mobile category landing, following the supplied functional reference. */
.mobile-top-search{display:none}
@media(max-width:700px){
 body:has(.mobile-bottom-nav) .hero{display:none!important}
 .mobile-top-search{display:flex;align-items:center;gap:6px;margin:14px 0 7px;padding:4px 8px;background:#fff;border:1px solid #e4e6ec;border-radius:40px;min-height:54px}
 .mobile-top-search input{flex:1;min-width:0;border:0;background:transparent;box-shadow:none;outline:0!important;font-size:14px;padding:9px 12px}
 .mobile-top-search button{border-radius:50%;width:43px;height:43px;min-width:43px;background:#f0f1f4!important;color:#474c55!important;font-size:29px;line-height:1;padding:0}
 body:has(.mobile-bottom-nav) .category-showcase{margin:12px 0 20px}
 body:has(.mobile-bottom-nav) .category-showcase .heading{padding:0 5px}
 body:has(.mobile-bottom-nav) .category-showcase h2{font-size:20px}
 body:has(.mobile-bottom-nav) .actions{margin:7px 0}
 body:has(.mobile-bottom-nav) .actions button{min-height:30px;padding:5px 11px;font-size:11px}
}

