:root {
  --bg: #f1f7ff;
  --panel: #ffffff;
  --line: #d4e2ef;
  --ink: #18314a;
  --muted: #5e768b;
  --blue: #0f5fbf;
  --blue-deep: #0b3470;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comic Neue", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

.container {
  width: min(1200px, 94%);
  margin: 0 auto;
}

.inventory-hero {
  background: linear-gradient(135deg, #e2f2ff 0%, #c8e4ff 50%, #b4daff 100%);
  border-bottom: 3px solid #9bc4ee;
  padding: 1.2rem 0 1rem;
}

.inventory-hero h1 {
  margin: 0;
  font-family: "Bangers", "Impact", sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  letter-spacing: 0.04em;
}

.inventory-hero p {
  margin: 0.25rem 0 0;
  font-weight: 700;
  color: #2d4f6d;
}

.shop-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #8ab5df;
}

.shop-hero__poster {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg, rgba(12, 23, 38, 0.18), rgba(12, 23, 38, 0.5)),
    url("/assets/photos/hero-mashup.png") center 35% / cover no-repeat;
  filter: saturate(1.12) contrast(1.04) brightness(1.03);
}

.shop-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.3rem 0 1.8rem;
}

.shop-hero h1 {
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 0 #122437, 0 5px 20px rgba(0, 0, 0, 0.35);
  font-family: "Bangers", "Impact", sans-serif;
  letter-spacing: 0.05em;
  font-size: clamp(2rem, 5vw, 3.7rem);
}

