/* ============================================
   Trials SMP Store — extends style.css tokens
   ============================================ */

.store-body {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.store-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 272px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: rgba(12, 19, 31, 0.88);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.store-sidebar .logo {
  display: flex;
  justify-content: center;
  padding: 6px 0 18px;
}

.store-sidebar .logo img {
  width: min(210px, 100%);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

.store-tagline {
  margin: 0 4px 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: center;
}

.store-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.store-nav-label {
  margin: 4px 12px 10px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.store-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.store-nav a .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  flex-shrink: 0;
}

.store-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.store-nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(111, 169, 134, 0.28), rgba(255, 150, 120, 0.20));
  border-color: var(--border);
}

.store-nav a.active .nav-icon {
  background: linear-gradient(135deg, var(--brand), var(--gold));
}

.store-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.store-back-link {
  display: block;
  text-align: center;
  padding: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease;
}

.store-back-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.store-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  color: #07130c;
  font-weight: 900;
  font-size: 0.92rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--gold));
}

/* ---------- Mobile top bar ---------- */

.store-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 25;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(12, 19, 31, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.store-topbar img {
  height: 34px;
  width: auto;
}

.store-topbar button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.3rem;
  border-radius: 10px;
  padding: 6px 12px;
}

/* ---------- Main content ---------- */

.store-main {
  flex: 1;
  min-width: 0;
  padding: 56px min(5vw, 64px) 90px;
}

.store-hero {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.store-hero-logo {
  width: min(360px, 68vw);
  height: auto;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.38));
}

.store-hero-sub {
  margin: 0 0 20px;
  color: #ffffff;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 20px;
  font-weight: 400;
}

.store-hero-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.store-hero-tags span {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: capitalize;
}

.store-hero-desc {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.store-hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* block-seam divider — a nod to the logo's blocky mineral texture */
.block-seam {
  height: 10px;
  margin: 0 auto 44px;
  max-width: 340px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    var(--brand) 0px,
    var(--brand) 14px,
    var(--brand-2) 14px,
    var(--brand-2) 28px
  );
  opacity: 0.55;
}

.store-section {
  margin-bottom: 68px;
  scroll-margin-top: 24px;
}

.store-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.store-section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  margin-bottom: 6px;
}

.store-section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

/* ---------- Product grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--rarity-color, var(--brand));
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.product-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 16px;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.09);
}

.rarity-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rarity-color, var(--brand));
  border: 1px solid var(--rarity-color, var(--brand));
}

.product-card h3 {
  margin-bottom: 6px;
}

.product-card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 18px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 900;
}

.buy-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  color: #07130c;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.buy-btn:hover {
  transform: translateY(-2px);
}

/* rarity color variables — mirrors Minecraft Bedrock's item-rarity scheme */
.rarity-common { --rarity-color: #f2f5f7; }
.rarity-uncommon { --rarity-color: #ffe38b; }
.rarity-rare { --rarity-color: #7fdfe0; }
.rarity-epic { --rarity-color: #d9a4ff; }
.rarity-legendary { --rarity-color: var(--gold); }

.rarity-legendary.product-card {
  background: linear-gradient(160deg, rgba(255, 227, 139, 0.14), rgba(255, 255, 255, 0.07));
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .store-sidebar {
    display: none;
  }

  .store-sidebar.open {
    display: flex;
    position: fixed;
    inset: 0 20% 0 0;
    height: 100vh;
  }

  .store-topbar {
    display: flex;
  }

  .store-main {
    padding: 40px 20px 70px;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
