/* ============================================================
   Willowbrook Store — mock storefront over the hero scene.
   Extends willow.css; keep the cozy-medieval house style.
   ============================================================ */

/* The store page scrolls, unlike the homepage title-screen mode. The hero
   artwork is a fixed 100vh BACKDROP (identical framing to the homepage, so
   navigating home <-> store keeps the background perfectly still), and the
   store content flows over and past it onto parchment. */
body.store-page {
  overflow-x: hidden; /* the 100vw backdrop must not create a sideways scroll */
  /* solid parchment-hi until the artwork's fade hands over at 100vh, then a
     gentle medieval-parchment gradient for the rest of the scroll */
  background: linear-gradient(180deg,
    var(--parchment-hi) 0,
    var(--parchment-hi) 100vh,
    var(--parchment) calc(100vh + 480px),
    var(--parchment-2) 100%);
}
.store-main { position: relative; min-height: 100vh; /* short content must never pull the footer up onto the artwork */ }
.store-page .hero {
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  /* 100vw includes the scrollbar width, so the artwork is laid out against
     the SAME viewport width as the scrollbar-less homepage — the crop and
     every anchored overlay line up pixel-perfect; the last ~15px just sit
     under the scrollbar. z-index:0 + the transform give the backdrop its
     own stacking context so its fade ::after can never cover the shop. */
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  height: 100vh;
  min-height: 0;
  display: block;
  overflow: hidden;
}
/* artwork bottom melts into the page parchment */
.store-page .hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26vh;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(253, 246, 229, 0) 0%,
    rgba(246, 234, 210, .65) 62%,
    var(--parchment-hi) 100%);
}
.store-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 38px 18px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Floating controls, exactly like the homepage (no oak beam) ---------- */
body.store-page .nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  background: none;
  border-bottom: none;
  box-shadow: none;
}
body.store-page .nav-inner {
  height: auto;
  padding: 16px 22px 0;
  max-width: none;
}
body.store-page .brand { display: none; }
body.store-page .nav-links { margin-left: auto; gap: 10px; }
body.store-page .dropdown-toggle {
  color: var(--wood-dark);
  border-color: var(--gold-dark);
  background: rgba(253, 246, 229, .55);
}
body.store-page .dropdown-toggle:hover, body.store-page .dropdown-toggle:focus-visible {
  background: rgba(253, 246, 229, .85);
}
body.store-page .btn-login {
  color: var(--wood-dark);
  border-color: var(--gold-dark);
  background: rgba(253, 246, 229, .55);
}
body.store-page .btn-login:hover, body.store-page .btn-login:focus-visible {
  background: rgba(253, 246, 229, .85);
}
@media (max-width: 840px) {
  body.store-page .burger svg { stroke: var(--ink); filter: drop-shadow(0 0 5px rgba(253,246,229,.95)); }
  body.store-page .nav-links {
    background: linear-gradient(180deg, var(--parchment-hi), var(--parchment));
    border-bottom: 3px solid var(--gold-deep);
  }
}

.store-head { text-align: center; }
.store-logo { width: min(380px, 70vw); margin: 0 auto; }
.store-tagline { margin: 0 0 20px; }

/* ---------- The store card: house panel, dressed up a little ---------- */
.store-card {
  width: 100%;
  padding: 0 0 26px;
  overflow: hidden; /* keep the band's square corners inside the radius */
}

