.page-products {
  background: var(--bg-warm);
  color: var(--text-primary);
  --shelf-cream: #FFE8D6;
  --shelf-sky: #7DD3FC;
  --shelf-slate: #C9C9D4;
}

.page-products .container {
  max-width: calc(var(--content-max) + 96px);
  margin: 0 auto;
  padding: 24px 20px 52px;
}

.page-products .breadcrumbs {
  margin-bottom: 18px;
}

.page-products__hero {
  padding-bottom: 22px;
}

.page-products__hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  display: inline;
  background-image: linear-gradient(transparent 80%, var(--card-lemon) 80%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 2px;
}

.page-products__lead {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
  max-width: 720px;
}

.page-products__layout {
  margin-top: 6px;
}

.page-products__side {
  background: var(--bg-deep);
  color: var(--text-on-deep);
  border-radius: var(--radius-lg);
  border: 3px solid var(--text-primary);
  box-shadow: var(--shadow-pop);
  padding: 20px;
  margin-bottom: 24px;
}

.page-products__filter-img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  border: 2px solid rgba(255, 255, 255, 0.16);
}

.page-products__filter-title {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-products__filter-title::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
  display: inline-block;
}

.page-products__filter-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-size: 12px;
  color: #fff;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.page-products__filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.page-products__filter-group {
  margin-bottom: 18px;
}

.page-products__filter-label {
  font-family: var(--font-display);
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--text-soft);
}

.page-products__filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-products__filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-deep);
  font-family: var(--font-display);
  font-size: 13px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.page-products__filter-chip:hover {
  border-color: var(--card-lemon);
  color: var(--card-lemon);
}

.page-products__filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-products__filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.page-products__filter-actions .btn {
  flex: 1;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  padding: 9px 10px;
  border-radius: var(--radius-pill);
}

.page-products__filter-actions .btn--ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.28);
  color: var(--text-on-deep);
}

.page-products__content {
  min-width: 0;
}

.page-products__shelves {
  margin-bottom: 28px;
}

.page-products .section-head {
  margin-bottom: 14px;
}

.page-products__shelf-grid {
  display: grid;
  gap: 20px;
}

.page-products__shelf {
  position: relative;
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 18px 18px 16px;
  overflow: hidden;
  background: var(--shelf-bg);
  color: var(--shelf-text);
  min-height: 260px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.page-products__shelf:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--text-primary);
}

.page-products__shelf::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: currentColor;
  opacity: 0.28;
}

.page-products__shelf::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
  background-size: 14px 14px;
  z-index: 0;
}

.page-products__shelf--coral {
  --shelf-bg: var(--card-coral);
  --shelf-text: var(--text-primary);
}

.page-products__shelf--lemon {
  --shelf-bg: var(--card-lemon);
  --shelf-text: var(--text-primary);
}

.page-products__shelf--mint {
  --shelf-bg: var(--card-mint);
  --shelf-text: var(--text-on-deep);
}

.page-products__shelf--lavender {
  --shelf-bg: var(--card-lavender);
  --shelf-text: var(--text-on-deep);
}

.page-products__shelf--orange {
  --shelf-bg: var(--accent);
  --shelf-text: #fff;
}

.page-products__shelf--deep {
  --shelf-bg: var(--bg-deep);
  --shelf-text: var(--text-on-deep);
}

.page-products__shelf--sky {
  --shelf-bg: var(--shelf-sky);
  --shelf-text: var(--text-primary);
}

.page-products__shelf--slate {
  --shelf-bg: var(--shelf-slate);
  --shelf-text: var(--text-primary);
}

.page-products__shelf--cream {
  --shelf-bg: var(--shelf-cream);
  --shelf-text: var(--text-primary);
}

.page-products__shelf--feature,
.page-products__shelf--span {
  grid-column: 1 / -1;
}

.page-products__shelf-flag {
  position: absolute;
  top: 10px;
  right: 14px;
  transform: rotate(3deg);
  z-index: 3;
  background: #fff;
  border: 2px solid var(--text-primary);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: var(--font-hand);
  font-size: 12px;
  color: var(--text-primary);
}

