/* Order 24, batch 1 («تنظيم المحل الكبير», design team/reports/design/2026-12-04-order-24-big-catalogue: h01, c01, c04-c06,
   d01). Loaded only for a BIG shop (store/sections.js), after store/base.css and the look's own file: every colour, the
   corner and the font are the look's variables, so the pages follow each look and its day and night. Logical properties
   only (Arabic and English). Places are kept: a tile's and a card's picture are squares before they load, a tile's words
   have a fixed height (a name of one line or two, in any font), a card's name is two lines and its small line is one. */

/* ---------- the first page: «تسوّق حسب القسم» ---------- */
.sx-in { max-width: var(--max, 1240px); margin: 0 auto; padding-inline: 16px; }
.sx-secs { padding-block: 14px 6px; }
.sx-h { font: var(--head-weight, 700) 1.125rem/1.3 var(--font-head, var(--font)); margin: 0 0 8px; }
.sx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.sx-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; color: var(--ink); text-decoration: none; text-align: center; border-radius: var(--r, 14px); -webkit-tap-highlight-color: transparent; }
.sx-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sx-ti { inline-size: 100%; aspect-ratio: 1; border-radius: var(--r, 14px); overflow: hidden; background: var(--photo-bg, var(--surface-2)); border: 1px solid var(--line); display: grid; place-items: center; }
.sx-ti img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
/* two lines of the name and the count under them: every row is the same height whatever the names and the font */
.sx-tx { display: flex; flex-direction: column; gap: 3px; inline-size: 100%; block-size: 50px; overflow: hidden; }
.sx-tn { font-size: 13px; font-weight: 600; line-height: 16.5px; max-block-size: 33px; overflow: hidden; overflow-wrap: anywhere; }
.sx-tc { font-size: 11.5px; line-height: 13px; color: var(--muted); white-space: nowrap; }
.sx-all .sx-ti { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--surface-2); color: var(--accent-text); }
.sx-all .sx-ti b { font-size: 18px; line-height: 1.1; color: var(--ink); } /* the number in the page's ink (the shop's colour on this ground reads under 4.5:1 at night) */
.sx-home .best-in { padding-inline: 16px; }
.sx-home .best--grid .best-in { padding-block: 10px .1rem; }
.sx-home .best-t { font-size: 1.125rem; line-height: 1.3; margin: 0 0 8px; }
/* a phone and a tablet: 8 tiles at most (7 and «كل الأقسام») */
@media (max-width: 999.98px) { .sx-tiles--more > .sx-tile:nth-child(n+8):not(.sx-all) { display: none; } }
@media (min-width: 600px) and (max-width: 999.98px) { .sx-tiles { grid-template-columns: repeat(4, minmax(0, 150px)); gap: 14px 12px; } .sx-tx { block-size: 56px; } .sx-tn { font-size: 14px; line-height: 18px; max-block-size: 36px; } .sx-tc { font-size: 12.5px; } }
/* a computer: every section, 9 to a row; more than 9 = two rows */
@media (min-width: 1000px) {
  .sx-in, .sx-home .best-in { padding-inline: 1.5rem; }
  .sx-tiles { grid-template-columns: repeat(var(--sx-n, 9), minmax(0, 1fr)); gap: 16px 12px; }
  .sx-tiles--rows { grid-template-columns: repeat(var(--sx-n, 9), minmax(0, 180px)); justify-content: space-between; } /* two rows, spread over the page's width */
  .sx-tiles--more > .sx-all { display: none; }
  .sx-tiles--all { grid-template-columns: repeat(6, minmax(0, 180px)); }
  .sx-tx { block-size: 56px; } .sx-tn { font-size: 14px; line-height: 18px; max-block-size: 36px; } .sx-tc { font-size: 12.5px; }
  .sx-home .best--grid .cards--tile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- a section's page ---------- */
.top--sub .top-in { gap: 2px; padding-inline: 6px 10px; }
/* the magnifier stays in a section's short bar on a phone and a tablet too (c01: the arrow, the name, the search, the basket):
   base.css hides .top-search under 1000 px for the one-page shops, whose search is in the page; this file is a big shop's only */
.top.top--sub .top-search { display: inline-grid; }
/* the smallest phones (320 px): three buttons leave the name 166 px; a long one («Computers & tablets») stays whole a size smaller */
@media (max-width: 359.98px) { .top--sub .sx-title { font-size: .9375rem; } }
.sx-title { flex: 1; min-width: 0; margin: 0; font: 700 1.0625rem/1.4 var(--font-head, var(--font)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-page { max-width: var(--max, 1240px); margin: 0 auto; padding: 0 16px 1rem; min-block-size: 72vh; }
.sx-crumbs { display: flex; align-items: center; gap: 2px; block-size: 40px; margin-inline: -4px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.sx-crumbs a, .sx-crumbs [aria-current] { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 4px; flex: none; }
.sx-crumbs a { color: var(--accent-text); font-weight: 600; text-decoration: none; border-radius: 8px; }
.sx-crumbs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sx-crumbs [aria-current] { color: var(--ink); font-weight: 500; flex: 0 1 auto; min-width: 0; display: block; line-height: 44px; overflow: hidden; text-overflow: ellipsis; }
.sx-crumbs .sx-sep { inline-size: 15px; block-size: 15px; flex: none; }
/* «34 صنف» (the next batch puts the sort and filter button at this line's other end) */
.sx-bar { display: flex; align-items: center; gap: 10px; min-block-size: 24px; padding-block: 0 10px; box-sizing: content-box; }
.sx-cnt { flex: 1; font-size: 14px; color: var(--muted); }
.sx-cnt b { color: var(--ink); font-weight: 700; }
.sx-grid.cards { gap: 10px; }
/* a card here: the name always two lines, one small line under it (its sizes and colours, else its description, else its place) */
.sx-grid .card .n { line-height: 1.35; block-size: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sx-grid .card .d { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the squares: its sizes and colours on that one line (the first group whole, the next one as far as there is room) */
.sx-grid .card--tile .vnote { flex-wrap: wrap; align-items: center; overflow: hidden; white-space: nowrap; block-size: calc(.85rem * 1.82); line-height: calc(.85rem * 1.82); }
.sx-grid .card--tile .vnote > span { flex: none; max-inline-size: 100%; overflow: hidden; }
/* the next group stays on the line while it has room for a word (it ends in «…»); with less it goes under the line, out of sight */
.sx-grid .card--tile .vnote > span + span { flex: 0 1 auto; min-width: 4.5em; text-overflow: ellipsis; }
@media (max-width: 379.98px) { .sx-grid .card--tile .vnote { font-size: .74rem; } }
.sx-grid .card--tile:has(.vnote) .d { display: none; }
.sx-grid .card--tile:not(:has(.d, .vnote)) .n { margin-block-end: calc(.85rem * 1.82 + .2rem); }
/* a card with no words yet (the items are on their way): the same card, so the same size */
.sx-sk { cursor: default; pointer-events: none; }
.sx-sk .ph { background: var(--surface-2); }
.sx-sk .n, .sx-sk .d, .sx-sk .p { position: relative; color: transparent; }
.sx-sk .n::before, .sx-sk .n::after, .sx-sk .d::after, .sx-sk .p::after { content: ""; position: absolute; inset-inline-start: 0; block-size: 11px; border-radius: 6px; background: var(--surface-2); }
.sx-sk .n::before { inset-block-start: 5px; inline-size: 86%; }
.sx-sk .n::after { inset-block-start: 25px; inline-size: 56%; }
.sx-sk .d::after { inset-block-start: calc(50% - 6px); inline-size: 62%; }
.sx-sk .p { display: block; inline-size: 100%; }
.sx-sk .p::after { inset-block-start: calc(50% - 7px); block-size: 14px; inline-size: 42%; }
@media (prefers-reduced-motion: no-preference) { .sx-sk { animation: sx-wait 1s ease-in-out infinite alternate; } @keyframes sx-wait { from { opacity: 1; } to { opacity: .55; } } }
/* «عرضنا 24 من 28», the line, «اعرض المزيد · 4 باقي» */
.sx-foot:empty { display: none; }
.sx-more { padding-block-start: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sx-shown { font-size: 13px; color: var(--muted); }
.sx-prog { inline-size: 160px; block-size: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.sx-prog b { display: block; block-size: 100%; background: var(--accent); }
.sx-morebtn { display: flex; align-items: center; justify-content: center; inline-size: 100%; min-block-size: 50px; padding: 0 16px; border-radius: var(--r-btn, 12px); border: 1.5px solid var(--field-line, var(--line)); background: transparent; color: var(--ink); font: 700 1rem/1.2 var(--font); cursor: pointer; }
.sx-morebtn:focus-visible, .sx-err button:focus-visible, .sx-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sx-err { display: flex; align-items: center; gap: 10px; inline-size: 100%; margin-block-start: 4px; padding: 6px 12px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; text-align: start; }
.sx-err .ic { flex: none; inline-size: 19px; block-size: 19px; }
.sx-err span { flex: 1; min-width: 0; }
.sx-err button { flex: none; min-block-size: 44px; padding-inline: 4px; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
/* «القسم مو موجود» */
.sx-none { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding-block: 48px; }
.sx-none > .ic { inline-size: 44px; block-size: 44px; color: var(--muted); }
.sx-none b { font-size: 1.0625rem; }
@media (min-width: 1000px) {
  .sx-page { padding-inline: 1.5rem; }
  .sx-grid.cards { gap: 14px; }
  .sx-grid.cards--tile, .sx-grid.cards--tall, .sx-grid.cards--look { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sx-morebtn { max-inline-size: 360px; } .sx-err { max-inline-size: 520px; }
}

/* ---------- batch 3: the search (design s01-s05; store/search.js) ---------- */
/* the whole screen over the page: the field (46, the shop's colour around it) and «إلغاء», then what was found */
body.sf-open { overflow: hidden; }
.sf-layer { position: fixed; inset: 0; z-index: 45; background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-block-end: env(safe-area-inset-bottom); }
.sf-top { position: sticky; inset-block-start: 0; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px; padding-inline: 16px 12px; background: var(--top-bg); color: var(--top-ink); border-bottom: 1px solid var(--top-line, var(--line)); }
.sf-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-block-size: 46px; padding-inline: 12px 2px; border-radius: 12px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--ink); cursor: text; }
.sf-box > .ic { inline-size: 20px; block-size: 20px; color: var(--muted); }
.sf-in { flex: 1; min-width: 0; block-size: 43px; padding: 0; border: 0; outline: 0; background: none; color: inherit; font: 400 16px/1.4 var(--font); caret-color: var(--accent); -webkit-appearance: none; appearance: none; }
.sf-in::placeholder { color: var(--muted); opacity: 1; }
.sf-in::-webkit-search-cancel-button, .sf-in::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.sf-box:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.sf-clr { flex: none; inline-size: 44px; block-size: 43px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; }
.sf-clr[hidden] { display: none; }
.sf-clr .ic { inline-size: 16px; block-size: 16px; }
.sf-cancel { flex: none; min-block-size: 44px; padding-inline: 4px; border: 0; background: none; color: var(--accent-text); font: 600 1rem/1.2 var(--font); cursor: pointer; }
.sf-clr:focus-visible, .sf-cancel:focus-visible, .sf-row:focus-visible, .sf-all:focus-visible, .sf-rq:focus-visible, .sf-rx:focus-visible, .sf-chip:focus-visible, .sf-gall:focus-visible, .sf-shown:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sf-body { max-width: 720px; margin: 0 auto; padding: 4px 16px 24px; }
.sf-body[aria-busy="true"] { opacity: .6; }
.sf-h { margin: 14px 0 6px; font: 600 13px/1.5 var(--font); color: var(--muted); }
/* «آخر بحث»: each one a pill (40; with the gap a 44 touch place), its own × */
.sf-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-rc { display: inline-flex; align-items: center; max-inline-size: 100%; min-block-size: 40px; border-radius: 99px; background: var(--surface-2); font-size: 14px; }
.sf-rq { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-block-size: 40px; padding-inline: 12px 4px; border: 0; background: none; color: var(--ink); font: inherit; border-start-start-radius: 99px; border-end-start-radius: 99px; cursor: pointer; }
.sf-rq .ic { inline-size: 15px; block-size: 15px; color: var(--muted); }
.sf-rq span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-rx { flex: none; inline-size: 36px; block-size: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-start-end-radius: 99px; border-end-end-radius: 99px; cursor: pointer; }
.sf-rx .ic { inline-size: 13px; block-size: 13px; }
/* a line: a section (its picture 44, its name, how many, the arrow) or an item (its picture, name and place, its price) */
.sf-row { display: flex; align-items: center; gap: 12px; min-block-size: 56px; padding-block: 5px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.sf-row > b, .sf-tx b { font-weight: 600; font-size: 15px; }
.sf-row > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-row small { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.sf-th { flex: none; inline-size: 44px; block-size: 44px; border-radius: 10px; overflow: hidden; background: var(--photo-bg, var(--surface-2)); }
.sf-th img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.sf-go { flex: none; inline-size: 16px; block-size: 16px; color: var(--muted); }
.sf-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sf-tx b, .sf-tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-tx small { font-size: 12.5px; }
.sf-pr { flex: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.sf-layer mark, .sf-row mark { background: none; color: var(--accent-text); font-weight: 800; }
.sf-all { display: flex; align-items: center; justify-content: center; gap: 6px; min-block-size: 52px; color: var(--accent-text); font-weight: 700; font-size: 15px; text-decoration: none; }
.sf-all .sf-go { color: inherit; }
/* nothing found */
.sf-none { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-block: 22px 8px; }
.sf-none > .ic { inline-size: 34px; block-size: 34px; color: var(--muted); margin-block-end: 4px; }
.sf-none > b { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.sf-none > p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.sf-none .btn { max-inline-size: 300px; min-block-size: 50px; margin-block-start: 4px; }
.sf-try { color: var(--ink); border-color: var(--field-line, var(--line)); }
.sf-wa, .sf-wa:hover { background: #157a3f; color: #fff; text-decoration: none; }
.sf-wa .ic { color: inherit; }
/* the results' page: the field as it was typed (tapped, the search opens again), the sections' buttons, the count */
.top--find .top-in { gap: 6px; padding-inline: 6px 12px; }
.sf-box--shown { border-color: var(--field-line, var(--line)); padding-inline: 0 2px; cursor: default; }
.sf-shown { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; block-size: 43px; padding-inline: 12px 4px; border: 0; background: none; color: var(--ink); font: 400 16px/1.4 var(--font); text-align: start; border-radius: 10px; cursor: text; }
.sf-shown .ic { inline-size: 20px; block-size: 20px; color: var(--muted); }
.sf-shown span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-shown .sf-ph { color: var(--muted); }
/* (as high as the screen in every state, so what is under the page never comes into sight while the answers arrive) */
.sf-page { padding-block-start: 0; min-block-size: 100vh; }
.sf-chips { block-size: 56px; margin-inline: -16px; overflow: hidden; }
.sf-chips-in { display: flex; align-items: center; gap: 8px; block-size: 76px; padding: 8px 16px 28px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.sf-chips-in::-webkit-scrollbar { display: none; }
.sf-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-block-size: 40px; padding-inline: 14px; border-radius: 99px; border: 1px solid var(--field-line, var(--line)); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.sf-chip small { font-size: 12px; font-weight: 500; color: var(--muted); }
.sf-chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.sf-chip.on small { color: inherit; opacity: .85; }
.sf-chip--sk { inline-size: 88px; border-color: transparent; background: var(--surface-2); }
/* the count's line is as high as the sort and filter button the next batch puts at its other end (44), so nothing moves then */
.sf-bar { min-block-size: 44px; padding-block: 0 6px; }
.sf-res { min-block-size: 50vh; }
.sf-group + .sf-group { margin-block-start: 18px; }
.sf-gh { display: flex; align-items: center; gap: 10px; min-block-size: 44px; }
.sf-gh h2 { flex: 1; min-width: 0; margin: 0; font: var(--head-weight, 700) 1.0625rem/1.3 var(--font-head, var(--font)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-gh h2 small { font: 500 13px/1 var(--font); color: var(--muted); }
.sf-gall { flex: none; display: inline-flex; align-items: center; gap: 2px; min-block-size: 44px; padding-inline: 4px; color: var(--accent-text); font-weight: 700; font-size: 14px; text-decoration: none; border-radius: 8px; }
.sf-gall .sf-go { color: inherit; }
.sf-maybe { margin-block: 18px 10px; text-align: start; }
.sf-res > .sx-h { margin-block-start: 14px; }
@media (prefers-reduced-motion: no-preference) { .sf-chip--sk { animation: sx-wait 1s ease-in-out infinite alternate; } }
@media (min-width: 1000px) {
  .sf-top { justify-content: center; } .sf-box { max-inline-size: 640px; }
  .top--find .sf-box--shown { max-inline-size: 640px; }
  .sf-chips { margin-inline: -1.5rem; } .sf-chips-in { padding-inline: 1.5rem; }
  .sf-tiles { grid-template-columns: repeat(4, minmax(0, 180px)); }
}
