/* Merch page (merch.html): the Fourthwall storefront. Builds on style.css. */

.merch { position: relative; z-index: 1; padding: 0 0 80px; }
.merch-all, .pop-head h2, .show-head h2 { font-size: clamp(24px, 4vw, 34px); }
.merch-all { margin-bottom: 20px; }

/* Showcase: real photos of the merch being worn */
.merch-showcase { position: relative; z-index: 1; padding: 0 0 48px; }
.show-head { text-align: center; margin-bottom: 22px; }
.show-head .sec-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--lu-blue-br); margin-bottom: 8px; }
.show-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 680px; margin: 0 auto; }
.show-card { position: relative; display: block; padding: 0; border: 1px solid var(--lu-line); border-radius: 16px;
  overflow: hidden; background: var(--lu-black-2); cursor: default; font: inherit; color: #fff; aspect-ratio: 3 / 4; }
.show-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.show-card.linked { cursor: pointer; }
.show-card.linked:hover img, .show-card.linked:focus-visible img { transform: scale(1.04); }
.show-card.linked:hover, .show-card.linked:focus-visible { border-color: var(--lu-red); outline: none; }
.show-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; text-align: left; font-weight: 800;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.show-card.linked .show-cap::after { content: " →"; color: var(--lu-red); }

/* Popular carousel: a row of cards that scrolls sideways */
.merch-popular { position: relative; z-index: 1; padding: 0 0 48px; }
.pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pop-arrows { display: flex; gap: 8px; }
.pop-arrows button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--lu-line); background: var(--lu-black-2);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.pop-arrows button:hover { border-color: var(--lu-red); }
.pop-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - 54px) / 4)); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--lu-line) transparent; }
.pop-track .prod { scroll-snap-align: start; }

.merch-note { background: var(--lu-black-3); border: 1px dashed var(--lu-red); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 24px; font-size: 14px; color: var(--lu-bone); }

.merch-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.merch-status { grid-column: 1 / -1; text-align: center; color: var(--lu-grey); padding: 40px 0; }

.prod { background: var(--lu-black-2); border: 1px solid var(--lu-line); border-radius: 16px; overflow: hidden;
  cursor: pointer; transition: transform .25s ease, border-color .25s ease; display: flex; flex-direction: column;
  text-align: left; color: inherit; font: inherit; padding: 0; }
.prod:hover, .prod:focus-visible { transform: translateY(-4px); border-color: var(--lu-red); outline: none; }
.prod-img { aspect-ratio: 1; background: var(--lu-black-3); display: grid; place-items: center; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img .ph { font-size: 64px; }
.prod-body { padding: 16px 18px 20px; }
.prod-body h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.prod-price { color: var(--lu-red); font-weight: 800; }
.prod-price s, .pm-price s { color: var(--lu-grey-d); font-weight: 400; margin-left: 8px; }
.prod-sold { color: var(--lu-grey); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

/* Modals */
.merch-modal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.72); display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.merch-modal[hidden] { display: none; }
.merch-modal-box { position: relative; background: var(--lu-black-2); border: 1px solid var(--lu-line); border-radius: 18px;
  width: min(920px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; }
.merch-x { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--lu-grey);
  font-size: 32px; line-height: 1; cursor: pointer; z-index: 1; }
.merch-x:hover { color: #fff; }

.pm-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.pm-media img#pmImage { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--lu-black-3); }
.pm-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pm-thumbs button { width: 56px; height: 56px; padding: 0; border: 2px solid var(--lu-line); border-radius: 8px;
  overflow: hidden; background: none; cursor: pointer; }
.pm-thumbs button.on { border-color: var(--lu-red); }
.pm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pm-info h2 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 10px; }
.pm-price { font-size: 22px; font-weight: 800; color: var(--lu-red); margin-bottom: 18px; }
.pm-opt { margin-bottom: 16px; }
.pm-opt-label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lu-grey); margin-bottom: 8px; }
.pm-opt-label span { color: #fff; letter-spacing: normal; text-transform: none; font-weight: 600; margin-left: 6px; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-chip { min-width: 44px; padding: 8px 14px; border: 2px solid var(--lu-line); border-radius: 10px; background: var(--lu-black-3);
  color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.pm-chip.on { border-color: var(--lu-red); }
.pm-chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.pm-chip .sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 6px;
  border: 1px solid rgba(255,255,255,.3); }
.pm-stock { font-size: 13px; color: var(--lu-grey); min-height: 20px; margin-bottom: 12px; }
.pm-add { width: 100%; justify-content: center; }
.pm-add:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pm-desc { margin-top: 22px; color: var(--lu-grey); font-size: 14px; }
.pm-desc p, .pm-desc ul { margin-bottom: 10px; }
.pm-desc ul { padding-left: 20px; }

/* Cart */
.cart-fab { position: fixed; right: 20px; bottom: 20px; z-index: 150; background: var(--lu-red); color: #fff; border: 0;
  border-radius: 999px; padding: 14px 20px; font: inherit; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 30px rgba(232,32,26,.4); }
.cart-fab:hover { background: var(--lu-red-deep); }
.cart-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.cart-box { position: relative; background: var(--lu-black-2); border-left: 1px solid var(--lu-line); width: min(420px, 100%);
  display: flex; flex-direction: column; padding: 28px 22px; overflow-y: auto; }
.cart-box h2 { font-size: 28px; margin-bottom: 20px; }
#cartItems { flex: 1; }
.cart-empty { color: var(--lu-grey); }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--lu-line); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--lu-black-3); }
.cart-line h4 { font-size: 14px; font-weight: 800; }
.cart-line .var { font-size: 13px; color: var(--lu-grey); }
.cart-line .price { font-weight: 800; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--lu-line); border-radius: 6px; background: var(--lu-black-3);
  color: #fff; font: inherit; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.cart-rm { background: none; border: 0; color: var(--lu-grey); font: inherit; font-size: 12px; cursor: pointer; margin-top: 6px; text-decoration: underline; }
.cart-foot { padding-top: 18px; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; }
.cart-small { color: var(--lu-grey); font-size: 13px; margin: 4px 0 16px; }
.cart-foot .btn { width: 100%; justify-content: center; }
.cart-foot .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.merch-busy { opacity: .6; pointer-events: none; }

@media (max-width: 760px) {
  .pm-layout { grid-template-columns: 1fr; }
  .merch-modal-box { padding: 22px 16px; }
  .cart-fab { right: 16px; bottom: 16px; }
  .show-grid { gap: 10px; }
  .show-cap { font-size: 13px; padding: 30px 10px 10px; }
  .pop-track { grid-auto-columns: 70%; }
  .pop-arrows { display: none; }
}
