@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
  font: 16px 'Vazirmatn', Tahoma, Arial, sans-serif;
  color: #244234;
  background: #f6f7f2;
  color-scheme: light;
  --green: #24563d;
  --orange: #dd7247;
  --column-width: calc((100vw - 48px) / 3);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; color: inherit; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #dfa05b; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.storefront { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 72px minmax(0, 1fr) 120px 70px; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(8px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left)); background: #fafbf7; border-bottom: 1px solid #d7dfd2; z-index: 3; min-width: 0; }
.quick-access { display: flex; gap: 8px; min-width: 0; }
.category-link { display: flex; align-items: center; gap: 8px; padding: 10px 17px; border-radius: 11px; font-size: .875rem; color: #6c7867; border: 1px solid transparent; white-space: nowrap; }
.category-link .icon { width: 22px; height: 22px; }
.category-link.is-active { background: #e8efe1; color: #244b34; border-color: #d3dfc8; font-weight: 700; }
.category-link:hover { background: #edf2e7; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.6rem; font-weight: 900; }
.brand .icon { width: 28px; height: 28px; }

/* Background scenery stays in the viewport. The products form a separate moving plane. */
.store-interior { position: relative; min-height: 0; min-width: 0; overflow: hidden; background: #dee2da; }
.shelf-scenery { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shelf-backdrop { position: absolute; inset: 0 -45px; background-size: auto 100%; background-position: center; background-repeat: repeat-x; opacity: 0; will-change: transform, opacity; }
[data-background="grocery"] { background-image: url('backgrounds/grocery-v2.png'); opacity: 1; }
[data-background="dairy"] { background-image: url('backgrounds/dairy-v2.png'); }
[data-background="produce"] { background-image: url('backgrounds/produce-v2.png'); }
.scene-light { position: absolute; inset: 0; background: linear-gradient(90deg, #253c3b0a, transparent 13% 87%, #253c3b0a), linear-gradient(#fff2, transparent 18%); }
.aisle { position: relative; height: 100%; display: flex; direction: rtl; padding: 0 24px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: 24px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.aisle::-webkit-scrollbar { display: none; }
.aisle.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.category-bay { flex: 0 0 calc(var(--column-width) * 3); min-width: 0; height: 100%; }
.product-grid { display: grid; grid-auto-flow: column; grid-template-columns: repeat(3, var(--column-width)); grid-template-rows: 43% 39%; height: 100%; }
.product { position: relative; min-width: 0; min-height: 0; scroll-snap-align: start; }
.product-visual { position: absolute; top: 18px; bottom: 0; left: 20px; right: 20px; cursor: grab; perspective: 900px; }
.product:nth-child(even) .product-visual { top: 88px; }
.product-visual::after { content: ''; position: absolute; height: 13px; bottom: -4px; left: 20%; right: 20%; border-radius: 50%; background: #16251e40; filter: blur(6px); z-index: 0; }
.product-photo { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; position: relative; z-index: 1; user-select: none; -webkit-user-drag: none; filter: drop-shadow(3px 4px 2px #17201922); transform-origin: center bottom; }
.product-photo.photo-white { mix-blend-mode: multiply; }
.product-photo.photo-padded { object-fit: cover; }
.discount-tag { position: absolute; top: 8px; right: 2px; background: #e46e43; color: white; padding: 5px 9px; border-radius: 5px 5px 12px 5px; font-size: .875rem; font-weight: 800; z-index: 2; transform: rotate(5deg); box-shadow: 1px 4px 9px #5c37231f; }
.price-ticket { position: absolute; top: calc(100% + 9px); left: 9px; right: 9px; max-width: 270px; margin-inline: auto; min-height: 69px; padding: 6px 10px 7px; background: linear-gradient(#fffef9, #f4f5ed); border: 1px solid #cdd2c6; box-shadow: 1px 3px 5px #27312824; border-radius: 3px; z-index: 3; }
.price-ticket::before { content: ''; position: absolute; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: #c5ccc1; top: -1px; left: calc(50% - 13px); }
.product h3 { font-size: .875rem; font-weight: 600; line-height: 1.6; margin: 0 0 2px; }
.product-unit { font-size: .75rem; font-weight: 400; color: #818a79; margin-inline-start: 4px; }
.ticket-bottom { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.price-stack { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.old-price { font-size: .75rem; color: #9b9d90; text-decoration: line-through; }
.current-price { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.current-price small { font-size: .75rem; color: #73816b; font-weight: 400; }
.add-button { display: grid; place-items: center; border: 1px solid #b8c8ab; background: #fafcf4; color: #2b583e; width: 31px; height: 31px; padding: 0; border-radius: 7px; font-size: 1.4rem; line-height: 1; }
.add-button:hover { color: white; background: #2b583e; }
.quantity-control { display: flex; align-items: center; border: 1px solid #bac7b0; border-radius: 7px; background: #fbfcf8; }
.quantity-control button { height: 30px; width: 25px; border: 0; background: none; padding: 0; font-size: 1.05rem; }
.quantity-control span { font-size: .875rem; min-width: 16px; text-align: center; font-weight: 600; }
.aisle-progress { position: absolute; bottom: 10px; left: 50%; width: 100px; height: 3px; background: #34543826; transform: translateX(-50%); border-radius: 4px; overflow: hidden; pointer-events: none; }
.aisle-progress span { display: block; width: 33.333%; height: 100%; border-radius: 4px; background: #3e6544; }

/* The shopping trolley remains with the viewer while the shelf plane passes behind it. */
.cart-dock { position: relative; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(90deg, transparent 0 140px, #b7beb119 141px 142px), linear-gradient(#e0e4da, #f1f3eb 60%, #f7f8f2); z-index: 4; border-top: 1px solid #c9d1c2; box-shadow: 0 -6px 18px #3b4d2f0a; }
.cart-preview { display: flex; align-items: center; justify-content: center; gap: 26px; width: min(650px, 100%); height: 100%; padding: 0 16px; border: 0; background: transparent; text-align: right; }
.basket-visual { position: relative; display: block; width: 295px; height: 118px; flex-shrink: 0; filter: drop-shadow(0 7px 3px #26392b19); transform-origin: center bottom; }
.basket-back, .basket-front { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.basket-back { z-index: 0; }
.basket-front { z-index: 3; }
.basket-contents { position: absolute; left: 18%; right: 18%; top: 10%; bottom: 22%; z-index: 2; }
.basket-item { position: absolute; width: 58px; height: 78px; bottom: 0; object-fit: contain; object-position: bottom center; filter: drop-shadow(1px 2px 1px #243d2920); }
.basket-overflow { position: absolute; right: -12px; bottom: 9px; background: #345f42; color: white; border: 2px solid #e5ebdc; border-radius: 50%; padding: 3px 6px; font-size: .75rem; z-index: 3; }
.basket-summary { display: flex; flex-direction: column; gap: 5px; min-width: 115px; }
.basket-summary strong { font-size: .875rem; font-weight: 700; }
#basket-quantity { font-size: .75rem; font-weight: 400; color: #7b8972; margin-inline-start: 6px; }
#basket-total { font-size: .875rem; font-weight: 600; }
.basket-open-label { font-size: .75rem; color: #7d8d70; }
.flying-product { position: fixed; z-index: 1000; pointer-events: none; object-fit: contain; transform-origin: center; filter: drop-shadow(3px 7px 4px #20382533); }

.bottom-nav { display: flex; align-items: stretch; justify-content: center; gap: 24px; padding: 5px max(16px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: #fafbf7; border-top: 1px solid #d9dfd1; z-index: 5; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 94px; padding: 4px 5px; border: 0; background: none; border-radius: 10px; color: #8b9583; font-size: .875rem; }
.nav-item.is-active, .nav-item:hover { background: #e9f0e2; color: #24523a; }
.nav-icon-wrap { position: relative; height: 24px; }
.cart-count { position: absolute; top: -5px; right: -11px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 50%; background: #df7348; color: white; font-size: .75rem; border: 1px solid #fafbf7; }

dialog { width: min(470px, calc(100% - 28px)); max-height: 85vh; max-height: 85dvh; padding: 23px; overflow: auto; border: 1px solid #dbe2d2; border-radius: 18px; background: #fbfcf8; color: #294333; box-shadow: 0 20px 70px #10241940; overscroll-behavior: contain; }
dialog::backdrop { background: #15281d70; backdrop-filter: blur(5px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dialog-header h2 { font-size: 1.15rem; margin: 0; }
.close-button { border: 0; display: grid; place-items: center; background: #eaf0e4; border-radius: 50%; width: 33px; height: 33px; flex-shrink: 0; }
.close-button .icon { width: 18px; height: 18px; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid #ccd7c0; border-radius: 9px; padding: 11px; background: white; }
.search-field .icon { width: 20px; height: 20px; color: #839278; }
.search-field input { min-width: 0; width: 100%; border: 0; background: transparent; color: #294333; font-size: 1rem; }
.result-list { margin-top: 15px; }
.result-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid #e5eadd; background: transparent; text-align: right; }
.result-item img { width: 56px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.result-copy { flex: 1; min-width: 0; }
.result-copy strong { display: block; font-size: .875rem; font-weight: 600; line-height: 1.8; }
.result-copy small { font-size: .75rem; color: #86917a; }
.result-price { font-size: .875rem; white-space: nowrap; }
.result-price small { font-size: .75rem; }
.result-price del { display: block; font-size: .75rem; color: #979f8c; }
.result-item:hover { background: #f0f4e9; }
.empty-state { padding: 25px 0; color: #7e8b70; line-height: 2; text-align: center; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #e5eadd; }
.cart-row img { width: 47px; height: 55px; object-fit: contain; mix-blend-mode: multiply; }
.cart-row > div:first-of-type { flex: 1; min-width: 0; }
.cart-row h3 { font-size: .875rem; font-weight: 600; margin: 0 0 6px; }
.cart-row p { font-size: .75rem; color: #79876d; margin: 0; }
.cart-summary { display: grid; gap: 12px; margin: 22px 0; }
.cart-summary > div { display: flex; justify-content: space-between; font-size: .875rem; gap: 12px; }
.cart-summary .savings { color: #6c873e; }
.dialog-note { color: #829074; line-height: 1.9; font-size: .875rem; }
.primary-button { background: var(--green); color: white; border: 0; border-radius: 9px; width: 100%; padding: 13px; font-size: .875rem; font-weight: 600; }
.branch-symbol { height: 100px; display: grid; place-items: center; background: repeating-linear-gradient(0deg, transparent 0 35px, #fff8 36px 43px, transparent 44px 70px), repeating-linear-gradient(90deg, #e4ebd9 0 45px, #fff8 46px 54px, #eef3e8 55px 100px); border-radius: 10px; }
.branch-symbol .icon { width: 48px; height: 48px; }
.toast { position: fixed; bottom: calc(95px + env(safe-area-inset-bottom)); left: 50%; width: max-content; max-width: calc(100% - 36px); transform: translate(-50%, 10px); padding: 10px 18px; background: #234b38; color: white; box-shadow: 0 5px 20px #18352030; border-radius: 9px; font-size: .875rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 10; text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 80px 15px auto; padding: 15px; background: #ffe6b8; border-radius: 10px; text-align: center; }


/* Two columns x two levels on phones; three columns x two levels on wide screens. */
@media (max-width: 900px) {
  :root { --column-width: calc((100vw - 24px) / 2); }
  .storefront { grid-template-rows: 64px minmax(0, 1fr) 104px 68px; }
  .topbar { padding-inline: max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-left)); gap: 7px; }
  .quick-access { gap: 2px; }
  .category-link { padding: 9px 8px; gap: 5px; border-radius: 9px; }
  .category-link .icon { width: 19px; height: 19px; }
  .brand { gap: 4px; font-size: 1.2rem; }
  .brand .icon { width: 22px; height: 22px; }
  .aisle { padding-inline: 12px; scroll-padding-inline: 12px; }
  .product-visual { left: 13px; right: 13px; top: 15px; }
  .product:nth-child(even) .product-visual { top: 84px; }
  .price-ticket { left: 4px; right: 4px; padding: 5px 7px; min-height: 69px; }
  .product-unit { display: none; }
  .product h3 { font-size: .875rem; }
  .current-price { font-size: .875rem; }
  .current-price small { font-size: .75rem; }
  .price-stack { gap: 3px; }
  .old-price { display: block; width: 100%; font-size: .75rem; line-height: 1; }
  .discount-tag { padding: 4px 6px; font-size: .875rem; right: 0; }
  .cart-preview { gap: 8px; padding-inline: 10px; }
  .basket-visual { width: 220px; height: 100px; }
  .basket-item { height: 64px; width: 46px; }
  .basket-summary { min-width: 100px; gap: 3px; }
  .basket-summary strong { font-size: .875rem; }
  #basket-quantity { display: block; margin: 0; }
  .basket-open-label { display: none; }
  .bottom-nav { gap: 3px; justify-content: space-between; padding-inline: max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-left)); }
  .nav-item { flex: 1; width: auto; padding-inline: 2px; font-size: .875rem; }
  .nav-item .icon { width: 22px; height: 22px; }
  .toast { bottom: calc(184px + env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .brand span { display: none; }
  .category-link { padding-inline: 7px; }
  .basket-visual { width: 205px; }
}
@media (max-width: 350px) {
  .brand { display: none; }
  .quick-access { width: 100%; justify-content: space-between; }
  .category-link { padding-inline: 6px; }
  .basket-visual { width: 180px; }
  .basket-summary { min-width: 95px; }
  .quantity-control button { width: 21px; }
  .current-price small { display: block; }
}
@media (max-height: 650px) {
  .storefront { grid-template-rows: 54px minmax(0, 1fr) 83px 57px; }
  .topbar { padding-block: 5px; }
  .basket-visual { height: 80px; }
  .basket-item { height: 49px; width: 38px; }
  .price-ticket { top: calc(100% + 4px); min-height: 52px; padding-block: 3px; }
  .product h3 { font-size: .875rem; line-height: 1.4; }
  .product-unit, .old-price { display: none; }
  .product:nth-child(even) .product-visual { top: 58px; }
  .product-visual { top: 6px; }
  .nav-item { gap: 2px; }
  .aisle-progress { bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .shelf-backdrop { will-change: auto; }
}

/* V2 catalog header: photographed grocery groups printed on hanging shop signs. */
.storefront { grid-template-rows: 112px minmax(0, 1fr) 136px 70px; }
.category-header { position: relative; gap: 24px; padding: 9px max(24px, env(safe-area-inset-right)) 8px max(24px, env(safe-area-inset-left)); justify-content: center; background: repeating-linear-gradient(90deg, transparent 0 120px, #bec9b708 121px 122px), linear-gradient(#f8faf3, #f0f3e9); border-top: 4px solid #3d674b; border-bottom: 4px solid #c0cbb5; box-shadow: 0 4px 10px #193c2814; }
.category-wing { display: flex; align-items: center; justify-content: center; gap: 15px; }
.wing-left { flex-direction: row-reverse; }
.category-sign { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: end; width: 145px; height: 89px; padding: 4px 9px 6px; border: 1px solid #d2d7c7; border-radius: 3px 3px 10px 10px; background: linear-gradient(110deg, #fffef7, #f3f3e7); color: #3f5839; box-shadow: 0 3px 0 #cbd3bf, 0 5px 7px #2f452316; transform: rotate(-1deg); transition: border-color .2s, background .2s; }
.category-sign:nth-child(2) { transform: rotate(1deg); }
.category-sign::before, .category-sign::after { content: ''; position: absolute; top: -6px; width: 2px; height: 10px; background: #a9b9a0; box-shadow: 1px 0 #f8faf1; }
.category-sign::before { right: 17px; }
.category-sign::after { left: 17px; }
.category-sign-photo { display: block; min-height: 0; height: 55px; }
.category-sign img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 2px 1px #273b2414); }
.category-sign strong { font-size: .875rem; font-weight: 700; white-space: nowrap; text-align: center; line-height: 1.5; }
.category-sign.is-active { border-color: #7e9b64; background: linear-gradient(110deg, #fffef7, #e4edcf); box-shadow: 0 3px 0 #8ca875, 0 5px 9px #2f45231c; }
.category-sign:hover { background: #edf3e0; border-color: #8da574; }
.catalog-toggle { align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 125px; height: 91px; padding: 3px 6px; background: none; border: 0; border-radius: 9px; color: #2f583b; }
.catalog-toggle:hover { background: #e4edd9; }
.catalog-emblem { width: 43px; height: 35px; display: block; filter: drop-shadow(0 2px 1px #264a2922); }
.catalog-emblem svg { width: 100%; height: 100%; }
.catalog-toggle strong { font-size: .875rem; font-weight: 800; }
.catalog-toggle small { font-size: .75rem; color: #849275; }
.catalog-dialog { width: min(720px, calc(100% - 24px)); padding: 25px; background: repeating-linear-gradient(0deg, #fffdf6 0 3px, #faf9f0 4px 5px); border: 1px solid #bfcbb0; border-top: 7px solid #476d46; border-radius: 8px 8px 16px 16px; }
.catalog-eyebrow { color: #879575; font-size: .75rem; }
.catalog-dialog h2 { font-size: 1.6rem; font-weight: 900; }
.category-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 20px; }
.catalog-category { min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 10px 10px 12px; border: 1px solid #d3dbc4; border-radius: 5px; background: #fffef8; box-shadow: 0 3px 0 #e1e6d6; }
.catalog-category:hover { background: #f0f5e5; border-color: #92aa78; }
.catalog-photo { display: block; width: 100%; height: 130px; }
.catalog-photo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 2px #3b4d2815); }
.catalog-category strong { font-size: 1rem; color: #3a5936; margin-top: 9px; }
.catalog-category small { font-size: .75rem; color: #8b977a; margin-top: 3px; }

/* A photographic foreground trolley; product thumbnails sit behind its wire mesh. */
.cart-dock { background: repeating-linear-gradient(90deg, transparent 0 170px, #9da88b0c 171px 172px), linear-gradient(#e0e5d6, #f3f5ec 80%); box-shadow: inset 0 7px 12px #6a7e4910, 0 -3px 7px #36502d0c; }
.cart-preview { gap: 26px; }
.basket-visual { width: 320px; height: 135px; filter: drop-shadow(0 8px 3px #273c3021); }
.basket-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.basket-mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.basket-cavity { position: absolute; left: 19%; right: 19%; top: 33%; bottom: 22%; border-radius: 12px 12px 24px 24px; background: linear-gradient(#59736605, #77938113); z-index: 0; }
.basket-contents { top: 9%; bottom: 29%; left: 23%; right: 23%; }
.basket-item { height: 79px; width: 57px; }
.basket-summary { gap: 5px; padding: 11px 15px; background: #fbfcf4b8; border: 1px solid #d8e0c9; border-radius: 6px; box-shadow: 1px 3px 0 #c5d0b52b; }
.basket-summary strong { font-size: .875rem; }
#basket-quantity { display: block; margin: 3px 0 0; color: #8b9b79; }
#basket-total { font-size: 1rem; font-weight: 800; color: #3d6036; }
.basket-open-label { font-size: .75rem; color: #899777; }

@media (max-width: 900px) {
  .storefront { grid-template-rows: 102px minmax(0, 1fr) 118px 68px; }
  .category-header { gap: 9px; padding: 9px max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left)); }
  .category-wing { gap: 0; flex: 1; }
  .secondary-category { display: none; }
  .category-sign { width: min(100%, 145px); height: 78px; padding-inline: 5px; }
  .category-sign-photo { height: 49px; }
  .category-sign strong { font-size: .875rem; }
  .catalog-toggle { width: 102px; height: 80px; flex-shrink: 0; }
  .catalog-toggle small { display: none; }
  .catalog-emblem { width: 40px; height: 33px; }
  .cart-preview { gap: 3px; padding-inline: 8px; }
  .basket-visual { width: 235px; height: 117px; }
  .basket-item { width: 43px; height: 62px; }
  .basket-summary { min-width: 104px; gap: 2px; padding: 8px 10px; }
  #basket-total { font-size: .875rem; }
  .basket-open-label { display: block; }
  .catalog-dialog { padding: 18px; }
  .category-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .catalog-photo { height: 110px; }
  .catalog-category strong { font-size: .875rem; }
  .toast { bottom: calc(192px + env(safe-area-inset-bottom)); }
}
@media (max-width: 350px) {
  .category-header { gap: 5px; padding-inline: 8px; }
  .catalog-toggle { width: 94px; }
  .category-sign { height: 76px; }
  .basket-visual { width: 205px; }
  .basket-summary { min-width: 94px; padding-inline: 7px; }
  .basket-open-label { display: none; }
}
@media (max-height: 650px) {
  .storefront { grid-template-rows: 83px minmax(0, 1fr) 90px 57px; }
  .category-header { padding-block: 5px; }
  .category-sign { height: 62px; padding-block: 0 3px; }
  .category-sign-photo { height: 38px; }
  .catalog-toggle { height: 67px; }
  .catalog-emblem { height: 29px; }
  .catalog-toggle small { display: none; }
  .basket-visual { height: 90px; }
  .basket-item { height: 48px; width: 35px; }
  .basket-summary { padding-block: 5px; }
  .basket-open-label { display: none; }
}

/* Keep category discovery in the bottom navigation and the aisle header compact. */
.storefront { grid-template-rows: 68px minmax(0, 1fr) 136px 70px; }
.compact-header { gap: 16px; padding-inline: max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-left)); border-top: 3px solid #3d674b; border-bottom: 1px solid #d1dac7; background: #fafbf5; box-shadow: 0 2px 7px #2a492c0a; }
.store-brand { display: flex; align-items: center; gap: 7px; font-size: 1.55rem; font-weight: 900; color: #31563d; }
.store-brand .icon { width: 25px; height: 25px; }
.current-department { display: flex; align-items: baseline; justify-content: center; gap: 7px; color: #4a6441; min-width: 0; }
.current-department > span { font-size: .75rem; color: #8a967c; }
.current-department strong { font-size: .875rem; font-weight: 600; }
.header-search { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border: 1px solid #dce4d3; border-radius: 10px; background: #f2f6e9; color: #537047; }
.header-search .icon { width: 20px; height: 20px; }
.nav-item { min-width: 0; }
.nav-item > span { white-space: nowrap; }

/* Photographic floor plane. Only the scenery moves; the cart stays in front. */
.cart-dock { isolation: isolate; background: #e1e4dc; }
.cart-floor { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cart-floor-plane { position: absolute; inset: -120px -240px -180px; background-image: url('backgrounds/cart-floor-v2.png'); background-size: 300px 300px; background-repeat: repeat; transform: perspective(700px) rotateX(46deg) scale(1.5); transform-origin: center; }
.cart-floor::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#4051371c, transparent 35%, #ffffff26); box-shadow: inset 0 7px 15px #26352016; }
.cart-preview { position: relative; z-index: 1; }
.basket-summary { background: #fbfcf1e6; }

@media (max-width: 900px) {
  .storefront { grid-template-rows: 60px minmax(0, 1fr) 118px 68px; }
  .compact-header { padding-inline: max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-left)); gap: 10px; }
  .store-brand { font-size: 1.3rem; gap: 5px; }
  .store-brand .icon { width: 22px; height: 22px; }
  .current-department { gap: 5px; }
  .header-search { width: 34px; height: 34px; }
  .bottom-nav { gap: 2px; padding-inline: max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-left)); }
  .nav-item { padding-inline: 1px; }
  .cart-floor-plane { background-size: 240px 240px; }
}
@media (max-width: 350px) {
  .current-department > span { display: none; }
}
@media (max-height: 650px) {
  .storefront { grid-template-rows: 52px minmax(0, 1fr) 90px 57px; }
}
