/* ==========================================================================
   The Wayward Aficionado — shop page
   Every item from every episode, grouped by category. Sits on the same dark
   lounge ground as the homepage; the shelf rows use the cream-card palette
   only as an accent so the page reads as one site.
   ========================================================================== */

.shop-page { padding-block: clamp(2.4rem, 7vw, 4rem) clamp(3rem, 8vw, 5rem); }

.shop-page__lede {
  max-width: 38rem;
  margin: 0 auto 1.8rem;
  color: var(--cream-soft);
  font-size: 1rem;
  line-height: 1.7;
}

/* Shown only when the page was opened from a homepage category tile */
.shop-cat-clear {
  margin: -.9rem 0 1.8rem;
  text-align: center;
}
.shop-cat-clear a {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--line);
}
.shop-cat-clear a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.shop-page__status {
  margin: 2rem 0;
  text-align: center;
  font-size: .9rem;
  color: var(--cream-dim);
}

/* ---------- Affiliate disclosure ---------- */
.affiliate-note {
  max-width: 46rem;
  margin: 0 auto 2rem;
  padding: .9rem 1.1rem;
  font-size: .78rem;
  line-height: 1.65;
  color: var(--cream-soft);
  text-align: left;
  background: rgba(200, 163, 90, .07);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-dim);
}
.affiliate-note strong {
  display: block;
  font-family: var(--serif-body);
  font-weight: 500;
  font-size: .625rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .3rem;
}
.affiliate-note--foot {
  margin: 2.6rem auto 0;
  background: none;
  border-left-color: var(--line-strong);
}

/* ---------- Tools ----------
   One quiet line, not a filter panel. The shop is meant to be browsed by
   shelf; this is only here for a visitor who already knows what they want. */
.shop-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  max-width: 24rem;
  margin: 0 auto 1.8rem;
  text-align: left;
}
.shop-tools__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: .5rem .7rem;
  font-family: var(--serif-body);
  font-size: .82rem;
  color: var(--cream);
  background: rgba(10, 6, 4, .35);
  border: 1px solid var(--line);
  border-radius: 1px;
  -webkit-appearance: none;
  appearance: none;
}
.shop-tools__input::placeholder { color: rgba(179, 162, 136, .62); }
.shop-tools__input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200, 163, 90, .1);
}
/* Hide the browser's own search affordances so the line stays plain */
.shop-tools__input::-webkit-search-decoration,
.shop-tools__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.shop-tools__clear {
  flex: 0 0 auto;
  padding: .5rem .7rem;
  font-family: var(--serif-body);
  font-size: .625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  background: none;
  border: 1px solid var(--line);
  border-radius: 1px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.shop-tools__clear:hover {
  color: var(--gold-bright);
  border-color: var(--line-strong);
}

.shop-tools__label {
  display: block;
  font-size: .625rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .45rem;
}

/* ---------- Jump links ---------- */
.shop-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .45rem;
  margin: 0 auto 2.2rem;
  max-width: 46rem;
}
.shop-jump a {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .35rem .75rem;
  font-size: .625rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-soft);
  border: 1px solid var(--line);
  background: rgba(200, 163, 90, .05);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.shop-jump a:hover {
  color: var(--gold-bright);
  border-color: var(--line-strong);
  background: rgba(200, 163, 90, .12);
}
.shop-jump a span {
  font-size: .5625rem;
  color: var(--gold-dim);
}

/* ---------- Category shelf ---------- */
.shelf {
  max-width: 52rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  scroll-margin-top: 1.5rem;
}

/* A shelf holding nothing yet. It should read as "not yet", never as broken:
   the heading stays, the rule goes dashed and soft, and the space is left open
   rather than padded out with placeholder products we do not have. */
.shelf--quiet { margin-bottom: clamp(1.5rem, 3.6vw, 2.2rem); }
.shelf--quiet .shelf__head {
  border-bottom: 1px dashed rgba(200, 163, 90, .22);
  padding-bottom: .7rem;
  margin-bottom: 0;
}
.shelf--quiet .shelf__title {
  font-size: clamp(1.05rem, 3.2vw, 1.25rem);
  letter-spacing: .14em;
  color: var(--cream-soft);
}
.shelf--quiet .shelf__count {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: none;
  color: var(--gold-dim);
}

.shelf__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: .2rem;
}
.shelf__title {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream);
}
.shelf__count {
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}

.shelflist { list-style: none; margin: 0; padding: 0; }

.shelfitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .2rem;
  border-bottom: 1px solid rgba(200, 163, 90, .14);
}
.shelfitem:last-child { border-bottom: 0; }

.shelfitem__main { min-width: 0; }

.shelfitem__name {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--cream);
}
.shelfitem__detail {
  margin: .1rem 0 0;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--cream-soft);
}
.shelfitem__where {
  margin: .3rem 0 0;
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.shelfitem__where a {
  color: var(--gold-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.shelfitem__where a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--line-strong);
}

/* Buy control, dark theme version of the card button */
.shop-page .buy {
  flex: 0 0 auto;
  padding: .42rem .9rem;
  font-size: .625rem;
  letter-spacing: .18em;
  text-decoration: none;
  color: var(--gold-bright);
  border: 1px solid var(--line-strong);
  background: rgba(200, 163, 90, .08);
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.shop-page .buy:hover {
  color: var(--espresso);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}
.shop-page .buy--none {
  color: var(--cream-dim);
  border-color: transparent;
  background: none;
}

@media (max-width: 30rem) {
  .shelfitem { align-items: flex-start; gap: .7rem; }
  .shop-page .buy { padding: .38rem .7rem; font-size: .5625rem; }
}
