@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/fonts/barlow-condensed-black-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 900;
  font-display: swap;
}

:root { --shop-display: "Barlow Condensed", Impact, "Outfit", sans-serif; }

#app.clubhouse-menu .shop-page {
  --club-bg: #10271f;
  --club-panel: #142820;
  --club-raised: #263c2d;
  --club-line: #d0e0bd45;
  --club-ink: #fffbec;
  --club-muted: #deead8;
  --club-gold: #ffe08a;
  background: var(--club-bg);
  color: var(--club-ink);
  padding-top: 0;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scroll-padding-top: 22px;
}

.shop-page .store {
  max-width: 1360px;
  margin-inline: auto;
  padding-top: clamp(22px, 3vw, 40px);
}

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(20px, 3vw, 38px);
  border-bottom: 1px solid var(--club-line);
  padding-bottom: 16px;
}

.store-title,
.store-tools,
.store-spotlight-actions,
.store-club-intro {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.shop-page .store-title h1 {
  margin: 0;
  font: italic 900 clamp(42px, 5.8vw, 84px)/.95 var(--shop-display);
  letter-spacing: -.012em;
  text-transform: uppercase;
  text-shadow: 0 3px 16px #0008;
}

.store-wallet { display: none; }

.store-tools .text-button,
.store-filters > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--club-ink);
  min-height: 44px;
  font-size: 13px;
  padding-inline: 10px;
  border: 1px solid var(--club-line);
  border-radius: 5px;
  background: #12231eea;
  white-space: nowrap;
}

.store-tools svg { width: 16px; height: 16px; }
.store-filters { position: relative; }
.store-filters > summary { cursor: pointer; list-style: none; }
.store-filters > summary::-webkit-details-marker { display: none; }
#app .store-tools .text-button:hover,
#app .store-filters > summary:hover,
#app .store-filters[open] > summary { color: var(--club-gold); }

.store-filter-fields {
  position: absolute;
  z-index: 5;
  top: 100%;
  right: 0;
  display: grid;
  gap: 10px;
  width: min(260px, calc(100vw - 40px));
  padding: 14px;
  background: var(--club-panel);
  color: var(--club-ink);
  border: 1px solid var(--club-line);
  border-radius: 8px;
  box-shadow: 0 10px 26px #051a1230;
}

.store-filter-fields p { margin: 0; color: var(--club-muted); font-size: 12px; line-height: 1.4; }
.store-filter-fields label { display: grid; gap: 4px; font-size: 13px; }
.store-filter-fields select { width: 100%; }
.store-filter-fields .store-owned-filter { display: flex; align-items: center; gap: 7px; min-height: 36px; }
.store-owned-filter input { accent-color: var(--club-gold); }

.store-layout {
  display: grid;
  grid-template-columns: minmax(148px, 176px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 44px);
}

.store-index {
  position: sticky;
  top: 22px;
  z-index: 3;
  min-width: 0;
  background: #152422;
  border: 1px solid var(--club-line);
  border-radius: 8px;
  padding: 9px;
}

.store-index-label {
  display: block;
  padding: 4px 10px 7px;
  color: var(--club-muted);
  font-size: 12px;
  font-weight: 650;
}

.store-index-links {
  display: grid;
  border-radius: 6px;
  overflow: hidden;
}

.store-index-link {
  --rail-mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--club-ink);
  font-size: 13px;
  text-align: start;
}

.store-index-link::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: -9px 0;
  pointer-events: none;
  background: linear-gradient(90deg, #071510d9, #07151038), var(--rail-scene) center / cover no-repeat, var(--rail-tone);
  mask-image: var(--rail-mask);
}
.store-index-text { display: flex; align-items: center; gap: 6px; font-weight: 650; text-shadow: 0 1px 4px #000; }

#app .store-index-link:hover,
#app .store-index-link[aria-current="location"] {
  color: var(--club-ink);
  background: #ffffff13;
  transform: none;
}

.store-index-link[aria-current="location"]::after {
  position: absolute;
  inset: 5px auto 5px 0;
  content: "";
  width: 3px;
  border-radius: 3px;
  background: var(--club-gold);
}
#app .store-index-link[aria-current="location"] .store-index-text { color: var(--club-gold); }
#app .store-index-link:focus-visible { outline-offset: -3px; z-index: 1; }

.store-index-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--club-gold); }
.store-catalog { min-width: 0; }

.store-section + .store-section {
  margin-top: clamp(48px, 8vw, 110px);
  padding-top: clamp(15px, 2vw, 30px);
  border-top: 1px solid #f8f8e761;
}

.store-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 16px;
}

#app .store-section-heading h2 {
  margin: 0;
  font: italic 900 clamp(34px, 4.2vw, 57px)/1 var(--shop-display);
  text-transform: uppercase;
  letter-spacing: .015em;
  text-shadow: 0 2px 12px #0009;
}

