/* ROXPRO — חלון הקטגוריות בטלפון, והתמונות המורכבות של אריחי הקטגוריות (inc/rox-cats.php; 16.11.26, סשן 77).
   המרכיבים הם של האתר: האריח (.cat-row / .res-th), השורה של סוג (כמו .sub בעמוד קטגוריה), הכפתור הכהה (כמו "הכל" שם). */

/* ---- התמונה המורכבת של אריח קטגוריה: כבר כוללת את השוליים והקו התחתון, ולכן ממלאת את האריח ---- */
.cat-tile.built img,.cat-tile img[src*="/img/rox/cats/"]{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.res-th.built{padding:0}
.res-th:has(> img[src*="/img/rox/cats/"]),.cpc-th:has(> img[src*="/img/rox/cats/"]){padding:0}   /* drawn by rox.js (the search): a browser without :has only keeps the small padding */
.res-th.built img,.res-th img[src*="/img/rox/cats/"]{width:100%;height:100%;object-fit:contain}
#catList li:not(.cl-wide) .res-th.built img{inset:0;width:100%;height:100%}

.cl-quick,.cl-allp,.cs-sub,.cs-back{display:none}

@media (max-width:1023px){
  /* ---- 1. הקיצורים: מותגים ומבצעים, מעל האריחים ---- */
  .cl-quick{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:0 var(--gut) 14px}
  .cq{display:flex;align-items:center;gap:10px;min-width:0;height:52px;padding-inline:6px 10px;border-radius:19px;background:var(--tile);transition:transform .2s var(--ease)}
  .cq:active{transform:scale(.97)}
  .cq b{min-width:0;font-size:15.5px;font-weight:600;white-space:nowrap}
  .cq>.ti{margin-inline-start:auto;font-size:20px;color:var(--ink-3)}
  .cq-th{flex:none;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;overflow:hidden;background:#fff}
  .cq-th img{width:100%;height:100%;object-fit:contain;padding:3px}
  .cq-th.cq-photo img{padding:0;object-fit:cover}
  .cq-brands{background:radial-gradient(120% 90% at 50% 0%,#2b2d32 0%,var(--night) 70%);color:#fff}
  .cq-brands>.ti{color:#9a9ca1}
  .cq-brands .cq-th{width:52px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;background:rgba(255,255,255,.08)}
  .cq-brands .cq-th img{width:auto;height:auto;padding:0}
  .cq-brands .cq-th .lg-kc{width:40px}
  .cq-brands .cq-th .lg-gy{width:26px}
  .cq-sale{background:var(--red-tint)}
  .cq-pct{display:inline-flex;align-items:center;height:20px;margin-inline-start:6px;padding-inline:7px;border-radius:10px;background:var(--red);color:#fff;font-size:11.5px;font-weight:700;vertical-align:1px}

  /* ---- 2. האריחים: "מבצעים" ו"מותגים" עלו לשורת הקיצורים; "כל המוצרים" במקום ה-12 ---- */
  #catList .cl-sale,#catList .cl-brands,#catSheet .cl-cats{display:none}
  #catList .cl-allp{display:block}

  /* ---- 3. הסוגים של קטגוריה, באותו חלון ---- */
  #catSheet.cs-in .cl-me,#catSheet.cs-in .cl-quick,#catSheet.cs-in #catList,#catSheet.cs-in .cl-h,#catSheet.cs-in .cl-box{display:none}
  #catSheet.cs-in .cs-sub{display:block;padding:0 var(--gut) calc(18px + env(safe-area-inset-bottom))}
  #catSheet.cs-in .cs-h{align-items:center}
  #catSheet.cs-in .cs-back{display:grid}
  .cs-back{flex:none;width:44px;height:44px;margin-inline-start:-6px;border-radius:50%;place-items:center;font-size:22px;color:var(--ink);background:var(--tile);transition:transform .15s}
  .cs-back:active{transform:scale(.94)}
  .cs-all{display:flex;align-items:center;gap:10px;height:52px;margin:4px 0 8px;padding-inline:18px 14px;border-radius:26px;background:var(--ink);color:#fff;font-size:15.5px;font-weight:600}
  .cs-all .num{margin-inline-start:auto;font-size:14px;font-weight:500;color:#c9cbcf}
  .cs-all .ti{font-size:20px;color:#c9cbcf}
  .cs-list a{display:grid;grid-template-columns:40px minmax(0,1fr) auto 20px;align-items:center;gap:12px;min-height:54px;padding:7px 0;border-bottom:1px solid var(--line)}
  .cs-list li:last-child a{border-bottom:0}
  .cs-list .sub-th{display:block;width:40px;height:40px;border-radius:50%;background:var(--tile);padding:4px}
  .cs-list .sub-th img{width:100%;height:100%;object-fit:contain}
  .cs-list b{font-size:15.5px;font-weight:500;line-height:1.25}
  .cs-list .num{font-size:13.5px;color:var(--ink-2)}
  .cs-list .ti{font-size:20px;color:var(--ink-3)}
  .cs-list a:active b{text-decoration:underline;text-underline-offset:3px}
  @media (prefers-reduced-motion:no-preference){
    #catSheet.cs-in .cs-sub{animation:csIn .22s var(--ease) both}
    @keyframes csIn{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
  }
}
