.shop-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(8, 11, 9, 0.64), var(--ink) 560px),
    var(--ink);
}

.shop-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(241, 234, 219, 0.14);
  background: rgba(8, 11, 9, 0.82);
  backdrop-filter: blur(16px);
}

.shop-brand {
  width: max-content;
  font-weight: 900;
  text-transform: uppercase;
}

.shop-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.shop-nav-links a {
  padding: 8px 0;
}

.shop-nav-links a.is-active,
.shop-nav-links a:hover {
  color: var(--paper);
}

.shop-auth {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shop-user {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  min-height: 42px;
  padding: 5px 8px;
  color: var(--muted);
  border: 1px solid rgba(241, 234, 219, 0.14);
  border-radius: 8px;
  background: rgba(241, 234, 219, 0.045);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.shop-user:hover {
  color: var(--paper);
  border-color: rgba(210, 164, 79, 0.34);
}

.shop-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-user small {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.shop-user img,
.shop-user-fallback {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(241, 234, 219, 0.18);
}

.shop-user-fallback {
  display: inline-block;
  background: linear-gradient(135deg, rgba(210, 164, 79, 0.55), rgba(111, 143, 103, 0.45));
}

.shop-shell {
  width: min(var(--max), calc(100% - 56px));
  margin: 0 auto;
  padding: 42px 0 96px;
}

.shop-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 48px;
  border: 1px solid rgba(241, 234, 219, 0.14);
  border-radius: 8px;
  background: #0d110e;
}

.shop-hero-media,
.shop-hero-media::after {
  position: absolute;
  inset: 0;
}

.shop-hero-media::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 11, 9, 0.94), rgba(8, 11, 9, 0.42) 62%, rgba(8, 11, 9, 0.2)),
    linear-gradient(0deg, rgba(8, 11, 9, 0.94), transparent 42%);
}

.shop-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.08);
}

.shop-hero-copy {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
}

.shop-hero h1,
.shop-section-head h2,
.shop-profile h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.shop-hero h1 {
  font-size: 96px;
}

.shop-hero p:not(.eyebrow),
.shop-muted {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.shop-status {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 164, 79, 0.34);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(210, 164, 79, 0.1);
}

.shop-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  margin-top: 34px;
  align-items: start;
}

.shop-profile,
.shop-products,
.shop-history {
  border: 1px solid rgba(241, 234, 219, 0.14);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(241, 234, 219, 0.065), rgba(241, 234, 219, 0.025));
}

.shop-profile {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.shop-profile h2 {
  font-size: 32px;
}

.shop-profile dl {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}

.shop-profile div[data-profile] > .button {
  margin-top: 16px;
}

.shop-profile dt {
  color: var(--faint);
  font-size: 12px;
  text-transform: uppercase;
}

.shop-profile dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.profile-balance {
  color: var(--amber);
  font-size: 28px;
  font-weight: 900;
}

.topup-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(241, 234, 219, 0.12);
}

.topup-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.topup-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 219, 0.16);
  border-radius: 6px;
  background: rgba(8, 11, 9, 0.72);
}

.profile-open-button {
  width: 100%;
  margin-top: 12px;
}

.shop-products {
  padding: 24px;
}

.shop-section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.shop-section-head h2 {
  font-size: 48px;
}

.shop-refresh {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 219, 0.22);
  border-radius: 6px;
  background: rgba(241, 234, 219, 0.06);
  cursor: pointer;
}

.shop-refresh svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.shop-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.shop-search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.shop-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 219, 0.16);
  border-radius: 6px;
  background: rgba(8, 11, 9, 0.72);
  font: inherit;
  text-transform: none;
}

