/* Owner 2026-11-26/27: the approved navigation positions. Owner 2026-11-28: photo cards + subcategory text bar (same as the
   design copy kods-dizains/public/css/tg-social.css). Old circles: lokalais/kods-pirms-catnav-20261128/tg-nav12.css. */
:root{--sm-red:#BD0030;--sm-price:#17832E;--sm-active-bg:#DCEFD6;--sm-active-fg:#176D29;--sm-text:#202020;--sm-muted:#666;--sm-border:#E9E9E9;--sm-gold:#E8CDA5}
/* Owner 2026-11-28 — category photo cards + text subcategory bar (approved reference lokalais/kategoriju-bildes/6.png).
   Old circles: lokalais/tg-social.before-photo-cats-20261128.css. Only these components; nothing else changes. */
.tg-catnav{--tgc-bordo:#920036;--tgc-w:clamp(76px,21vw,84px);--tgc-h:clamp(104px,calc(var(--tgc-w)*1.34),112px);--tgc-r:12px;--tgc-gap:7px;--tgc-bleed:12px;margin:12px 0 4px;min-width:0}
.tg-cats{position:relative;min-width:0}
.tg-cat-row{display:flex;flex-wrap:nowrap;gap:var(--tgc-gap);list-style:none;margin:0 calc(-1 * var(--tgc-bleed));padding:4px 12px 10px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-behavior:smooth;scroll-snap-type:x proximity;scroll-padding-inline:12px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tg-cat-row::-webkit-scrollbar{display:none}
.tg-cat-item{position:relative;flex:0 0 auto;scroll-snap-align:start}
.tg-cat-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;width:var(--tgc-w);height:var(--tgc-h);padding:0 5px 8px;box-sizing:border-box;border-radius:var(--tgc-r);overflow:hidden;isolation:isolate;background:linear-gradient(160deg,#5a4650,#2c1f25);color:#fff;text-decoration:none;box-shadow:0 1px 3px rgba(35,20,27,.18);transition:box-shadow .18s ease,transform .18s ease;-webkit-tap-highlight-color:transparent}
.tg-cat-img{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease}
.tg-cat-img.is-broken{display:none}
.tg-cat-card::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,rgba(18,8,12,.86) 0%,rgba(18,8,12,.55) 30%,rgba(18,8,12,.12) 58%,rgba(18,8,12,0) 72%);transition:background .18s ease}
.tg-cat-card::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 0 transparent;transition:box-shadow .18s ease}
.tg-cat-ic{display:block;width:24px;height:24px;flex:none;filter:drop-shadow(0 1px 2px rgba(0,0,0,.45))}
.tg-cat-ic svg{display:block;width:100%;height:100%;color:#fff}
.tg-cat-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;font-size:12.5px;font-weight:600;line-height:1.15;text-align:center;letter-spacing:-.1px;text-shadow:0 1px 3px rgba(0,0,0,.55);overflow-wrap:anywhere;hyphens:auto}
.tg-cat-card:hover .tg-cat-img{transform:scale(1.05)}
.tg-cat-card:focus-visible{outline:3px solid var(--tgc-bordo);outline-offset:2px}
/* active: bordo outer line + thin white inner line + soft bordo shadow + a bordo-tinted bottom gradient; size never changes */
.tg-cat-card[aria-current]{box-shadow:0 4px 12px rgba(146,0,54,.34)}
.tg-cat-card[aria-current]::after{box-shadow:inset 0 0 0 2.5px var(--tgc-bordo),inset 0 0 0 4px #fff}
.tg-cat-card[aria-current]::before{background:linear-gradient(to top,rgba(122,0,45,.92) 0%,rgba(122,0,45,.62) 32%,rgba(60,0,22,.16) 60%,rgba(60,0,22,0) 74%)}
/* the small tab under the active card that joins it to the subcategory bar */
.tg-catnav.has-subs .tg-cat-item:has(>.tg-cat-card[aria-current])::after{content:"";position:absolute;left:50%;bottom:-8px;width:18px;height:6px;margin-left:-9px;border-radius:0 0 6px 6px;background:var(--tgc-bordo)}
/* desktop arrows (shown by JS only when the row overflows) */
.tg-cats-arrow{position:absolute;top:calc(4px + var(--tgc-h) / 2);z-index:2;display:grid;place-items:center;width:34px;height:34px;margin-top:-17px;padding:0;border:1px solid #E6DCE0;border-radius:50%;background:rgba(255,255,255,.94);color:#3A2A31;box-shadow:0 2px 8px rgba(40,10,20,.14);cursor:pointer;transition:opacity .15s}
.tg-cats-arrow[hidden]{display:none}
.tg-cats-arrow:disabled{opacity:0;pointer-events:none}
.tg-cats-arrow.is-prev{left:-6px}.tg-cats-arrow.is-next{right:-6px}
.tg-cats-arrow .ic{width:18px;height:18px}
.tg-cats-arrow.is-prev .ic{transform:rotate(90deg)}.tg-cats-arrow.is-next .ic{transform:rotate(-90deg)}
.tg-cats-arrow:hover{background:#fff;color:var(--tgc-bordo)}
.tg-cats-arrow:focus-visible{outline:3px solid rgba(146,0,54,.4);outline-offset:2px}
/* subcategories: one compact text row, thin dividers, the chosen one in a light pink capsule */
.tg-subbar{margin:6px calc(-1 * var(--tgc-bleed)) 0;border-bottom:1px solid #EFE7EA}
.tg-sub-row{display:flex;flex-wrap:nowrap;align-items:center;min-height:42px;list-style:none;margin:0;padding:0 12px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tg-sub-row::-webkit-scrollbar{display:none}
.tg-sub-row>li{position:relative;flex:none;display:flex;align-items:center}
.tg-sub-row>li+li::before{content:"";width:1px;height:18px;background:#DED3D8;flex:none}
.tg-sub-row>li:has(>.tg-sub[aria-current])::before,.tg-sub-row>li:has(>.tg-sub[aria-current])+li::before{background:transparent}
.tg-sub{display:inline-flex;align-items:center;height:31px;padding:0 13px;border-radius:16px;color:#2A1F24;font-size:13px;font-weight:500;line-height:1;white-space:nowrap;text-decoration:none;transition:background-color .15s,color .15s}
.tg-sub:hover{color:var(--tgc-bordo,#920036)}
.tg-sub[aria-current]{background:#F7E1EA;color:#8A0032;font-weight:650}
.tg-sub:focus-visible{outline:2px solid #920036;outline-offset:1px}
/* while a category request runs (no page reload) */
.tg-catnav-busy .home-body{opacity:.55;transition:opacity .15s}
@media (min-width:768px){
  .tg-catnav{--tgc-w:clamp(100px,7.3vw,120px);--tgc-h:clamp(110px,calc(var(--tgc-w)*1.1),130px);--tgc-r:14px;--tgc-gap:10px;margin-top:16px}
  .tg-cat-row{margin:0;padding:4px 2px 11px;justify-content:safe center;scroll-padding-inline:2px}
  .tg-cat-card{gap:4px;padding:0 7px 10px}
  .tg-cat-ic{width:28px;height:28px}
  .tg-cat-name{font-size:13.5px}
  .tg-subbar{margin-inline:0}
  .tg-sub-row{padding:0 2px;justify-content:safe center}
  .tg-sub{font-size:13.5px;padding:0 14px}
}
@media (max-width:767.98px){.tg-cats-arrow{display:none!important}}
@media (prefers-reduced-motion:reduce){.tg-cat-card,.tg-cat-card::before,.tg-cat-card::after,.tg-cat-img,.tg-sub{transition:none}.tg-cat-row,.tg-sub-row{scroll-behavior:auto}.tg-cat-card:hover .tg-cat-img{transform:none}}

/* the navigation positions replace the old category buttons / drawer on the home page */
html body .future-home-main:has(>.tg-catnav)>.category-navigation,html body .future-home-main:has(>.tg-catnav)>.cat-drawer,html body .future-home-main:has(>.tg-cats)>.category-navigation,html body .future-home-main:has(>.tg-cats)>.cat-drawer{display:none!important}
/* public phone gutter is 10 px (.wrap) — the rows bleed exactly to the screen edge */
@media (max-width:767.98px){.tg-catnav{--tgc-bleed:10px}}
