/* ===================================================
   GLOBAL RESET & BASE
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===================================================
   ANNOUNCEMENT MODAL (every Mini App open)
   =================================================== */
.announce-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.announce-overlay.hidden { display: none !important; }

.boot-error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 11000;
  padding: 12px 16px;
  background: #c0392b;
  color: #fff;
  font-size: 14px;
  text-align: center;
  line-height: 1.35;
}
.boot-error-banner.hidden { display: none !important; }

.announce-modal {
  width: 100%;
  max-width: 360px;
  background: #1c1c1e;
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06),
    0 20px 48px rgba(0,0,0,.55),
    0 0 80px rgba(255,95,77,.12);
}

.announce-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d4a373;
  margin-bottom: 16px;
}

.announce-body {
  color: #fff;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.announce-body p { margin: 0; }

.announce-link {
  color: #6ab7ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.announce-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff5f4d, #ff8066);
  box-shadow: 0 4px 16px rgba(255,95,77,.35);
  transition: transform .1s, opacity .15s;
}

.announce-btn:hover { opacity: .95; }
.announce-btn:active { transform: scale(.98); }

:root {
  --orange:      #f47920;
  --orange-dark: #c85e0a;
  --orange-light:#fde8d0;
  --grey-bg:     #ebebeb;
  --white:       #ffffff;
  --card-bg:     #f9f9f9;
  --border:      #d0d0d0;
  --text:        #2e2e2e;
  --text-muted:  #777777;
  --sidebar-w:   220px;
  --radius:      4px;
  --shadow:      0 1px 4px rgba(0,0,0,.12);
}

/* ── DARK THEME ── */
body.dark {
  --grey-bg:   #0f0f1a;
  --white:     #1c1c2e;
  --card-bg:   #1c1c2e;
  --border:    #2e2e4a;
  --text:      #e0e0e0;
  --text-muted:#888;
  --shadow:    0 1px 4px rgba(0,0,0,.5);
}
body.dark .site-main       { background: var(--grey-bg); }
body.dark .welcome-banner  { background: #1c1c2e; border-color: #2e2e4a; }
body.dark .product-card    { background: #1c1c2e; border-color: #2e2e4a; }
body.dark .product-card:hover { box-shadow: 0 3px 10px rgba(244,121,32,.2); }
body.dark .search-input    { background: #1c1c2e; border-color: #2e2e4a; color: #e0e0e0; }
body.dark .card            { background: #1c1c2e; border-color: #2e2e4a; }
body.dark .cart-item-row   { background: #1c1c2e; border-color: #2e2e4a; }
body.dark .cart-total      { background: #1c1c2e; border-color: #2e2e4a; }
body.dark .modal           { background: #1c1c2e; }
body.dark .site-footer     { background: #1c1c2e; border-color: #2e2e4a; color: #666; }
body.dark .qty-btn         { background: #111; border-color: #2e2e4a; color: #e0e0e0; }
body.dark .profile-detail-card { background: #1c1c2e; }
body.dark .filter-wrap     { background: #12122a !important; }
body.dark .fp-option       { background: #1c1c2e !important; border-color: #2e2e4a !important; color: #e0e0e0 !important; }
body.dark .fp-option.active { background: var(--orange) !important; color: #fff !important; }
body.dark .fp-search-input { background: #111 !important; color: #e0e0e0 !important; }

html, body {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: var(--grey-bg);
  color: var(--text);
  overflow-x: hidden;
}

a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ===================================================
   LANGUAGE BAR
   =================================================== */
.lang-bar {
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(244,121,32,.25);
}

.lang-btns {
  display: flex;
  gap: 6px;
}

/* Theme toggle */
.theme-toggle {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background .15s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,.18); }

.lang-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
  letter-spacing: .3px;
}

.lang-btn:hover {
  background: rgba(244,121,32,.3);
  border-color: var(--orange);
  color: #fff;
}

.lang-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ===================================================
   HEADER / BANNER
   =================================================== */
.site-header {
  background: #000;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid #1a1a1a;
  box-shadow: 0 2px 20px rgba(0,0,0,.7);
}

.site-banner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 14px;
}

/* A logo SVG */
.banner-logo-svg {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(244,121,32,.5));
}

/* Text block */
.banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-title-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.banner-alpha {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #e74c3c, #f47920);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}

.banner-bay {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f47920, #f1c40f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.3px;
}

.banner-ltu {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #2ecc71, #f1c40f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 3px;
}

.banner-divider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.banner-divider::before,
.banner-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f47920, transparent);
  max-width: 80px;
}

.banner-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
}

.banner-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Header meta (cart + user) */
.header-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  flex-shrink: 0;
}

.balance-label { color: #aaa; }

.balance-value, .user-name {
  font-weight: 700;
  color: var(--orange);
}

/* ===================================================
   NAVIGATION
   =================================================== */
.site-nav {
  background: var(--orange);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  position: sticky;
  top: 84px;
  z-index: 99;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-block;
  padding: 10px 12px;
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .4px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-link--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 42px;
  position: relative;
  font-size: 0;
  line-height: 0;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.nav-link--icon .nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  margin-left: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.nav-link:hover,
.nav-link.active {
  background: rgba(0,0,0,.18);
  border-bottom-color: var(--white);
  text-decoration: none;
}

.nav-badge {
  display: inline-block;
  background: var(--white);
  color: var(--orange);
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  line-height: 16px;
}

/* Nav SOL balance / deposit */
.nav-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin: 4px 2px;
  border: none;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.nav-wallet:hover {
  background: rgba(0, 0, 0, 0.35);
}
.nav-wallet:active {
  transform: scale(0.98);
}
.nav-wallet-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-wallet-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .nav-wallet-text {
    display: none;
  }
  .nav-wallet {
    padding: 8px 10px;
    min-width: 42px;
  }
}

/* More menu (⋯) */
.nav-more-wrap {
  position: relative;
  flex-shrink: 0;
}
.nav-more-btn.active {
  background: rgba(0, 0, 0, 0.22);
  border-bottom-color: var(--white);
}
.nav-more-menu {
  position: fixed;
  min-width: 180px;
  background: #1e2a3a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  overflow: hidden;
}
.nav-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.25);
}
.nav-more-backdrop.hidden {
  display: none;
}
.nav-more-menu.hidden {
  display: none;
}
.nav-more-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text, #e8ecf1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-more-item:hover,
.nav-more-item.active {
  background: rgba(255, 140, 0, 0.2);
}
.nav-more-item + .nav-more-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Contacts */
.contacts-intro {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted, #8b9cb3);
  line-height: 1.5;
}
.contact-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--card-bg, #1a2332);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.contact-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.contact-card-body {
  flex: 1;
  min-width: 0;
}
.contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted, #8b9cb3);
  margin-bottom: 6px;
}
.contact-link {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--orange, #ff8c00);
  text-decoration: none;
  word-break: break-all;
}
.contact-link:hover {
  text-decoration: underline;
}
.contact-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #e8ecf1);
}
.contact-open-btn {
  margin-top: 10px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: var(--orange, #ff8c00);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.contact-open-btn:hover {
  filter: brightness(1.08);
}

.wallet-modal {
  max-height: 92vh;
  overflow-y: auto;
}
.wallet-balance-hero {
  text-align: center;
  padding: 16px 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(153, 69, 255, 0.25), rgba(20, 241, 149, 0.12));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.wallet-balance-sol {
  font-size: 22px;
  font-weight: 800;
  color: #14f195;
  letter-spacing: 0.5px;
}
.wallet-balance-eur {
  font-size: 13px;
  color: #aaa;
  margin-top: 6px;
}
.wallet-hint {
  font-size: 12px;
  color: #999;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: center;
}
.wallet-refresh-btn {
  margin-top: 8px;
  background: linear-gradient(135deg, #9945ff, #14f195) !important;
}

/* Nav profile pill */
.nav-spacer { flex: 1; }

.nav-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(0,0,0,.18);
  border-radius: 20px;
  margin: 4px 4px 4px 0;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-profile:hover { background: rgba(0,0,0,.28); }

.nav-avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-profile-name {
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.nav-profile-id {
  color: rgba(255,255,255,.75);
  font-size: 10px;
  white-space: nowrap;
}

.nav-trust {
  font-size: 10px !important;
  padding: 1px 6px !important;
}

/* ===================================================
   MAIN LAYOUT
   =================================================== */
.site-main {
  max-width: 960px;
  margin: 14px auto 30px;
  padding: 0 12px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}

.card-title {
  font-weight: 700;
  font-size: 13px;
  background: var(--orange);
  color: var(--white);
  margin: -10px -10px 10px;
  padding: 7px 10px;
  border-radius: var(--radius) var(--radius) 0 0;
  letter-spacing: .3px;
}

/* Avatar */
.avatar-wrap {
  text-align: center;
  margin: 8px 0 10px;
}
.avatar-svg { width: 60px; height: 60px; }

/* Profile table */
.profile-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.profile-table tr + tr td { border-top: 1px solid #eee; }
.pt-label { color: var(--text-muted); padding: 4px 4px 4px 0; width: 60px; }
.pt-value { font-weight: 600; padding: 4px 0; word-break: break-all; }

.trust-badge {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

/* Category list */
.cat-list { list-style: none; }
.cat-item {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 13px;
  transition: background .1s, color .1s;
  border-radius: 2px;
}
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { background: var(--orange-light); color: var(--orange-dark); }
.cat-item.active {
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
}

/* ===================================================
   CONTENT AREA
   =================================================== */
.content {
  width: 100%;
}

.section-block { }

/* Search bar */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: var(--white);
  transition: border-color .2s;
}
.search-input:focus { border-color: var(--orange); }
.search-btn {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.search-btn:hover { background: var(--orange-dark); }

/* Welcome banner */
.welcome-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.welcome-title { font-size: 17px; font-weight: 700; color: var(--text); }
.welcome-title span { color: var(--orange); }
.welcome-sub { color: var(--text-muted); margin-top: 4px; font-size: 13px; }

/* Section heading */
.section-heading {
  font-size: 14px;
  font-weight: 700;
  background: var(--orange);
  color: var(--white);
  padding: 7px 12px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  letter-spacing: .3px;
}

/* ===================================================
   FILTER TABS
   =================================================== */
.filter-wrap {
  background: #1c1c2e;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 14px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-tab {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: #aaa;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.filter-tab:hover {
  background: rgba(244,121,32,.2);
  border-color: var(--orange);
  color: #fff;
}
.filter-tab.active {
  background: #2a6b3c;
  border-color: #2a6b3c;
  color: #fff;
}

/* Filter panel */
.filter-panel { }

.fp-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: .8px;
  margin-bottom: 8px;
}

.fp-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fp-option {
  background: #2a2a3e;
  border: 1px solid rgba(255,255,255,.1);
  color: #ccc;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  min-width: 100px;
  text-align: center;
}
.fp-option:hover {
  background: rgba(244,121,32,.2);
  border-color: var(--orange);
  color: #fff;
}
.fp-option.active {
  background: #2a2a3e;
  border: 2px solid #fff;
  color: #fff;
  font-weight: 700;
}

/* Search input inside filter */
.fp-search-row { display: flex; }
.fp-search-input {
  width: 100%;
  background: #2a2a3e;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.fp-search-input::placeholder { color: #666; }
.fp-search-input:focus { border-color: var(--orange); }

/* ===================================================
   PRODUCT GRID
   =================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .15s, transform .12s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.product-card:hover {
  box-shadow: 0 3px 10px rgba(244,121,32,.25);
  transform: translateY(-2px);
}

.product-emoji {
  font-size: 34px;
  margin-bottom: 6px;
  line-height: 1;
}

.product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.product-cat-tag {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  margin-top: auto;
}

.product-stock {
  font-size: 10px;
  color: #27ae60;
  margin-top: 2px;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--orange-dark); }

/* ===================================================
   CART
   =================================================== */
.cart-item-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.ci-emoji { font-size: 22px; }
.ci-info { flex: 1; }
.ci-name { font-weight: 700; font-size: 13px; }
.ci-qty  { font-size: 12px; color: var(--text-muted); }
.ci-price { font-weight: 700; color: var(--orange); }
.ci-remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.cart-total {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  font-size: 15px;
  margin-top: 8px;
}
#totalPrice { font-size: 18px; color: var(--orange); margin-right: auto; }

.empty-msg {
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
  font-style: italic;
}

/* ===================================================
   PROFILE DETAIL
   =================================================== */
.profile-detail-card {
  max-width: 400px;
}
.profile-detail-card .profile-table td { font-size: 13px; padding: 8px 6px; }

/* ===================================================
   MODAL
   =================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal {
  background: var(--white);
  border-radius: 6px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-img-wrap { text-align: center; margin-bottom: 12px; }
.modal-img-placeholder { font-size: 64px; line-height: 1; }

.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.modal-cat { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.modal-desc { font-size: 13px; color: #555; margin-bottom: 14px; line-height: 1.5; }

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-price { font-size: 20px; font-weight: 700; color: var(--orange); }

.qty-row { display: flex; align-items: center; gap: 6px; }
.qty-btn {
  width: 28px; height: 28px;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: background .1s;
}
.qty-btn:hover { background: var(--orange-light); }
.qty-val { font-weight: 700; font-size: 15px; min-width: 20px; text-align: center; }

/* ===================================================
   REFERRAL SECTION
   =================================================== */
.ref-hero {
  background: linear-gradient(135deg, #1a1a2e, #0f0f22);
  border: 1px solid #2e2e4a;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 14px;
}
body:not(.dark) .ref-hero { background: linear-gradient(135deg, #1a1a2e, #0f0f22); }

.ref-hero-icon { font-size: 40px; margin-bottom: 10px; }
.ref-hero-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 6px;
}
.ref-hero-sub { font-size: 13px; color: #aaa; }

/* Rewards grid */
.ref-rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ref-reward-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.ref-reward-icon { font-size: 26px; margin-bottom: 8px; }
.ref-reward-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.ref-reward-val { font-size: 28px; font-weight: 800; color: var(--orange); margin-bottom: 4px; }
.ref-reward-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Code / link block */
.ref-code-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.ref-code-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }

.ref-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ref-code-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 1.5px;
  flex: 1;
  font-family: monospace;
}

.ref-link-val {
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  flex: 1;
  line-height: 1.4;
}

.ref-copy-btn {
  background: rgba(244,121,32,.1);
  border: 1px solid rgba(244,121,32,.35);
  color: var(--orange);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.ref-copy-btn:hover { background: rgba(244,121,32,.22); }
.ref-copy-btn.copied { background: #27ae60; border-color: #27ae60; color: #fff; }

.ref-share-btn {
  width: 100%;
  margin-top: 10px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.ref-share-btn:hover { background: var(--orange-dark); }

/* Stats row */
.ref-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.ref-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.ref-stat-val { font-size: 24px; font-weight: 800; color: var(--orange); }
.ref-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===================================================
   RESPONSIVE — mobile
   =================================================== */
@media (max-width: 600px) {
  .site-main {
    padding: 0 8px;
    margin-top: 10px;
  }

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

  .header-meta { display: none; }

  .site-name { font-size: 18px; }

  .modal { max-width: 100%; }

  .nav-profile-info { display: none; }
  .nav-trust { display: none !important; }
}

/* ===================================================
   ORDER CONFIRMATION OVERLAY
   =================================================== */
.ord-overlay {
  position: fixed;
  inset: 0;
  background: #0d0d1a;
  z-index: 270;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 18px 20px;
  overflow-y: auto;
}

.ord-screen {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ord-block {
  background: #141428;
  border: 1px solid #252540;
  border-radius: 14px;
  padding: 16px 18px;
}

.ord-top-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #c8a050;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ord-variant-val {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.ord-location {
  font-size: 15px;
  color: #aaa;
}

.ord-field-label {
  font-size: 11px;
  color: #888;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ord-method-box {
  background: #0d0d1a;
  border-radius: 10px;
  padding: 12px 16px;
}

.ord-method-sol {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.ord-coupon-row {
  display: flex;
  gap: 8px;
}

.ord-coupon-input {
  flex: 1;
  background: #0d0d1a;
  border: 1px solid #2a2a42;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  outline: none;
  text-transform: uppercase;
}
.ord-coupon-input:focus { border-color: #f47920; }
.ord-coupon-input::placeholder { color: #555; font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }

.ord-coupon-apply-btn {
  background: rgba(244,121,32,.15);
  border: 1px solid rgba(244,121,32,.4);
  color: #f47920;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.ord-coupon-apply-btn:hover { background: rgba(244,121,32,.28); }

.ord-coupon-msg {
  margin-top: 8px;
  font-size: 12px;
  min-height: 16px;
}
.ord-coupon-msg.success { color: #27ae60; }
.ord-coupon-msg.error   { color: #e74c3c; }

.ord-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.ord-price-label { color: #888; font-size: 13px; }

.ord-price-orig {
  color: #666;
  font-size: 15px;
  text-decoration: line-through;
}

.ord-price-final {
  font-size: 22px;
  font-weight: 700;
  color: #f47920;
}

.ord-submit-btn {
  width: 100%;
  background: #f47920;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  letter-spacing: .3px;
  margin-top: 4px;
}
.ord-submit-btn:hover  { background: #c85e0a; }
.ord-submit-btn:active { transform: scale(.98); }

.ord-back-btn {
  width: 100%;
  background: #141428;
  border: 1px solid #252540;
  color: #aaa;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ord-back-btn:hover { background: #1e1e38; color: #fff; }

/* ===================================================
   DISTRICT SELECTION OVERLAY
   =================================================== */
.dist-overlay {
  position: fixed;
  inset: 0;
  background: #0d0d1a;
  z-index: 260;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 20px;
  overflow-y: auto;
}

.dist-screen {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.dist-top-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #c8a050;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.dist-city-name {
  font-size: 13px;
  color: #888;
  margin-bottom: 24px;
}

.dist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.dist-btn {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 14px;
  padding: 18px 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, border-color .15s, transform .1s;
  width: 100%;
}

.dist-btn:hover {
  background: #222240;
  border-color: #f47920;
  transform: translateY(-1px);
}

.dist-btn:active { transform: scale(.98); }

.dist-back-btn {
  width: 100%;
  background: #141422;
  border: 1px solid #2a2a3e;
  color: #aaa;
  border-radius: 14px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: background .15s, color .15s;
  letter-spacing: .3px;
}

.dist-back-btn:hover { background: #1e1e38; color: #fff; }

/* ===================================================
   VARIANT SELECTION OVERLAY
   =================================================== */
.var-overlay {
  position: fixed;
  inset: 0;
  background: #0d0d1a;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 0;
  overflow-y: auto;
}

.var-screen {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding-bottom: 20px;
}

.var-top-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #f47920;
  text-transform: uppercase;
  margin-bottom: 6px;
  align-self: flex-start;
}

.var-product-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 24px;
  align-self: flex-start;
}

.var-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: auto;
}

.var-card {
  background: #1a1a2e;
  border: 2px solid #2a2a3e;
  border-radius: 16px;
  padding: 22px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: border-color .15s, transform .12s, background .15s;
  user-select: none;
}

.var-card:hover {
  border-color: #f47920;
  background: #1f1f35;
  transform: translateY(-3px);
}

.var-card.selected {
  border-color: #f47920;
  background: rgba(244,121,32,.12);
}

.var-card-emoji {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

.var-card-qty {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.var-card-price {
  font-size: 14px;
  color: #aaa;
}

.var-card-price strong {
  color: #f47920;
  font-size: 16px;
}

.var-action-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
}

.var-action-row .btn-primary,
.var-action-row .btn-buy {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
}

.var-back-btn {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  color: #aaa;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 16px;
  transition: background .15s, color .15s;
  letter-spacing: .3px;
}

.var-back-btn:hover {
  background: #222240;
  color: #fff;
}

/* ===================================================
   BUY NOW BUTTON
   =================================================== */
.btn-buy {
  background: #1a1a2e;
  color: #f47920;
  border: 2px solid #f47920;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-buy:hover {
  background: #f47920;
  color: #fff;
}

/* ===================================================
   PAYMENT MODAL  (dark theme)
   =================================================== */
.pay-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px;
  overflow-y: auto;
}

.pay-modal {
  background: #1c1c2e;
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  margin: auto;
}

.pay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pay-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
}

.pay-close {
  background: rgba(255,255,255,.1);
  border: none;
  color: #aaa;
  font-size: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.pay-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Product row */
.pay-product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pay-product-emoji { font-size: 28px; }
.pay-product-name  { color: #fff; font-weight: 700; font-size: 14px; }
.pay-product-qty   { color: #aaa; font-size: 12px; margin-top: 2px; }

/* QR */
.pay-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 18px 10px;
}
.pay-qr-img {
  width: 180px; height: 180px;
  border-radius: 8px;
  background: #fff;
  display: block;
}

/* Blocks */
.pay-block {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.pay-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}

/* Wallet address */
.pay-addr-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-addr {
  color: #e0e0e0;
  font-size: 13px;
  font-family: monospace;
  word-break: break-all;
  flex: 1;
  line-height: 1.4;
}

.pay-copy-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #ccc;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.pay-copy-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.pay-copy-btn.copied { background: #27ae60; color: #fff; border-color: #27ae60; }

/* Method */
.pay-method-tag {
  display: inline-block;
  background: rgba(153,69,255,.25);
  color: #c49aff;
  border: 1px solid rgba(153,69,255,.4);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* EUR block */
.pay-eur-block { background: rgba(255,255,255,.03); }
.pay-eur-amount {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.pay-eur-original {
  font-size: 14px;
  color: #888;
  text-decoration: line-through;
  margin-right: 8px;
}

/* SOL */
.pay-sol-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pay-sol-amount {
  color: #9945ff;
  font-size: 20px;
  font-weight: 700;
  font-family: monospace;
}
.pay-sol-spinner { color: #888; font-size: 13px; font-family: inherit; font-weight: 400; }

/* Expiry */
.pay-expiry {
  color: #e0e0e0;
  font-size: 14px;
  font-family: monospace;
}
.pay-expiry-countdown {
  color: #f47920;
  font-size: 12px;
  margin-top: 4px;
}

/* Confirm button */
.pay-confirm-btn {
  display: block;
  width: calc(100% - 36px);
  margin: 16px 18px;
  background: #9945ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .15s;
}
.pay-confirm-btn:hover { background: #7c2de8; }
.pay-confirm-btn:active { transform: scale(.98); }
