/* Try-on tiles with the product on the picture, and the look preview overlay.
   views/partials/tryon-look-tile.hbs, views/partials/tryon-looks.hbs,
   public/js/tryon-looks.js. Self-contained: no page variables are assumed, so
   the same tile reads the same on the shop, a store, a product page and the
   brand pages. */

.tl-tile{position:relative;display:block;aspect-ratio:3/4;border-radius:8px;overflow:hidden;background:#ece8e1;min-width:0}
.tl-media{display:block;width:100%;height:100%;padding:0;border:0;background:none;cursor:zoom-in}
.tl-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.tl-tile:hover .tl-media img{transform:scale(1.04)}
.tl-media:focus-visible{outline:2px solid #111;outline-offset:-4px}
.tl-tile::after{content:"";position:absolute;inset:auto 0 0 0;height:45%;pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.55),rgba(0,0,0,0))}
.tl-who{position:absolute;left:10px;top:10px;padding:4px 10px;border-radius:999px;background:rgba(0,0,0,.45);
  color:#fff;font-size:.75rem;font-weight:600;max-width:calc(100% - 20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-likes{position:absolute;right:10px;top:10px;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.9);
  color:#111;font-size:.75rem;font-weight:700}

/* The "Worn here" chip: the /tryons feed card's shop tag, small. */
.tl-chip{position:absolute;left:8px;right:8px;bottom:8px;z-index:1;display:flex;align-items:center;gap:8px;
  padding:6px 8px 6px 6px;border-radius:12px;background:rgba(255,255,255,.96);color:#111;text-decoration:none;
  box-shadow:0 4px 14px rgba(0,0,0,.18);min-width:0}
.tl-chip:hover{background:#fff}
.tl-chip:focus-visible{outline:2px solid #111;outline-offset:2px}
.tl-chip-thumb{flex:0 0 auto;width:34px;height:34px;border-radius:8px;overflow:hidden;background:#f1efeb;display:grid;place-items:center}
.tl-chip-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tl-chip-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;line-height:1.2}
.tl-chip-label{font-size:.62rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b6b6b}
.tl-chip-name{font-size:.8rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tl-chip .bi{flex:0 0 auto;font-size:1.2rem;color:#555}

/* ── Look preview overlay ─────────────────────────────────────────────── */
/* The character page's look preview (views/character-design.hbs `.cd-look`),
   shared: Didier, 2026-10-26, "use the one that we already had". A lightbox
   (the photo floating on a blurred scrim) with the shop panel beside it. The
   --sh-* tokens are tryonlook's; the fallbacks are the character page's. */
.tl-look{--tl-surface:var(--sh-surface,#fbf8f3);--tl-bg:var(--sh-bg,#f5f0e8);--tl-ink:var(--sh-ink,#141210);
  --tl-muted:var(--sh-muted,#6b6259);--tl-line:var(--sh-line,rgba(20,18,16,.14));--tl-sunken:var(--sh-sunken,#e9e2d6);
  --tl-serif:var(--sh-serif,Georgia,'Iowan Old Style','Times New Roman',serif);
  position:fixed;inset:0;z-index:2000;display:none;padding:2rem 1.4rem;color:var(--tl-ink)}
.tl-look.is-open{display:block}
.tl-look,.tl-look *{box-sizing:border-box}
body.tl-look-open{overflow:hidden}
.tl-look-scrim{position:absolute;inset:0;background:rgba(12,10,8,.78);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.tl-look-card{position:relative;max-width:1040px;margin:0 auto;height:100%;display:flex;gap:1.4rem;align-items:center}
.tl-look-figure{flex:1 1 auto;min-width:0;height:100%;margin:0;display:flex;align-items:center;justify-content:center}
.tl-look-figure img{max-width:100%;max-height:100%;border-radius:6px;display:block;object-fit:contain;background:var(--tl-sunken)}
.tl-look-panel{flex:0 0 320px;max-width:100%;max-height:100%;overflow:auto;background:var(--tl-surface);border-radius:6px;padding:1.1rem}
.tl-look-eyebrow{display:inline-block;font-size:.7rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--tl-muted)}
.tl-look-title{font-family:var(--tl-serif);font-weight:400;font-size:1.15rem;margin:.15rem 0 .1rem;color:var(--tl-ink)}
.tl-look-sub{color:var(--tl-muted);font-size:.84rem;margin:0 0 .9rem}
.tl-look-items{display:flex;flex-direction:column;gap:.5rem;margin:0 0 1rem}
.tl-look a.tl-look-item{display:flex;align-items:center;gap:.7rem;padding:.5rem;border-radius:4px;color:var(--tl-ink);text-decoration:none;
  border:1px solid var(--tl-line);background:var(--tl-bg);transition:border-color .15s ease,transform .15s ease}
.tl-look a.tl-look-item:hover{border-color:var(--tl-ink);transform:translateX(2px)}
.tl-look-item:focus-visible{outline:2px solid var(--tl-ink);outline-offset:2px}
.tl-look-thumb{flex:0 0 auto;width:52px;height:52px;border-radius:4px;overflow:hidden;background:var(--tl-sunken);display:grid;place-items:center;color:var(--tl-muted)}
.tl-look-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tl-look-txt{flex:1 1 auto;min-width:0}
.tl-look-name{display:block;font-weight:600;font-size:.88rem;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tl-look-meta{display:block;color:var(--tl-muted);font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tl-look-item i{color:var(--tl-muted);font-size:1.15rem}
.tl-look a.tl-look-try{display:flex;width:100%;justify-content:center;align-items:center;padding:.6rem 1rem;border-radius:999px;
  background:var(--tl-ink);color:#fff;font-weight:600;font-size:.85rem;text-decoration:none}
.tl-look a.tl-look-try[hidden]{display:none}
.tl-tile a.tl-chip{color:#111}
.tl-look-fine{margin:.8rem 0 0;color:var(--tl-muted);font-size:.72rem}
.tl-look-close,.tl-look-nav{position:absolute;z-index:2;width:40px;height:40px;border-radius:999px;border:none;
  background:rgba(255,255,255,.92);color:var(--tl-ink);cursor:pointer;display:grid;place-items:center;font-size:1.2rem;line-height:1}
.tl-look-close:hover,.tl-look-nav:hover{background:#fff}
.tl-look-close{top:-.4rem;right:-.4rem}
.tl-look-nav.prev{left:-.4rem;top:50%;transform:translateY(-50%)}
.tl-look-nav.next{right:calc(320px + 1rem);top:50%;transform:translateY(-50%)}
.tl-look-nav[hidden]{display:none}

@media (max-width:900px){
  .tl-look{padding:1rem .8rem}
  .tl-look-card{flex-direction:column;align-items:stretch;gap:.8rem;overflow:auto;padding:2.2rem 0 1rem}
  .tl-look-figure{height:auto;flex:0 0 auto}
  .tl-look-figure img{max-height:58vh;margin:0 auto}
  .tl-look-panel{flex:0 0 auto;max-height:none;overflow:visible}
  .tl-look-close,.tl-look-nav{position:fixed}
  .tl-look-close{top:.6rem;right:.6rem}
  .tl-look-nav.prev,.tl-look-nav.next{top:auto;bottom:.8rem;transform:none}
  .tl-look-nav.prev{left:.8rem}
  .tl-look-nav.next{right:.8rem}
}
@media (prefers-reduced-motion:reduce){.tl-media img,.tl-look a.tl-look-item{transition:none}.tl-tile:hover .tl-media img,.tl-look a.tl-look-item:hover{transform:none}}
