/* Avilo Furniture — Catalogue (design gallery), team D2. Phone first (375px); uses the shell's tokens, .card, and the
   product page's .detail / .gallery / .pricebox / .pbar so a design looks like a product page. */
.cat-intro{margin:-6px 0 12px}
.cat-count{font-weight:600;white-space:nowrap}
.cat-search{position:relative;margin:0 0 12px}
.cat-search>.i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.cat-search .input{width:100%;padding-left:44px;padding-right:48px;border-radius:var(--r-pill);min-height:48px}
.cat-qx{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;background:none;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.cat-qx:hover{background:var(--surface-2)}

/* Category circles (one photo per type) */
.cat-circles{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;padding:2px 16px 10px;margin:0 -16px 4px;scroll-snap-type:x proximity}
.cat-circles::-webkit-scrollbar{display:none}
.cat-circ{flex:none;width:76px;border:0;background:none;padding:0;text-align:center;scroll-snap-align:start;cursor:pointer;color:var(--ink-2)}
.cat-circ .ph{display:grid;place-items:center;width:68px;height:68px;margin:0 auto;border-radius:50%;overflow:hidden;background:var(--surface-2);border:2.5px solid var(--line);color:var(--muted);transition:border-color .15s,transform .15s}
.cat-circ .ph img{width:100%;height:100%;object-fit:cover}
.cat-circ .ph.all{background:var(--accent-soft);color:var(--accent-ink)}
.cat-circ .ph .i{width:28px;height:28px}
.cat-circ b{display:block;margin-top:6px;font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat-circ small{display:block;font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat-circ.on .ph{border-color:var(--ink);transform:scale(1.04)}
.cat-circ.on b{color:var(--ink)}
.cat-circ:focus-visible .ph{outline:3px solid var(--accent);outline-offset:2px}

.cat-chips{margin-bottom:8px}
.cat-bar{display:flex;gap:8px;margin:0 0 14px}
.cat-sel{flex:1 1 0;min-width:0;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:1.5px solid var(--line);border-radius:var(--r-pill);background:var(--surface);color:var(--ink-2);font-size:13.5px;font-weight:600}
.cat-sel .i{flex:none;color:var(--muted)}
.cat-sel select{flex:1;min-width:0;border:0;background:none;font:inherit;color:inherit;min-height:42px;padding:0;text-overflow:ellipsis}
.cat-sel select:focus{outline:none}
.cat-sel:focus-within{border-color:var(--ink)}
@media (min-width:640px){.cat-bar{max-width:520px}}
.cat-more{margin:18px 0 8px}
.cat-stale .grow{font-weight:600}

/* Cards: reuse the shell's .card + slider; the whole card is one tap target */
.cat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:560px){.cat-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}}
.cat-card .pic{aspect-ratio:1/1}
.cat-card:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cat-card .body{padding:9px 10px 11px}
.cat-card h3{font-size:14.5px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.25}
.cat-card .price{font-size:20px;line-height:1.1;gap:6px;flex-wrap:wrap}
.cat-card .price .pcode{font-size:12px;color:var(--muted);font-weight:600;width:100%}
.cat-card .price .pend{font-size:12.5px;font-weight:600;color:var(--muted)}
.cat-card .cbadges .badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-soldout{font-size:13px;font-weight:700;color:var(--danger)}
.cat-card.sold .pic img{filter:grayscale(.6) opacity(.8)}
.cat-card .sdots{left:50%;transform:translateX(-50%)}
.cat-noimg{flex-direction:column;gap:6px;height:100%;display:flex;align-items:center;justify-content:center}
.cat-noimg .i{width:34px;height:34px;opacity:.5}
.cat-noimg span{font-size:11px}

/* Design page (shell .detail layout) */
.cat-design .pricebox .v.cat-soldout{font-size:15px}
.cat-where{padding:12px 14px}
.cat-where-h{display:flex;gap:10px;align-items:flex-start}
.cat-where-h .i{color:var(--muted);margin-top:2px;flex:none}
.cat-where-h small{display:block;font-size:12px;color:var(--muted)}
.cat-where-h b{display:block;font-size:15px}
.cat-where .list{margin-top:10px}
.cat-where .item{flex-wrap:wrap;align-items:flex-start;gap:6px 10px;background:var(--surface-2);margin:0 0 8px;border-radius:var(--r-sm);padding:10px 12px}
.cat-where .item:last-child{margin-bottom:0}
.cat-where .grow small{display:block;margin-top:2px}
.cat-where-btns{display:flex;gap:6px;flex-wrap:wrap;width:100%}
.cat-where-btns .btn{min-height:44px;padding:6px 12px;font-size:13.5px}
.cat-where-none{margin:10px 0 0}
.cat-detimg{width:72px;height:54px;object-fit:cover;border-radius:8px;cursor:zoom-in}
.cat-design .simcard small.cat-soldout{font-size:12px}

/* Restock form */
.cat-restock-head{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.cat-restock-head img,.cat-restock-head .noimg{width:72px;height:72px;border-radius:var(--r-sm);object-fit:cover;flex:none}
.cat-restock-head b{display:block;font-size:16px}
.cat-restock-head small{display:block;margin-top:2px}
.cat-restock .chips .chip{min-height:44px}
.cat-restock p{margin:0 0 14px}

/* Book for a client */
.cat-book-h{display:flex;align-items:center;gap:6px;margin:4px 0 8px;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.cat-book-h:not(:first-child){margin-top:18px}
.cat-book .list{margin:0}
.cat-book .cat-book-opt{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px;border:1.5px solid var(--line);border-radius:var(--r-sm);background:var(--surface);text-align:left;font:inherit;color:inherit;margin:0 0 8px;cursor:pointer}
.cat-book .cat-book-opt:hover{border-color:var(--ink)}
.cat-book-opt img,.cat-book-ic{flex:none;width:52px;height:52px;border-radius:10px;object-fit:cover;background:var(--surface-2);display:grid;place-items:center;color:var(--muted)}
.cat-book-opt b{display:block;font-size:15px}
.cat-book-opt small{display:block;font-size:12.5px;line-height:1.35;margin-top:2px}
.cat-book .cat-book-new{border-style:dashed}
/* A ready piece: tap the row = the client takes it as it is; "With changes" = the same piece changed in the factory */
.cat-book-piece{display:flex;gap:8px;align-items:stretch;margin:0 0 8px}
.cat-book-piece .cat-book-opt{margin:0;flex:1;min-width:0}
.cat-book-piece .cat-book-opt .grow{min-width:0}
.cat-book-chg{flex:none;width:92px;min-height:64px;padding:6px 8px;border-radius:var(--r-sm);flex-direction:column;justify-content:center;gap:4px;font-size:13px;line-height:1.2;text-align:center;white-space:normal}
.cat-book-tip{font-size:12.5px;margin:2px 0 0}

/* "This design" line on the product page (detailBlocks hook) */
.cat-pblock{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;margin:12px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);text-align:left;font:inherit;color:inherit;cursor:pointer}
.cat-pblock>.i{flex:none;color:var(--brand)}
.cat-pblock b{display:block;font-size:14px}
.cat-pblock small{display:block;font-size:12.5px;color:var(--muted);line-height:1.35}
.cat-pblock-go{flex:none;display:inline-flex;align-items:center;gap:2px;font-size:13px;font-weight:700;color:var(--ink-2)}
.cat-pblock:hover{background:var(--surface-2)}
/* Slider fix 2026-10-11: the category circles keep a swipe to themselves; a thin scrollbar with a mouse (the wheel works too) */
.cat-circles{overscroll-behavior-x:contain}
@media (hover:hover) and (pointer:fine){.cat-circles{scrollbar-width:thin}}