.shop-search input:focus {
  outline: 2px solid rgba(210, 164, 79, 0.26);
  outline-offset: 2px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid rgba(241, 234, 219, 0.14);
  border-radius: 6px;
  background: rgba(241, 234, 219, 0.045);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.category-tab small {
  color: var(--faint);
  font-size: 11px;
}

.category-tab.is-active,
.category-tab:hover {
  color: var(--paper);
  border-color: rgba(210, 164, 79, 0.4);
  background: rgba(210, 164, 79, 0.12);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  overflow: hidden;
  border: 1px solid rgba(241, 234, 219, 0.14);
  border-radius: 8px;
  background: rgba(10, 14, 11, 0.8);
}

.product-media {
  height: 180px;
  background: #111611;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.06);
}

.product-copy {
  padding: 20px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.product-card h3 {
  margin: 6px 0 0;
  font-size: 24px;
}

.product-kind {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  color: var(--green);
  border: 1px solid rgba(111, 143, 103, 0.32);
  background: rgba(111, 143, 103, 0.1);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-price {
  display: grid;
  justify-items: end;
  gap: 3px;
  white-space: nowrap;
  color: var(--amber);
  font-weight: 900;
}

.price-old {
  color: var(--faint);
  font-size: 12px;
  text-decoration: line-through;
}

.price-discount {
  width: max-content;
  padding: 2px 6px;
  color: #0a0e0b;
  border-radius: 4px;
  background: var(--amber);
  font-size: 11px;
  font-weight: 900;
}

.product-card p {
  color: var(--muted);
  line-height: 1.55;
}

.product-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.product-items span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: var(--muted);
  border: 1px solid rgba(241, 234, 219, 0.14);
  background: rgba(241, 234, 219, 0.045);
  font-size: 12px;
}

.product-card .button {
  width: 100%;
}

.shop-history {
  margin-top: 24px;
  padding: 24px;
}

.history-grid {
  display: grid;
  gap: 10px;
}

.history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(241, 234, 219, 0.12);
  border-radius: 8px;
  background: rgba(8, 11, 9, 0.54);
}

.status-pill.is-pending {
  color: var(--amber);
  border-color: rgba(210, 164, 79, 0.36);
}

.status-pill.is-pending_payment,
.status-pill.is-created {
  color: var(--amber);
  border-color: rgba(210, 164, 79, 0.36);
}

.status-pill.is-delivered {
  color: var(--green);
  border-color: rgba(111, 143, 103, 0.36);
}

.status-pill.is-active,
.status-pill.is-paid {
  color: var(--green);
  border-color: rgba(111, 143, 103, 0.36);
}

.status-pill.is-payment_error,
.status-pill.is-failed,
.status-pill.is-underpaid {
  color: #dc8d78;
  border-color: rgba(220, 141, 120, 0.36);
}

.profile-open {
  overflow: hidden;
}

.profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 5, 4, 0.74);
  backdrop-filter: blur(14px);
}

.profile-backdrop[hidden] {
  display: none;
}

.profile-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  padding: 28px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 219, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(241, 234, 219, 0.075), rgba(241, 234, 219, 0.028)),
    #0a0e0b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.profile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 219, 0.18);
  border-radius: 6px;
  background: rgba(8, 11, 9, 0.72);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.profile-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding-right: 46px;
}

.profile-head img,
.profile-avatar-fallback {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(241, 234, 219, 0.2);
  border-radius: 8px;
}

.profile-avatar-fallback {
  display: inline-block;
  background: linear-gradient(135deg, rgba(210, 164, 79, 0.55), rgba(111, 143, 103, 0.45));
}

.profile-head h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 44px;
  line-height: 0.95;
  text-transform: uppercase;
}

.profile-head a,
.profile-head-balance span {
  color: var(--muted);
}

.profile-head-balance {
  display: grid;
  gap: 5px;
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 164, 79, 0.28);
  border-radius: 8px;
  background: rgba(210, 164, 79, 0.08);
}

.profile-head-balance strong {
  color: var(--amber);
  font-size: 26px;
}

.profile-topup {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-top: 24px;
  padding-top: 22px;
}

.profile-promo {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.profile-stat {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 15px;
  border: 1px solid rgba(241, 234, 219, 0.13);
  border-radius: 8px;
  background: rgba(8, 11, 9, 0.56);
}

.profile-stat span,
.profile-stat small,
.profile-row small,
.profile-section-head span {
  color: var(--muted);
}

.profile-stat span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-stat strong {
  color: var(--paper);
  font-size: 24px;
}

.profile-section {
  margin-top: 24px;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.profile-section-head h3 {
  margin: 0;
  font-size: 22px;
}

.profile-list {
  display: grid;
  gap: 9px;
}

.profile-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(241, 234, 219, 0.12);
  border-radius: 8px;
  background: rgba(8, 11, 9, 0.5);
}

.profile-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-row strong,
.profile-row small {
  overflow-wrap: anywhere;
}

.profile-row b {
  color: var(--amber);
  white-space: nowrap;
}

@media (max-width: 920px) {
  .shop-nav,
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-nav-links,
  .shop-auth {
    justify-self: start;
  }

  .shop-profile {
    position: static;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .shop-tools,
  .profile-topup,
  .profile-promo,
  .profile-head,
  .profile-row {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    justify-content: flex-start;
  }

  .profile-head {
    padding-right: 46px;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shop-nav {
    padding: 14px 18px;
  }

  .shop-nav-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .shop-shell {
    width: calc(100% - 36px);
    padding-top: 24px;
  }

  .shop-hero {
    min-height: 360px;
    padding: 28px;
  }

  .shop-hero h1 {
    font-size: 58px;
  }

  .shop-section-head h2 {
    font-size: 34px;
  }

  .profile-dialog {
    padding: 22px;
  }

  .profile-head h2 {
    font-size: 34px;
  }

  .profile-stats,
  .history-row {
    grid-template-columns: 1fr;
  }
}