.page-products__shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
}

.page-products__shelf-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
}

.page-products__shelf-count {
  font-family: var(--font-hand);
  font-size: 13px;
  padding: 3px 10px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  opacity: 0.8;
  flex: 0 0 auto;
}

.page-products__shelf-img {
  position: absolute;
  top: 38px;
  right: 14px;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.24);
  z-index: 1;
  opacity: 0.9;
}

.page-products__shelf--feature .page-products__shelf-img {
  top: 52px;
}

.page-products__shelf-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.page-products__shelf--feature .page-products__shelf-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-products__shelf-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.20);
  font-family: var(--font-body);
  font-size: 14px;
}

.page-products__shelf-item::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--status-serializing);
}

.page-products__shelf-item.is-finished::before {
  background: var(--status-finished);
}

.page-products__shelf-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.page-products__shelf-ep {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 13px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  opacity: 0.82;
}

.page-products__tags {
  background: var(--bg-panel);
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 20px;
}

.page-products__tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.page-products .tag--lg {
  font-size: 18px;
  padding: 10px 18px;
}

.page-products .tag--md {
  font-size: 15px;
  padding: 8px 14px;
}

.page-products .tag--sm {
  font-size: 13px;
  padding: 6px 12px;
}

.page-products .tag.is-active {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.page-products__progress {
  margin-top: 32px;
}

.page-products__progress-img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 2px solid var(--divider);
}

.page-products .table-wrap {
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--bg-panel);
  box-shadow: var(--shadow-pop);
}

.page-products .data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.page-products .data-table th {
  background: var(--bg-deep);
  color: var(--text-on-deep);
  font-family: var(--font-display);
  font-size: 14px;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
}

.page-products .data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--divider);
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  white-space: nowrap;
}

.page-products .data-table tbody tr:last-child td {
  border-bottom: 0;
}

.page-products .data-table tbody tr:nth-child(even) td {
  background: #FCF9F2;
}

.page-products .data-table tbody tr:hover td {
  background: rgba(255, 107, 53, 0.08);
}

.page-products__title-link {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.page-products__title-link:hover {
  color: var(--accent);
}

.page-products__genre-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
  font-size: 13px;
  color: var(--text-primary);
}

.page-products__ep-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-products .indicator {
  width: 112px;
  height: 8px;
  background: var(--divider);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.page-products .indicator__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.page-products .indicator--serializing {
  background: var(--status-serializing);
}

.page-products .indicator--finished {
  background: var(--status-finished);
}

.page-products .num-mark--sm {
  font-size: 14px;
}

.page-products .status-badge {
  flex: 0 0 auto;
}

.page-products__index {
  margin-top: 32px;
  background: var(--bg-deep);
  color: var(--text-on-deep);
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 24px 20px;
}

.page-products__index-img {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.page-products__index-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-soft);
  margin: 18px 0 8px;
}

.page-products .index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-products .index-bar__item {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 8px 10px;
  background: var(--card-lemon);
  border: 2px solid var(--text-primary);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--bg-deep);
  transition: transform .18s ease, box-shadow .18s ease;
}

.page-products .index-bar__item:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.page-products__notes {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.page-products__note-card {
  background: var(--card-lemon);
  border: 3px solid var(--text-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 18px 20px;
}

.page-products__note-card--deep {
  background: var(--bg-deep);
  color: var(--text-on-deep);
}

.page-products__note-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 6px;
}

.page-products__note-card p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
  color: inherit;
  opacity: 0.88;
}

.page-products__landing {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--text-primary);
  box-shadow: var(--shadow-pop);
}

.page-products__landing img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 720px) {
  .page-products__shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-products__shelf {
    min-height: 280px;
  }

  .page-products__shelf-img {
    width: 84px;
    height: 84px;
  }

  .page-products__notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .page-products__layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .page-products__side {
    position: sticky;
    top: 24px;
    margin-bottom: 0;
  }

  .page-products .container {
    padding-top: 32px;
  }
}
