.inventory-page { padding-top: var(--header-h, 76px); }
.inventory-main { padding-block: 2.5rem 4rem; }
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.inventory-card {
  background: var(--color-surface, #fff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.3);
}
.inventory-card a { color: inherit; text-decoration: none; display: block; }
.inventory-card img, .inventory-placeholder {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #dbe4ef;
}
.inventory-placeholder { display: grid; place-items: center; color: #64748b; }
.inventory-card-body { padding: 1rem 1.1rem 1.2rem; }
.inventory-card h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.price, .price-xl { font-weight: 800; color: var(--color-primary, #0f5fae); }
.price-xl { font-size: 1.4rem; }
.meta, .crumb { color: var(--color-muted, #6b7280); }
.badge-reserved { display: inline-block; margin-top: 0.4rem; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.78rem; font-weight: 700; }

.gallery { margin: 1.25rem 0 2rem; }
.gallery-main { position: relative; }
.gallery-main img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 16px; background: #111; }
.gallery-open {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 999px;
  padding: 0.45rem 0.8rem; cursor: pointer; font: inherit;
}
.gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; margin-top: 0.65rem; scroll-snap-type: x mandatory; }
.gallery-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; scroll-snap-align: start; }
.gallery-thumbs img { width: 110px; height: 74px; object-fit: cover; border-radius: 8px; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.85rem; margin: 1.5rem 0; }
.spec-grid dt { font-size: 0.8rem; color: var(--color-muted, #6b7280); }
.spec-grid dd { margin: 0; font-weight: 700; }
.equip-list { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; }
.equip-list li { background: #eef4fb; border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.88rem; }

.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; background: rgba(0,0,0,.92); }
.lightbox::backdrop { background: rgba(0,0,0,.75); }
.lightbox[open] { display: grid; place-items: center; width: 100%; height: 100%; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: transparent; color: #fff; border: 0; font-size: 2.2rem; cursor: pointer;
}
.lightbox-close { top: 12px; right: 18px; }
.lightbox-prev { left: 12px; top: 50%; }
.lightbox-next { right: 12px; top: 50%; }

.inventory-page .sell-band-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.inventory-placeholder {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border-radius: 16px;
  background: #e8eef5;
  color: #64748b;
  text-align: center;
}

@media (max-width: 640px) {
  .gallery-main img { max-height: 280px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .lightbox-prev, .lightbox-next { font-size: 1.8rem; }
}
@media (max-width: 400px) {
  .spec-grid { grid-template-columns: 1fr; }
}

html[data-theme="dark"] .inventory-card,
html[data-theme="dark"] .inventory-placeholder {
  background: #1b222c;
  color: #c3cad4;
}
html[data-theme="dark"] .equip-list li { background: #243041; color: #e8edf4; }
html[data-theme="dark"] .inventory-card { box-shadow: none; border: 1px solid rgba(255,255,255,.08); }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .inventory-card,
  html:not([data-theme="light"]) .inventory-placeholder {
    background: #1b222c;
    color: #c3cad4;
  }
  html:not([data-theme="light"]) .equip-list li { background: #243041; color: #e8edf4; }
}