/* carved-oak header band, like a shop sign nailed across the top */
.store-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 18px 13px;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #573920 0%, #4a2f17 55%, #3a2410 100%);
  border-bottom: 2.5px solid var(--gold-deep);
  box-shadow: 0 3px 10px rgba(30, 18, 8, .3);
}
.store-band h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  text-shadow: 0 2px 3px rgba(0, 0, 0, .55);
  letter-spacing: .5px;
}
.store-band-icon { width: 24px; height: 24px; color: var(--gold); filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.store-preview-chip {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffe9bd;
  background: rgba(255, 217, 133, .16);
  border: 1.5px solid rgba(232, 166, 61, .55);
  border-radius: 999px;
  padding: 5px 11px 3px; /* Alegreya Sans sits high in its line box */
}

/* ---------- Tabs: carved segmented control ---------- */
.store-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 22px 22px;
}
.store-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
  justify-content: center;
  padding: 12px 26px 9px; /* high-line-box compensation */
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #f3e3c3;
  background: linear-gradient(180deg, #5d3d22 0%, #4a2f17 55%, #3a2410 100%);
  border: 2px solid var(--wood-dark);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 8px rgba(46, 29, 13, .35);
  cursor: pointer;
  transition: filter .18s ease, transform .15s ease, background .18s ease, color .18s ease;
}
.store-tab svg { width: 19px; height: 19px; margin-top: -2px; }
.store-tab:hover { filter: brightness(1.12); transform: translateY(-1px); }
.store-tab.is-active {
  color: #3a2410;
  background: linear-gradient(180deg, #ffd985 0%, #e8a63d 55%, #cf8c25 100%);
  border-color: var(--gold-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 4px rgba(138, 92, 18, .35), 0 3px 8px rgba(46, 29, 13, .3);
  transform: none;
}
.store-tab.is-active:hover { filter: none; }

.store-blurb {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 26px 20px;
}

/* ---------- Rank cards ---------- */
.store-panel { padding: 0 22px; }
.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.rank-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 22px 14px 18px;
  background: linear-gradient(180deg, #fdf6e5 0%, #f1e2c0 100%);
  border: 1.5px solid rgba(74, 47, 23, .55);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 10px -6px rgba(46, 29, 13, .35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rank-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 20px -10px rgba(46, 29, 13, .5);
}
.rank-card.is-loved {
  border: 2px solid var(--gold-deep);
  background: linear-gradient(180deg, #fff9e8 0%, #f7e7bd 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 217, 133, .5), 0 6px 16px -8px rgba(138, 92, 18, .55);
}
.loved-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #3a2410;
  background: linear-gradient(180deg, #ffd985, #e8a63d);
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  padding: 4px 12px 2px;
  box-shadow: 0 2px 6px rgba(46, 29, 13, .3);
}
.rank-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--gold-deep);
  background: radial-gradient(circle at 50% 35%, #fff3d6, #f3dfae);
  border: 1.5px solid rgba(185, 126, 30, .5);
  margin-bottom: 2px;
}
.rank-icon svg { width: 24px; height: 24px; }
.rank-name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 400;
  color: var(--wood-dark);
}
.rank-price {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.perk-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .92rem;
  color: var(--ink-soft);
}
.perk-list li { position: relative; padding-left: 20px; text-align: left; }
.perk-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28em;
  width: 12px;
  height: 12px;
  background: var(--gold-deep);
  clip-path: polygon(0 45%, 38% 78%, 100% 8%, 100% 30%, 40% 100%, 0 62%);
}
.rank-buy { width: 100%; margin-top: auto; justify-content: center; }

/* ---------- Gold cards ---------- */
.gold-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gold-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 24px 14px 18px;
  background: linear-gradient(180deg, #fdf6e5 0%, #f1e2c0 100%);
  border: 1.5px solid rgba(74, 47, 23, .55);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 10px -6px rgba(46, 29, 13, .35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.gold-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 20px -10px rgba(46, 29, 13, .5);
}
.gold-card.is-loved {
  border: 2px solid var(--gold-deep);
  background: linear-gradient(180deg, #fff9e8 0%, #f7e7bd 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 217, 133, .5), 0 6px 16px -8px rgba(138, 92, 18, .55);
}
/* stacked coins: pure CSS, taller stack per tier */
.coin-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center; /* stack floats centered in its zone, not stuck at the top */
  height: 64px;
  margin-bottom: 8px;
}
.coin-stack i {
  width: 34px;
  height: 12px;
  margin-top: -7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 32%, #ffe9ad 0%, #e8a63d 55%, #b97e1e 100%);
  border: 1px solid #8a5c12;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .5), 0 1px 2px rgba(46, 29, 13, .35);
}
.coin-stack.s2 i:nth-child(odd) { transform: translateX(2px); }
.coin-stack.s3 i:nth-child(odd) { transform: translateX(-2px) rotate(-2deg); }
.coin-stack.s3 i:nth-child(3n) { transform: translateX(3px) rotate(2deg); }
.coin-stack.s4 i:nth-child(odd) { transform: translateX(3px) rotate(2deg); }
.coin-stack.s4 i:nth-child(3n) { transform: translateX(-3px) rotate(-1deg); }
.gold-amount {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--gold-dark);
  line-height: 1.15;
}
.gold-amount span { font-size: .85rem; color: var(--ink-soft); font-weight: 500; }
.gold-bonus {
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: rgba(111, 143, 47, .16);
  border: 1px solid rgba(111, 143, 47, .4);
  border-radius: 999px;
  padding: 3px 10px 1px;
}
.gold-price {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  /* margin-top:auto pins price+button to the card bottom, so the
     price-to-button gap is identical whether or not a bonus chip exists */
  margin: auto 0 10px;
  padding-top: 12px;
}
.gold-card .rank-buy { width: 100%; margin-top: 0; }

.store-footnote {
  text-align: center;
  font-size: .85rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 22px 26px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .rank-grid, .gold-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .store-inner { padding: 62px 12px 56px; }
  .rank-grid, .gold-grid { grid-template-columns: 1fr; }
  .store-tabs { margin: 0 14px 18px; }
  .store-tab { flex: 1; min-width: 0; }
  .store-panel { padding: 0 14px; }
  .store-band { gap: 9px; }
  .store-band h1 { font-size: 1.25rem; }
}