.store-section-heading h2:focus-visible { outline: 2px solid var(--club-gold); outline-offset: 4px; }
.store-section-meta, .store-note, .store-empty { color: var(--club-muted); font-size: 13px; line-height: 1.5; }
.store-section-meta, .store-note, .store-empty {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 5px;
  background: #14241de8;
}
.store-club-intro { justify-content: space-between; margin-bottom: 15px; }
.store-club-intro .store-note { margin-bottom: 0; }
.store-reset { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.store-reset svg { width: 14px; height: 14px; }
.store-note { margin: 0 0 16px; }
.store-empty { margin: 0; padding: 18px 0; }

.store-spotlight {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
  min-height: clamp(254px, 27vw, 342px);
  margin-bottom: 16px;
  border: 1px solid #ffffff63;
  border-radius: 8px;
  overflow: hidden;
  background: #14261f;
  box-shadow: 0 8px 25px #04101644;
}

.store-spotlight-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(19px, 3.4vw, 44px);
}

.store-spotlight-type,
.store-tile-type {
  color: var(--club-muted);
  font-size: 12px;
  font-weight: 600;
}

.store-spotlight-type {
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--store-tint);
}

#app .store-spotlight h3 {
  font: italic 900 clamp(39px, 4.6vw, 68px)/.98 var(--shop-display);
  letter-spacing: .005em;
  text-transform: uppercase;
  margin: 11px 0 8px;
  overflow-wrap: anywhere;
}

.store-spotlight-copy p { margin: 0 0 17px; max-width: 34ch; color: var(--club-muted); line-height: 1.5; font-size: 14px; }
.store-spotlight-actions .money { font-size: 17px; }
.store-spotlight-actions .button { padding-inline: 14px; }
.store-spotlight-art { position: relative; isolation: isolate; overflow: hidden; background: color-mix(in srgb, var(--store-tint), var(--club-panel) 35%); }
.store-spotlight-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 18px);
}

.store-grid-featured,
.store-grid-lockers,
.store-grid-bundles,
.store-grid-members {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.store-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  text-align: start;
  background: #152824;
  color: var(--club-ink);
  border: 1px solid #ffffff47;
  border-radius: 7px;
  box-shadow: 0 5px 15px #06131b42;
  overflow: hidden;
  transition: border-color .18s ease, background .18s ease;
}

#app button.store-tile:hover, #app button.store-tile:active {
  transform: none;
  border-color: var(--club-gold);
  background: color-mix(in srgb, var(--club-raised), var(--store-tint) 10%);
}

.store-tile-art {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: color-mix(in srgb, var(--store-tint), var(--club-panel) 35%);
  aspect-ratio: 1.6;
}

.store-tile-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease-out; }
button.store-tile:hover .store-tile-art:not(.store-bundle-art) img,
button.store-tile-art:hover img { transform: scale(1.045); }
#app button.store-tile-art:hover, #app button.store-tile-art:active { transform: none; }
#app button.store-tile-art:focus-visible { outline-offset: -4px; }

.store-tile-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  border-top: 2px solid color-mix(in srgb, var(--store-tint), var(--club-line) 25%);
  gap: 5px;
  padding: 12px;
}

.store-tile .store-tile-name {
  color: var(--club-ink);
  font: italic 900 clamp(20px, 2vw, 30px)/1.03 var(--shop-display);
  text-transform: uppercase;
  letter-spacing: .018em;
  overflow-wrap: anywhere;
  margin: 0;
}

.store-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  margin-top: auto;
  padding-top: 10px;
}

.store-tile-footer > svg { width: 17px; height: 17px; color: var(--club-muted); }
.store-tile:hover .store-tile-footer > svg { color: var(--club-gold); }
.store-owned { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.store-owned svg { width: 14px; height: 14px; }

.store-gear .store-tile-art { aspect-ratio: 1.34; }

:is(#modal-root, #modal-exit) .modal:has(.shop-offer-detail, .shop-bundle-detail) {
  width: min(940px, calc(100vw - 28px));
  overflow-y: auto;
}
:is(#modal-root, #modal-exit) .modal-overlay:has(.shop-offer-detail, .shop-bundle-detail) {
  background: #071916b8;
  backdrop-filter: none;
}
:is(#modal-root, #modal-exit) .modal :is(.shop-offer-detail, .shop-bundle-detail) h2 {
  font: italic 900 clamp(34px, 4.25vw, 62px)/.98 var(--shop-display);
  margin: 2px 0 4px;
  text-transform: uppercase;
  letter-spacing: .01em;
}
:is(#modal-root, #modal-exit) .modal .shop-bundle-detail h3 {
  font: italic 900 24px/1 var(--shop-display);
  margin: 18px 0 11px;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.shop-offer-detail .detail-copy p { margin-block: 0; }
.shop-offer-detail .detail-art { border-radius: 8px; }
.shop-offer-detail .detail-art img { height: auto; aspect-ratio: 1.5; object-fit: cover; }
.shop-offer-detail .detail-actions { flex-wrap: wrap; }
:is(#modal-root, #modal-exit) :is(.shop-offer-detail, .shop-bundle-detail) .button.yellow:not(:disabled) {
  background: #f3d379;
  color: #152820;
  border-color: #f3d379;
}
:is(#modal-root, #modal-exit) :is(.shop-offer-detail, .shop-bundle-detail) .button.yellow:hover:not(:disabled) {
  background: #ffe5a4;
  border-color: #ffe5a4;
}
.shop-bundle-hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
}
.shop-bundle-hero img { width: 100%; aspect-ratio: 1.75; object-fit: cover; border-radius: 7px; }
.shop-bundle-hero p { margin-top: 8px; }
.shop-bundle-detail .odds-item img { object-fit: cover; }

.store-earned {
  position: absolute;
  inset: 9px auto auto 9px;
  background: #e9cc78;
  color: #183b2e;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
}

.store-locker p { margin: 3px 0 6px; font-size: 13px; color: var(--club-muted); line-height: 1.45; }
.store-locker .odds-bar { height: 5px; background: var(--club-line); }
.store-locker-total { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-top: auto; padding-top: 7px; }
.store-locker-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding-top: 6px; }
.store-locker-actions .button { padding: 7px 6px; font-size: 12px; line-height: 1.25; }

