/* Catalogue tiles (ui.js productPic): every product photo sits in a .frame, a rounded tile filled with the photo's own
   backdrop (--frame-bg). ui.js frameFit places the image inline (left/top/width in %): packshots float centred and
   large, scene and on-model photos cover the tile. A faint ink veil (::after) keeps near-white backdrops reading as a
   tile on the white page. Without frame data the photo covers the tile, or shows whole where the container did so before. */
.frame { position: relative; display: block; width: 100%; overflow: hidden; border-radius: var(--r-tile); background: var(--frame-bg, var(--frame-neutral)); }
.frame::after { content: ""; position: absolute; inset: 0; background: rgba(17, 17, 17, 0.035); pointer-events: none; }
.frame > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
.frame.is-loading { animation: frame-loading 1.4s ease-in-out infinite; }
@keyframes frame-loading { 50% { background-color: var(--tone); } }
@media (prefers-reduced-motion: reduce) { .frame.is-loading { animation: none; background: var(--tone); } }
.frame-contain > img { object-fit: contain; }
.frame > img.framed { inset: auto; height: auto; object-fit: fill; }
.frame > .img-missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: var(--s1); font-size: 9px; letter-spacing: 0; text-align: center; overflow-wrap: anywhere; }

/* Inside a container that already has its shape, the frame fills it. */
.plate > .frame, .item-thumb > .frame, .outfit-tile > .frame, .outfit-sum-thumb > .frame, .coll-cell > .frame { position: absolute; inset: 0; width: auto; aspect-ratio: auto !important; }
.outfit-sum-thumb { position: relative; }
.plate:has(> .frame), .item-thumb:has(> .frame), .outfit-tile:has(> .frame), .outfit-sum-thumb:has(> .frame) { background: transparent; }
.plate:has(> .frame) { border-radius: var(--r-tile); }
.item-thumb, .outfit-tile, .outfit-sum-thumb, .item-thumb > .frame, .outfit-tile > .frame, .outfit-sum-thumb > .frame { border-radius: var(--r-thumb); }
.outfit-tile, .outfit-tile > .frame { border-radius: var(--r-tile); }
.coll-cell > .frame { border-radius: 0; }

/* Try-on renders and own photos shown as tiles in Mine's grid: rounded like the product tiles. */
.card .plate { border-radius: var(--r-tile); }

/* A picked tile (Style rows, the Add pieces dialog): an ink ring above the photo and a check badge; unpicked tiles stay at full strength. */
.pick-tile { position: relative; }
.pick-tile[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 2px solid var(--ink); border-radius: inherit; pointer-events: none; }
.pick-tile[aria-pressed="true"]::before { content: ""; position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat; pointer-events: none; }

/* A card's own Try on (Discover, Collections, the empty Try on view's picks): starts the try-on at once. */
.dc-try { margin-top: 8px; }
.has-product .tryon-picks { display: none; }
.tryon-picks-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 40%); gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
.tryon-picks-row > .dc-card { scroll-snap-align: start; }
@media (min-width: 900px) { .tryon-picks-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; } }
