/* ==========================================================================
   Abracabazza — the shop
   The homepage preview (between Reviews and FAQ) and shop.html's catalogue.
   eBay is the source of truth: no prices, no stock claims, every purchase
   link goes to the listing on eBay. Tokens come from :root in styles.css.
   Mobile first; the same 900px breakpoint as the rest of the site.
   ========================================================================== */

/* External-link arrow inside buttons and text links. */
.ext-icon {
  flex: none;
  width: 0.85em;
  height: 0.85em;
}

/* --------------------------------------------------------------------------
   Homepage preview
   Continues the charcoal from Reviews under a hairline, like the FAQ does.
   Copy on one side, a small fan of three real decks on the other.
   -------------------------------------------------------------------------- */

.shop-preview {
  position: relative;
  padding: 0 var(--gutter) clamp(5rem, 13vw, 10rem);
  background: var(--bg);
  color: var(--ink);
}

.shop-preview__inner {
  display: grid;
  gap: clamp(3rem, 8vw, 4rem);
  align-items: center;
  max-width: 1320px;
  margin-inline: auto;
  padding-top: clamp(4rem, 11vw, 8rem);
  border-top: 1px solid var(--line);
}

.shop-preview__copy {
  display: grid;
  justify-items: start;
  max-width: 36rem;
}

.shop-preview__lede {
  max-width: 38ch;
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.shop-preview__copy .btn {
  margin-top: clamp(2rem, 5vw, 2.5rem);
}

.shop-preview__note {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* The fan: three card-shaped frames, the outer two turned out from the
   centre one, like a hand of cards held up for the audience. */
.shop-fan {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 34rem);
  margin: 0 auto;
  padding: 1.5rem 0 1rem;
}

.shop-fan__card {
  position: relative;
  aspect-ratio: 5 / 7;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-raised);
  box-shadow:
    0 0 0 1px rgba(214, 173, 98, 0.45),
    0 28px 50px -24px rgba(0, 0, 0, 0.95);
}

.shop-fan__card:nth-child(1) {
  z-index: 1;
  transform: translateX(14%) rotate(-9deg) translateY(6%);
}

.shop-fan__card:nth-child(2) {
  z-index: 2;
  transform: scale(1.08);
}

.shop-fan__card:nth-child(3) {
  z-index: 1;
  transform: translateX(-14%) rotate(9deg) translateY(6%);
}

.shop-fan__card :is(picture, img) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shop-fan__card img {
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

@media (min-width: 900px) {
  .shop-preview__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

@media (max-width: 479.98px) {
  .shop-preview__copy .btn {
    width: 100%;
    letter-spacing: 0.14em;
  }
}

/* --------------------------------------------------------------------------
   shop.html
   An editorial intro, then the catalogue inside a "display cabinet": a gold
   double hairline with a suit pip at each corner. Six cards, each framed like
   a playing card, with the listing photo, title and the eBay button.
   -------------------------------------------------------------------------- */

.shop-page {
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(4rem, 10vw, 8rem);
}

.shop-page > * {
  max-width: 1320px;
  margin-inline: auto;
}

.shop-intro {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.shop-intro .section-title {
  font-size: clamp(2.6rem, 9vw, 5.5rem);
}

.shop-intro__lede {
  max-width: 44ch;
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .shop-intro {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    column-gap: clamp(3rem, 6vw, 6rem);
  }
}

/* The eBay notice: plain and near the catalogue, not small print. */
.shop-notice {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--gold);
  background: var(--bg-raised);
}

.shop-notice__icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--gold);
}

.shop-notice p {
  max-width: 72ch;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.shop-notice strong {
  color: var(--ink);
}

/* The cabinet. */
.shop-cabinet {
  position: relative;
  margin-top: clamp(1.5rem, 4vw, 2rem);
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid rgba(214, 173, 98, 0.45);
  outline: 1px solid rgba(214, 173, 98, 0.18);
  outline-offset: -7px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(142, 17, 26, 0.16), transparent 60%), #0a0808;
}

.shop-cabinet__pip {
  position: absolute;
  width: 14px;
  height: 14px;
  padding: 3px;
  box-sizing: content-box;
  background: var(--bg);
}

.shop-cabinet__pip--tl { top: -10px; left: -10px; }
.shop-cabinet__pip--tr { top: -10px; right: -10px; }
.shop-cabinet__pip--bl { bottom: -10px; left: -10px; }
.shop-cabinet__pip--br { bottom: -10px; right: -10px; }

.shop-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

@media (min-width: 1024px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A product card: playing-card corners, a fine gold inner line, the index
   number in the corner the way a card carries its rank. */
.product {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--bg-raised);
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 60px -36px rgba(0, 0, 0, 0.9);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s var(--ease-out);
}

.product::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(214, 173, 98, 0.22);
  border-radius: 9px;
  pointer-events: none;
}

.product:hover,
.product:focus-within {
  box-shadow:
    0 0 0 1px rgba(214, 173, 98, 0.55),
    0 34px 60px -30px rgba(0, 0, 0, 0.95);
}

@media (prefers-reduced-motion: no-preference) {
  .product:hover {
    transform: translateY(-3px);
  }
}

.product__media {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 12px 12px 0;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}

.product__media :is(picture, img) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product__media img {
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.product__index {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 2.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  background: rgba(5, 4, 4, 0.78);
  font-family: var(--font-brand);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--gold-light);
}

.product__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem 1.4rem 1.5rem;
}

.product__meta {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.product__title {
  margin: 0;
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

/* Pushed to the bottom so the buttons line up across a row; the title's
   bottom margin keeps a minimum gap above it. */
.product__title {
  margin-bottom: 1rem;
}

.product__buy {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

/* The way out to the rest of the store. */
.shop-more {
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: clamp(3.5rem, 9vw, 6rem);
  text-align: center;
}

.shop-more .section-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

.shop-more p {
  max-width: 40ch;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  color: var(--ink-soft);
}

.shop-more .btn {
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
}

@media (max-width: 479.98px) {
  .shop-more .btn,
  .product__buy {
    letter-spacing: 0.14em;
  }

  .shop-more .btn {
    width: 100%;
  }
}

/* Cards settle in once on load, gently staggered. Visible by default. */
@media (prefers-reduced-motion: no-preference) {
  .js .shop-grid .product {
    animation: shop-deal 0.6s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 70ms + 120ms);
  }
}

@keyframes shop-deal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Current page in the footer nav, matching the header's gold. */
.site-footer__nav a[aria-current="page"] {
  color: var(--gold-light);
}
