/* MochiPaw storefront shop wall — studio-style grid + cart actions */

:root {
  --shop-bg: #121417;
  --shop-panel: #1a1d22;
  --shop-tile: #0e1013;
  --shop-line: #2a3038;
  --shop-ink: #f4f1ea;
  --shop-muted: #9aa3ad;
  --shop-code: #d8ff3e;
  --shop-accent: #37d6c5;
  --shop-gap: 8px;
  --shop-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --shop-display: "Bebas Neue", Impact, sans-serif;
}

body.mp-shop {
  background: var(--shop-bg);
  color: var(--shop-ink);
  font-family: var(--shop-font);
  /* overflow-x:hidden on body breaks sticky; shop bar uses fixed instead. */
}

body.mp-shop .mp-main {
  background: var(--shop-bg);
  padding-bottom: 2rem;
}

.shop-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.shop-bar-spacer {
  display: block;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.shop-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 35;
  overflow-anchor: none;
  background: color-mix(in srgb, var(--shop-panel) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--shop-line);
  padding: 0.65rem 0.85rem 0.75rem;
}

.shop-bar.is-compact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.shop-bar.is-compact .shop-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.shop-bar.is-compact .shop-pills {
  flex: 0 1 auto;
  max-width: 42%;
}

.shop-bar.is-compact .shop-pills[aria-label="Orientation"] {
  max-width: 28%;
}

.shop-bar.is-compact .shop-pill {
  padding: 0.26rem 0.55rem;
  font-size: 0.7rem;
}

.shop-bar.is-compact .shop-search {
  flex: 1 1 7rem;
  min-width: 6.5rem;
}

.shop-bar.is-compact .shop-search input {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
}

.shop-filters {
  display: grid;
  gap: 0.4rem;
}

.shop-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.shop-pills::-webkit-scrollbar {
  display: none;
}

.shop-pill {
  flex: 0 0 auto;
  border: 1px solid var(--shop-line);
  background: var(--shop-tile);
  color: var(--shop-ink);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.shop-pill.is-on {
  background: var(--shop-code);
  border-color: var(--shop-code);
  color: #121417;
}

.shop-search input {
  width: 100%;
  border: 1px solid var(--shop-line);
  background: var(--shop-tile);
  color: var(--shop-ink);
  border-radius: 0.55rem;
  padding: 0.55rem 0.75rem;
  outline: none;
}

.shop-search input:focus {
  border-color: var(--shop-accent);
}

.shop-search input::placeholder {
  color: var(--shop-muted);
}

.shop-shell {
  padding: 0.55rem 0.45rem 1.5rem;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--shop-gap);
  align-items: start;
}

@media (min-width: 700px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .shop-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.shop-card {
  margin: 0;
  background: var(--shop-tile);
  border: 1px solid color-mix(in srgb, var(--shop-line) 80%, transparent);
  border-radius: 0.4rem;
  overflow: hidden;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.shop-card__media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #090a0c;
  cursor: zoom-in;
}

.shop-card__img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 9rem;
  object-fit: contain;
  background: #090a0c;
}

.shop-card__meta {
  padding: 0.45rem 0.5rem 0.55rem;
  border-top: 1px solid var(--shop-line);
  display: grid;
  gap: 0.28rem;
}

.shop-card__code {
  font-family: var(--shop-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--shop-code);
}

.shop-card__title {
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--shop-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card__series {
  font-size: 0.62rem;
  color: var(--shop-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.shop-card__price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--shop-ink);
  font-variant-numeric: tabular-nums;
}

.shop-add {
  border: 1px solid var(--shop-line);
  background: var(--shop-code);
  color: #121417;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.shop-add:hover {
  filter: brightness(1.05);
}

.shop-add.is-done {
  background: #2a333c;
  border-color: var(--shop-accent);
  color: var(--shop-accent);
  cursor: default;
}

.shop-add.is-done:hover {
  filter: none;
}

.shop-pager {
  position: sticky;
  bottom: 0.45rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.85rem auto 0;
  width: fit-content;
  max-width: calc(100% - 0.7rem);
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--shop-panel) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.shop-pager[hidden] {
  display: none !important;
}

.shop-page-btn {
  border: 1px solid var(--shop-line);
  background: var(--shop-tile);
  color: var(--shop-ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.shop-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.shop-page-info {
  color: var(--shop-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.shop-empty {
  color: var(--shop-muted);
  padding: 1rem 0.4rem;
  grid-column: 1 / -1;
}

/* Lightbox */
.shop-lightbox[hidden] {
  display: none !important;
}

.shop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.shop-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: zoom-out;
}

.shop-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 56rem);
  max-height: 96vh;
  overflow: auto;
  background: var(--shop-panel);
  border: 1px solid var(--shop-line);
  border-radius: 0.75rem;
  padding: 0.85rem 0.85rem 0.7rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.shop-lightbox__x {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--shop-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.shop-lightbox__meta {
  padding-right: 2rem;
  margin-bottom: 0.55rem;
}

.shop-lightbox__code {
  font-family: var(--shop-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: var(--shop-code);
}

.shop-lightbox__title {
  margin-top: 0.35rem;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  font-weight: 600;
}

.shop-lightbox__sub {
  margin-top: 0.25rem;
  color: var(--shop-muted);
  font-size: 0.8rem;
}

.shop-lightbox__stage {
  background: #050607;
  border-radius: 0.45rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 36vh;
}

.shop-lightbox__stage img {
  max-width: 100%;
  max-height: 62vh;
  width: auto;
  height: auto;
  display: block;
}

.shop-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.shop-lightbox__price {
  font-size: 1.15rem;
  font-weight: 600;
}

.shop-nav {
  border: 1px solid var(--shop-line);
  background: var(--shop-tile);
  color: var(--shop-ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  cursor: pointer;
}

@media (min-width: 900px) {
  .shop-filters {
    grid-template-columns: minmax(0, 1fr) auto minmax(12rem, 16rem);
    align-items: center;
  }
}
