/* V136 Free Models R2 (PB_Free_Models_Spec R2, DG-S05 gallery + DG-S06 quick preview; PB-C033 card, PB-C058 drawer, PB-C077 rights).
   Scoped to #pbFreeModels.pb136fm. PB tokens only; logical properties (HE RTL / EN LTR); targets >= 48x48.
   - Categories: one row that scrolls inline on a phone (wraps from 768); the active one is aria-current.
   - Grid: below 768 two columns when 2 x 152 + 12 fit (one column at 320), from 768 auto-fill min 200 up to 4 columns, gap 12.
   - Card: picture 4:3 contain on a token surface, the name (two lines reserved), the heart (28 visual / 48 target) over the picture at
     the inline end; "Model · Free", the 0 counter, the download arrow and the rights line leave the grid (the drawer carries them).
     A card whose file waits for a check keeps its status line.
   - Drawer: a bottom sheet on a phone (full width, safe area, up to the available height), an inline-end side sheet of 416 px from
     768; ONE vertical scroll; close 48x48 first. */
.pb136fm .pb136fm-cats { display: flex; flex-wrap: nowrap; gap: 8px; margin: 0 0 12px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.pb136fm .pb136fm-cats::-webkit-scrollbar { display: none; }
.pb136fm .pb136fm-cats .pb-chip { flex: none; display: inline-flex; align-items: center; min-block-size: 48px; white-space: nowrap; }
@media (min-width: 768px) { .pb136fm .pb136fm-cats { flex-wrap: wrap; overflow: visible; } }

.pb136fm .pb-buyer-free-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 12px; }
@media (max-width: 335.98px) { .pb136fm .pb-buyer-free-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 768px) { .pb136fm .pb-buyer-free-grid { grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 36px) / 4)), 1fr)); } }

.pb136fm .pb-buyer-free-card .pb123c { position: relative; border-radius: 16px; overflow: hidden; }
.pb136fm .pb-buyer-free-card .pb123c-media { aspect-ratio: 4 / 3; background: var(--pb-color-surface-subtle); }
.pb136fm .pb-buyer-free-card .pb123c-media img { object-fit: contain; }
.pb136fm .pb-buyer-free-card .pb123c-body { padding: 12px 16px 16px; }
.pb136fm .pb-buyer-free-card .pb123c-title { margin: 0; font-size: 16px; line-height: 22px; min-block-size: 44px; overflow-wrap: anywhere; }
.pb136fm .pb-buyer-free-card .pb123c-variant { display: block; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--pb-color-text-muted); }
/* the compact card: picture, name, heart */
.pb136fm .pb-buyer-free-card .pb123c-info,
.pb136fm .pb-buyer-free-card .pb123c-rights,
.pb136fm .pb-buyer-free-card .pb123c-by,
.pb136fm .pb-buyer-free-card .pb123s-i:not(:has(.pb123a--fav)) { display: none; }
.pb136fm .pb-buyer-free-card .pb123c.is-unavailable .pb123c-info { display: block; }
.pb136fm .pb-buyer-free-card .pb123c-acts { position: static; container-type: normal; margin: 0; padding: 0; }
.pb136fm .pb-buyer-free-card .pb123s { position: static; display: block; margin: 0; padding: 0; }
.pb136fm .pb-buyer-free-card .pb123s-i:has(.pb123a--fav) { position: absolute; top: 4px; inset-inline-end: 4px; z-index: 3; list-style: none; margin: 0; }
.pb136fm .pb-buyer-free-card .pb123a--fav { inline-size: 48px; block-size: 48px; min-inline-size: 48px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.pb136fm .pb-buyer-free-card .pb123a--fav svg { inline-size: 18px; block-size: 18px; padding: 5px; border-radius: 50%; box-sizing: content-box;
    background: var(--pb-color-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.pb136fm .pb-buyer-free-card .pb123a--fav .pb123a-n,
.pb136fm .pb-buyer-free-card .pb123a--fav .pb123a-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pb136fm .pb-buyer-free-card .pb123a--fav:focus-visible { outline: 2px solid var(--pb-color-focus); outline-offset: -2px; }

/* ---- the drawer */
.pb136fd { box-sizing: border-box; margin: auto 0 0; inline-size: 100%; max-inline-size: 100%; max-block-size: calc(100dvh - 24px);
    padding: 0 0 env(safe-area-inset-bottom); border: 0; border-radius: 16px 16px 0 0; background: var(--pb-color-surface); color: var(--pb-color-text);
    overflow: hidden; display: none; flex-direction: column; }
.pb136fd[open] { display: flex; }
.pb136fd::backdrop { background: rgba(10, 10, 20, 0.45); }
.pb136fd-bar { display: flex; justify-content: flex-end; padding: 8px 8px 0; flex: none; }
.pb136fd-close { inline-size: 48px; block-size: 48px; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--pb-color-text); cursor: pointer; }
.pb136fd-close:hover { background: var(--pb-color-surface-hover, var(--pb-color-surface-subtle)); }
.pb136fd-close:focus-visible { outline: 2px solid var(--pb-color-focus); outline-offset: 2px; }
.pb136fd-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; }
.pb136fd-state { margin: 8px 0 12px; }
.pb136fd-details { display: inline-flex; align-items: center; min-block-size: 48px; margin-inline-start: 12px; color: var(--pb-color-link); }
@media (min-width: 768px) {
    .pb136fd { margin: 0 0 0 auto; inline-size: 416px; max-inline-size: calc(100vw - 48px); block-size: 100dvh; max-block-size: 100dvh; border-radius: 0; }
    html[dir="rtl"] .pb136fd { margin: 0 auto 0 0; }
}
.pb136fq-head { display: flex; align-items: center; gap: 12px; margin-block-end: 8px; }
.pb136fq-thumb { flex: none; inline-size: 72px; block-size: 72px; border-radius: 12px; overflow: hidden; display: inline-flex; align-items: center;
    justify-content: center; background: var(--pb-color-surface-subtle); font-size: 28px; color: var(--pb-color-text-muted); }
.pb136fq-thumb img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.pb136fq-title { margin: 0; font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.pb136fq-title:focus { outline: none; }
.pb136fq-en { margin: 0 0 8px; color: var(--pb-color-text-muted); }
.pb136fq-files { font-size: 14px; line-height: 20px; color: var(--pb-color-text-muted); }
.pb136fq-files p { margin: 0 0 4px; }
.pb136fq-list { margin: 0 0 8px; padding-inline-start: 20px; }
.pb136fq-rights { margin: 12px 0 8px; font-size: 16px; line-height: 24px; }
.pb136fq-action .pb-btn { display: flex; inline-size: 100%; min-block-size: 52px; justify-content: center; }
.pb136fq-dlstate { margin: 8px 0 0; font-size: 14px; color: var(--pb-color-text-muted); }
.pb136fq-more a { display: inline-flex; align-items: center; min-block-size: 48px; color: var(--pb-color-link); }
@media (prefers-reduced-motion: no-preference) {
    .pb136fd[open] { animation: pb136fd-in 180ms ease-out; }
    @keyframes pb136fd-in { from { transform: translateY(16px); opacity: 0.6; } to { transform: none; opacity: 1; } }
}