.shop-hero p {
  margin: 0.45rem auto 0;
  max-width: 760px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.inventory-controls {
  margin-top: 0.55rem;
  padding: 0.2rem 0 1rem;
}

.category-strip-full {
  width: 100%;
}

.category-strip {
  border-top: 2px solid #88b7ea;
  border-bottom: 5px solid #0b4c97;
  background: linear-gradient(180deg, #d6e9ff 0%, #c0dbfb 100%);
  padding: 0;
}

.category-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: 0;
  align-items: stretch;
  width: 100%;
  overflow-x: auto;
}

.category-pills a {
  flex: 1 1 0;
  min-width: 120px;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid #2d73bf;
  border-radius: 0;
  padding: 0.44rem 0.5rem;
  min-height: 36px;
  text-decoration: none;
  font-family: "Bangers", "Impact", sans-serif;
  letter-spacing: 0.04em;
  color: #0f3e74;
  background: linear-gradient(180deg, #f5faff 0%, #e4effd 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-pills a:first-child {
  border-left: 1px solid #2d73bf;
}

.category-pills a.is-active {
  color: #fff;
  background: linear-gradient(180deg, #3f98ff 0%, #0f66cc 100%);
  border-right-color: #0a4f9c;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.category-pills a.is-active:first-child {
  border-left-color: #0a4f9c;
}

.filter-toggle {
  border: 1px solid #2a68b2;
  border-radius: 6px;
  padding: 0.34rem 0.62rem;
  color: #f4f9ff;
  background: linear-gradient(145deg, #3288eb, #0f5fbf);
  font-family: "Bangers", "Impact", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.1;
}

.filter-panel {
  margin-top: 0.7rem;
}

.inventory-control-row {
  margin-top: 0.55rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.filter-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
}

.filter-grid label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #496275;
}

.filter-grid input,
.filter-grid select {
  border: 1px solid #c4d6e8;
  border-radius: 6px;
  padding: 0.5rem 0.55rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.filter-actions button,
.filter-actions a,
.view-switch a,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2a68b2;
  border-radius: 6px;
  padding: 0.48rem 0.7rem;
  min-height: 2.15rem;
  text-decoration: none;
  color: #f4f9ff;
  background: linear-gradient(145deg, #3288eb, #0f5fbf);
  font-family: "Bangers", "Impact", sans-serif;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.filter-actions a {
  background: #edf4fc;
  color: var(--blue-deep);
}

.view-switch {
  display: inline-flex;
  gap: 0.45rem;
}

.view-switch a {
  background: #eaf3ff;
  color: var(--blue-deep);
  padding: 0.34rem 0.62rem;
  font-size: 0.95rem;
  line-height: 1.1;
}

.view-switch a.is-active {
  background: linear-gradient(145deg, #3288eb, #0f5fbf);
  color: #fff;
}

.result-count {
  margin: 0.55rem 0 0;
  color: #4b6479;
  font-weight: 700;
}

.inventory-results {
  padding-bottom: 1rem;
}

.inventory-results--list {
  display: grid;
  gap: 0.7rem;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.item-card--list {
  display: grid;
  grid-template-columns: 145px 1fr;
}

.item-card--poster {
  display: grid;
}

.inventory-results--poster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.item-card__thumb {
  display: block;
  background: #d9e9fb;
}

.item-card__thumb img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.item-card__body {
  padding: 0.65rem 0.72rem;
}

.item-card h2 {
  margin: 0;
  font-size: 1.14rem;
}

.item-card h2 a {
  color: #0f2f78;
  text-decoration: none;
}

.item-card h2 a:hover {
  text-decoration: underline;
}

.meta {
  margin: 0.45rem 0 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.meta span {
  display: inline-block;
  border: 1px solid #ccdef0;
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  font-size: 0.76rem;
  color: #426177;
  background: #f3f8fe;
}

.meta .badge {
  background: #ffe7a8;
  border-color: #ffd567;
  color: #6f4b00;
}

.desc {
  margin: 0.52rem 0 0;
  color: #365166;
}

.pricing {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: #314d64;
  font-weight: 700;
}

.empty-results {
  background: #fff;
  border: 1px dashed #b7cde2;
  border-radius: 9px;
  padding: 1rem;
  color: #4c6478;
  font-weight: 700;
}

.pagination {
  padding: 0.6rem 0 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination a {
  color: #0f5fbf;
  font-weight: 700;
}

.item-page .item-hero-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.item-page .item-hero-head h1 {
  margin: 0;
  font-family: "Bangers", "Impact", sans-serif;
  letter-spacing: 0.03em;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  line-height: 1.08;
  font-weight: 700;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  white-space: normal;
  color: #ffffff;
  text-shadow:
    -2px -2px 0 #0f5fbf,
    2px -2px 0 #0f5fbf,
    -2px 2px 0 #0f5fbf,
    2px 2px 0 #0f5fbf,
    0 3px 8px rgba(13, 47, 120, 0.42);
}

.item-controls {
  padding-bottom: 0.45rem;
}

.back-link-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.item-layout {
  padding: 1rem 0 1.4rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.9rem;
}

.item-gallery,
.item-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
}

.item-gallery__hero {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #cfdfef;
  max-height: 520px;
  object-fit: contain;
  background: #eff5fc;
}

.item-gallery__hero-btn {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  cursor: zoom-in;
}

.item-gallery__thumbs {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.4rem;
}

.item-gallery__thumbs img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border: 1px solid #cfdfef;
  border-radius: 6px;
}

.item-gallery__thumb-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 29, 0.8);
}

.gallery-modal__content {
  position: relative;
  z-index: 1;
  width: min(1060px, 95vw);
  margin: 3vh auto;
  height: 94vh;
  display: grid;
  place-items: center;
}

.gallery-modal__image {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid rgba(160, 192, 227, 0.7);
  background: #f5f9ff;
}

.gallery-modal__close,
.gallery-modal__nav {
  border: 1px solid #2d74bf;
  border-radius: 8px;
  background: linear-gradient(145deg, #3288eb, #0f5fbf);
  color: #fff;
  font-family: "Bangers", "Impact", sans-serif;
  cursor: pointer;
}

.gallery-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 42px;
  height: 42px;
}

.gallery-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 54px;
  font-size: 1.2rem;
}

.gallery-modal__nav--prev {
  left: 0.7rem;
}

.gallery-modal__nav--next {
  right: 0.7rem;
}

.gallery-modal__counter {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #e8f2ff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.detail-description {
  margin: 0.6rem 0;
  color: #2d4b61;
}

.detail-grid {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-grid div {
  border: 1px solid #d8e5f1;
  border-radius: 6px;
  padding: 0.42rem 0.5rem;
  background: #f8fbff;
}

.detail-grid dt {
  font-size: 0.75rem;
  font-weight: 700;
  color: #567086;
}

.detail-grid dd {
  margin: 0.2rem 0 0;
  color: #1f3f57;
  font-weight: 700;
}

.ebay-comp-panel {
  margin-top: 1rem;
  border: 1px solid #c8d9eb;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfeff 0%, #f0f7ff 100%);
  padding: 0.75rem;
}

.ebay-comp-panel h2 {
  margin: 0;
  font-family: "Bangers", "Impact", sans-serif;
  letter-spacing: 0.04em;
  color: #124f8f;
  font-size: 1.2rem;
}

.ebay-comp-panel__summary {
  margin: 0.45rem 0 0.7rem;
  color: #32597a;
  font-weight: 700;
  font-size: 0.9rem;
}

.ebay-comp-panel__table-wrap {
  overflow-x: auto;
}

.ebay-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ebay-comp-table th,
.ebay-comp-table td {
  text-align: left;
  padding: 0.42rem 0.45rem;
  border-top: 1px solid #d7e4f2;
  vertical-align: top;
}

.ebay-comp-table thead th {
  border-top: 0;
  background: #eaf3fe;
  color: #1b4f83;
  font-weight: 800;
}

.ebay-comp-table td a {
  color: #0f5fbf;
  text-decoration: none;
}

.ebay-comp-table td a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-results--poster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .item-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .item-card--list {
    grid-template-columns: 1fr;
  }

  .inventory-control-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .inventory-results--poster {
    grid-template-columns: 1fr;
  }

  .item-gallery__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-modal__nav {
    width: 40px;
    height: 48px;
  }

  .ebay-comp-table {
    font-size: 0.84rem;
  }
}
