/* MIRTY.INVENTORY — featured shop items inside the STORE section. Selectors are prefixed inv-. */

.inv { max-width: 1200px; margin: 28px auto 0; }
.js .screen:not(.in) > .inv { opacity: 0; transform: translateY(24px); }

.inv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.inv-kicker { margin: 0 0 6px; font-family: var(--pixel); font-size: 9px; letter-spacing: .14em; color: var(--red); }
.inv-title { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: .08em; font-size: clamp(22px, 3vw, 34px); }
.inv-status { margin: 6px 0 0; font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; color: var(--dim); }
.inv-hint { margin: 0; font-family: var(--pixel); font-size: 9px; letter-spacing: .14em; color: var(--dim); animation: blink 1.4s steps(1) infinite; }

.inv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.inv-item {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border: 1px solid var(--line); background: rgba(0,0,0,.72); padding: 10px;
  transition: border-color .15s, box-shadow .25s, transform .15s steps(2);
}
/* corner brackets, like the site's panels */
.inv-item::before, .inv-item::after { content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--fg); pointer-events: none; opacity: .5; transition: opacity .15s, inset .15s steps(2); }
.inv-item::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.inv-item::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.inv-item:hover, .inv-item:focus-visible { border-color: var(--fg); box-shadow: 0 0 26px rgba(252,252,252,.16), inset 0 0 20px rgba(252,252,252,.04); outline: none; }
.inv-item:hover::before, .inv-item:hover::after, .inv-item:focus-visible::before, .inv-item:focus-visible::after { opacity: 1; }

.inv-slot { position: absolute; z-index: 2; left: 18px; top: 18px; font-family: var(--pixel); font-size: 8px; letter-spacing: .12em; color: #000; background: var(--fg); padding: 3px 6px; }
.inv-img { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.inv-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .14s linear, transform .5s cubic-bezier(.2,.8,.2,1); }
/* scanner layers: two stacked photos cross-fade (opacity only) */
.inv-img .inv-layer { opacity: 0; }
.inv-img .inv-layer.inv-on { opacity: 1; }
.inv-item:hover .inv-img img, .inv-item:focus-visible .inv-img img { transform: scale(1.03); }
/* scan lines + one sweep on hover */
.inv-img::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.07) 2px 3px); }
.inv-img::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: -10%; height: 2px; background: rgba(255,255,255,.9); box-shadow: 0 0 14px 3px rgba(255,255,255,.7); opacity: 0; pointer-events: none; }
.inv-item:hover .inv-img::after, .inv-item:focus-visible .inv-img::after { animation: invSweep .9s cubic-bezier(.6,0,.2,1) 1; }
.inv-item.inv-scanning .inv-img::after { animation: invSweep .85s linear infinite; } /* runs only while a card is being scanned */
@keyframes invSweep { 0% { top: -2%; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.inv-meta { display: flex; flex-direction: column; gap: 6px; padding: 12px 2px 2px; flex: 1; }
.inv-name { font-family: var(--serif); font-weight: 700; letter-spacing: .04em; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.25; }
.inv-price { font-family: var(--mono); font-size: 21px; color: var(--fg); margin-top: auto; }
.inv-price small { font-size: 16px; color: var(--dim); }
.inv-cta { font-family: var(--pixel); font-size: 9px; letter-spacing: .12em; color: var(--red); padding-top: 4px; }
.inv-item:hover .inv-cta, .inv-item:focus-visible .inv-cta { color: var(--fg); }

/* product scanner HUD + flash */
.inv-flash { position: absolute; inset: 0; z-index: 1; background: #fff; opacity: 0; pointer-events: none; }
.inv-img.inv-flashing .inv-flash { animation: invFlash .16s ease-out 1; }
@keyframes invFlash { 0% { opacity: .22; } 100% { opacity: 0; } }
.inv-hud { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; gap: 8px; padding: 5px 7px;
  background: rgba(0,0,0,.82); font-family: var(--pixel); font-size: 8px; letter-spacing: .1em; color: var(--fg); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; pointer-events: none; }
.inv-hud-n { color: var(--dim); }
.inv-img.inv-loading .inv-hud-n::after { content: " · LOADING"; }
.inv-item.inv-scanning .inv-hud { opacity: 1; transform: none; }
/* touch: counter + dots stay visible, swipe to browse (vertical scroll still works) */
.inv-swipe .inv-img { touch-action: pan-y; }
.inv-swipe .inv-hud { opacity: 1; transform: none; left: auto; padding: 4px 6px; }
.inv-swipe .inv-hud-k { display: none; }
.inv-dots { position: absolute; z-index: 2; left: 0; right: 0; top: 10px; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.inv-dots i { width: 5px; height: 5px; background: rgba(0,0,0,.25); }
.inv-dots i.inv-dot-on { background: #000; }

/* upcoming item: same card, no link, no price, no buy action */
.inv-soon { cursor: default; }
.inv-soon:hover { border-color: var(--line); box-shadow: none; }
.inv-soon:hover::before, .inv-soon:hover::after { opacity: .5; }
.inv-soon .inv-slot { background: transparent; color: var(--dim); border: 1px solid var(--line); }
.inv-soon .inv-img { background: #050505; border: 1px dashed var(--line); }
.inv-soon .inv-img::after { display: none; }
.inv-soon .inv-meta { margin-top: 0; }
.inv-soon .inv-badge { margin-top: auto; align-self: flex-start; color: var(--fg); border: 1px solid var(--fg); padding: 6px 8px; }
.inv-pending { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.inv-pending img { position: static; width: 56px; height: 56px; image-rendering: pixelated; opacity: .35; }
.inv-pending span { font-family: var(--pixel); font-size: 9px; letter-spacing: .14em; color: var(--dim); }

/* selection: "ITEM IDENTIFIED" */
.inv-id { position: absolute; inset: 10px; z-index: 3; display: grid; place-items: center; background: rgba(0,0,0,.78); font-family: var(--pixel); font-size: 11px; letter-spacing: .16em; color: var(--fg); opacity: 0; pointer-events: none; }
.inv-item.inv-picked { border-color: var(--red); box-shadow: 0 0 30px rgba(224,0,0,.35); transform: scale(.985); }
.inv-item.inv-picked .inv-id { opacity: 1; animation: invId .5s steps(5); }
@keyframes invId { 0% { clip-path: inset(50% 0 50% 0); } 50% { clip-path: inset(0 0 0 0); background: rgba(252,252,252,.85); color: #000; } 100% { clip-path: inset(0 0 0 0); } }
.inv-foot .btn.inv-picked { background: var(--fg); color: var(--bg); }

.inv-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.inv-foot .fine { margin: 0; max-width: 60ch; line-height: 1.6; }

@media (max-width: 900px) {
  .inv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inv-name { font-size: 14px; }
  .inv-price { font-size: 18px; }
}
@media (max-width: 640px) {
  .inv-grid { grid-template-columns: 1fr 1fr; }
  .inv-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 5px); justify-self: center; width: 100%; }
  .inv-hint { display: none; }
  .inv-item { padding: 8px; }
  .inv-slot { left: 14px; top: 14px; }
  .inv-foot .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .inv-hint, .inv-item:hover .inv-img::after, .inv-item:focus-visible .inv-img::after { animation: none; }
  .inv-img img { transition: none; }
  .inv-img.inv-flashing .inv-flash { animation: none; }
}