.store-coin-packs h3 { margin: 0; font-size: 22px; }
.store-coin-packs p { margin: 6px 0 0; color: var(--club-muted); font-size: 13px; line-height: 1.45; }
.store-coin-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.store-coin-packs article { overflow: hidden; border: 1px solid #f2cd736e; border-radius: 7px; background: var(--club-panel); }
.store-coin-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1.85;
  background: linear-gradient(154deg, #ffe08b 0 45%, #d88f39 45% 72%, #a55c27 72%);
  border-bottom: 2px solid #ffe08a83;
}
.store-coin-art .store-chest { width: 69%; max-height: 94%; }
.store-coin-copy { padding: 12px 14px 16px; }
.store-coin-packs .money { font-size: inherit; }
.store-coin-packs .button { margin-top: 9px; padding: 8px 10px; }
.store-section .community-menu-content { max-width: none; margin: 0; }
.store-section .community-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.store-section .community-link { min-width: 0; }
.store-section .community-chest-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  background: #223325;
  border: 1px solid #f2cd736e;
}
.store-section .community-chest-link b { display: flex; gap: 3px; align-items: center; color: #ffe08a; }
.community-chest-link .store-chest { width: clamp(28px, 3.7vw, 54px); flex: none; }
.store-section .community-terms { width: fit-content; padding: 7px 10px; border-radius: 5px; background: #14241de8; color: var(--club-muted); }
.store-footer { margin-top: 20px; border-top: 1px solid var(--club-line); padding-top: 12px; }

@media (max-width: 1180px) {
  .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px), (max-height: 640px) {
  #app.clubhouse-menu .shop-page { scroll-padding-top: 73px; }
  .store-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .store-index {
    top: 0;
    margin-inline: calc(-1 * var(--page-gutter));
    padding-inline: var(--page-gutter);
    background: var(--club-bg);
    border: 0;
    border-bottom: 1px solid var(--club-line);
    border-radius: 0;
    padding-block: 0;
  }
  .store-index-label { display: none; }
  .store-index-links {
    display: flex;
    border: 0;
    gap: 0;
    overflow: auto hidden;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--club-line) transparent;
  }
  .store-index-link {
    --rail-mask: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 6px 9px;
    white-space: nowrap;
    border-inline-start: 0;
  }
  .store-index-link::before { inset: 0 -8px; }
  .store-index-link[aria-current="location"]::after { inset: auto 6px 0; width: auto; height: 2px; }
  #app .store-index-link:focus-visible { outline-offset: -2px; }
}

@media (max-width: 760px) {
  .shop-page .store { padding-top: 20px; }
  .store-header { display: block; margin-bottom: 6px; padding-bottom: 0; border: 0; }
  .store-title { justify-content: space-between; }
  .store-wallet { display: inline-flex; }
  .store-tools { margin-top: 7px; }
  .store-filter-fields { right: auto; left: 0; }
  .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-spotlight-copy { padding: 19px; }
  .store-spotlight h3 { font-size: 30px; }
  .store-locker-actions { grid-template-columns: 1fr; }
  .store-section .community-links { grid-template-columns: 1fr; }
}

@media (max-width: 510px) {
  .store-spotlight { grid-template-columns: minmax(0, 1fr); }
  .store-spotlight-art { order: -1; aspect-ratio: 2; }
  .store-spotlight-copy p { font-size: 13px; }
  .shop-bundle-hero { grid-template-columns: minmax(0, 1fr); }
  .shop-bundle-hero img { aspect-ratio: 2.1; }
  .store-tile-copy { padding: 8px; }
  .store-tile-type, .store-locker p { font-size: 11px; }
  .store-coin-packs { grid-template-columns: minmax(0, 1fr); }
  .store-coin-packs article { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); align-items: stretch; }
  .store-coin-art { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid #ffe08a83; }
  .store-coin-art .store-chest { width: 94%; }
  .store-coin-copy { padding: 9px 10px; }
  .store-coin-packs h3 { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-page .store-tile-art img { transition: none; }
}
#app[data-menu-motion=reduced] .store-tile-art img { transition: none; }
