/* ══════════════════════════════════════════════════════════
   TitanMC — store.css  |  NABU Design Team
   Requires: main.css + additions.css to be loaded first.
   All values reference CSS variables from main.css :root.
════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────
   ACTIVE NAV LINK
────────────────────────────────────────────────────────── */
.nav-link--active {
  color: var(--accent-color) !important;
  background: rgba(56, 189, 248, 0.08) !important;
}

/* ──────────────────────────────────────────────────────────
   NAVBAR CART BUTTON
────────────────────────────────────────────────────────── */
.navbar__cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: background var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
}
.navbar__cart-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-color);
}
.navbar__cart-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

/* Cart badge bubble */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-color);
  color: var(--darker-bg);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--dark-bg);
  pointer-events: none;
  line-height: 1;
}

/* ──────────────────────────────────────────────────────────
   CART DROPDOWN — desktop
────────────────────────────────────────────────────────── */
.cart-dropdown {
  position: absolute;
  top: calc(var(--navbar-h) + 8px);
  right: 24px;
  width: 340px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 1200;
  overflow: hidden;
  animation: slideUp var(--t-normal);
}
.cart-dropdown[hidden] { display: none; }

.cart-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.cart-dropdown__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cart-dropdown__close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.cart-dropdown__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────
   CART ITEMS LIST — shared by dropdown + drawer
────────────────────────────────────────────────────────── */
.cart-items-list {
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  padding: 8px 0;
}
.cart-items-list--drawer {
  flex: 1;
  max-height: none;
}

/* Empty state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.cart-empty img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.2;
}

/* Cart item row */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  transition: background var(--t-fast);
}
.cart-item:hover { background: rgba(255, 255, 255, 0.02); }

.cart-item__img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-color);
  border: 1px solid var(--border-color);
}

/* Rank thumbnail in cart — colored box with crown icon */
.cart-item__rank-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Rank visual inside product modal */
.modal-rank-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
}
.modal-rank-name {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 24px currentColor;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cart-item__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item__price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-item__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}
.cart-item__remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
}

/* ──────────────────────────────────────────────────────────
   CART FOOTER — total + checkout + error
────────────────────────────────────────────────────────── */
.cart-dropdown__footer,
.cart-drawer__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.cart-total-amount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Inline checkout error */
.cart-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--error-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-error[hidden] { display: none; }

.cart-error__msg {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.5;
}
.cart-error__msg svg { flex-shrink: 0; margin-top: 1px; }

.cart-error__link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-color);
  padding: 5px 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.06);
  transition: background var(--t-fast);
  align-self: flex-start;
}
.cart-error__link:hover { background: rgba(56, 189, 248, 0.14); }

/* ──────────────────────────────────────────────────────────
   MOBILE CART DRAWER — slides left → right, 75% width
────────────────────────────────────────────────────────── */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 17, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  transition: opacity var(--t-normal);
}
.cart-drawer-overlay[hidden] { display: none; }
.cart-drawer-overlay--visible { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 75%;
  max-width: 320px;
  background: var(--card-bg);
  border-right: 1px solid var(--border-color);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--t-slow) cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer[hidden] { display: none; }
.cart-drawer--open   { transform: translateX(0) !important; display: flex !important; }

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.cart-drawer__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cart-drawer__close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.cart-drawer__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────
   STORE HERO HEADER
────────────────────────────────────────────────────────── */
.store-hero {
  padding: calc(var(--navbar-h) + 60px) 0 40px;
}
.store-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.store-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-color);
  opacity: 0.85;
  margin-bottom: 6px;
}
.store-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.store-hero__accent {
  color: var(--accent-color);
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.35);
}
.store-hero__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 440px;
}
.store-hero__note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.store-hero__note img {
  filter: brightness(0) saturate(100%) invert(68%) sepia(57%) saturate(500%) hue-rotate(168deg) brightness(100%) contrast(95%);
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   STORE LAYOUT — 25/75 split on desktop, stacked on mobile
────────────────────────────────────────────────────────── */
.store-content-section { padding: 0 0 100px; }

.store-layout {
  display: grid;
  grid-template-columns: 1fr 3fr; /* sidebar ~25%, products ~75% */
  gap: 32px;
  align-items: start;
}

/* Desktop: sidebar LEFT, products RIGHT */
.store-sidebar  { order: 1; }
.store-products { order: 2; }

/* ──────────────────────────────────────────────────────────
   PRODUCTS GRID — 3 per row on desktop
────────────────────────────────────────────────────────── */
.store-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.store-section-label__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
  flex-shrink: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ──────────────────────────────────────────────────────────
   PRODUCT CARD
────────────────────────────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t-normal), transform var(--t-normal), box-shadow var(--t-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}
/* Rank cards use their own color on hover */
.product-card--rank:hover {
  border-color: var(--rank-border, rgba(56, 189, 248, 0.35));
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 30px var(--rank-glow, rgba(56,189,248,0.08));
}
.product-card:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* ── Rank header (replaces img-wrap for rank products) ── */
.product-card__rank-header {
  position: relative;
  width: 100%;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}
.rank-crown {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  filter: drop-shadow(0 0 12px currentColor);
  transition: transform var(--t-slow), opacity var(--t-normal);
}
.product-card:hover .rank-crown {
  transform: translateY(-4px) scale(1.08);
  opacity: 1;
}
.rank-name-large {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 20px currentColor;
  opacity: 0.92;
}
/* Badge inside rank-header (no absolute positioning needed, flex handles it) */
.product-card__rank-header .product-card__badge {
  position: static;
  margin-top: 2px;
}

/* Image area */
.product-card__img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1527 0%, #060911 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-card__img { transform: scale(1.06); }

/* Rank badge on image */
.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

/* Badge variants */
.badge--free {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.badge--monthly {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-color);
}
.badge--lifetime {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.badge--special {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

/* Card body */
.product-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card__name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.product-card__desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

/* Card footer: price + button */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.product-price img {
  filter: brightness(0) saturate(100%) invert(68%) sepia(57%) saturate(500%) hue-rotate(168deg) brightness(100%) contrast(95%);
}
.product-price--free    { color: #34d399; }
.product-price--special { color: #c084fc; font-size: 0.78rem; font-weight: 600; }

.product-card__cart-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.product-card__cart-btn:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--darker-bg);
  transform: translateY(-1px);
}
.product-card__cart-btn:active { transform: translateY(0); }

.product-card__discord-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(114, 137, 218, 0.1);
  border: 1px solid rgba(114, 137, 218, 0.3);
  color: #7289da;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.product-card__discord-btn:hover {
  background: rgba(114, 137, 218, 0.2);
}

/* ──────────────────────────────────────────────────────────
   PRODUCT MODAL / EXPANDED CARD
────────────────────────────────────────────────────────── */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 17, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  animation: fadeIn var(--t-normal);
}
.product-modal-overlay[hidden] { display: none; }

.product-modal {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp var(--t-normal);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  z-index: 10;
  transition: background var(--t-fast), color var(--t-fast);
}
.product-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Top section: image + info side by side */
.product-modal__top {
  display: flex;
  gap: 0;
}

.product-modal__img-wrap {
  position: relative;
  width: 200px;
  min-height: 200px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0d1527, #060911);
  border-radius: var(--radius-lg) 0 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-modal__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.product-modal__info {
  flex: 1;
  padding: 32px 48px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.product-modal__name {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.product-modal__tagline {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.product-modal__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.product-modal__price {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
}
.product-modal__price--free { color: #34d399; }

.product-modal__billing {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.billing--free     { color: #34d399; }
.billing--monthly  { color: var(--accent-color); }
.billing--lifetime { color: #fbbf24; }
.billing--special  { color: #c084fc; }

.product-modal__divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 24px;
}

/* Perks list inside modal */
.product-modal__perks {
  padding: 24px 24px 8px;
}
.product-modal__perks-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.product-modal__perks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-modal__perk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
/* ══════════════════════════════════════════════════════════
   PATCH — Replace ONLY the .perk-icon rule in store.css
   Find:  .perk-icon { ... }   → replace with this block
════════════════════════════════════════════════════════════ */

.perk-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  /* Tints the icon to match the muted text color of the site */
  filter: brightness(0) invert(1);
  opacity: 0.55;
}

/* Highlight color changes per rank when the modal opens */
.product-modal[data-rank="mortal"]  .perk-icon { opacity: 0.6; }
.product-modal[data-rank="legend"]  .perk-icon { filter: brightness(0) saturate(100%) invert(68%) sepia(57%) saturate(500%) hue-rotate(168deg) brightness(100%) contrast(95%); opacity: 0.85; }
.product-modal[data-rank="elite"]   .perk-icon { filter: brightness(0) saturate(100%) invert(72%) sepia(30%) saturate(800%) hue-rotate(220deg) brightness(105%) contrast(95%); opacity: 0.85; }
.product-modal[data-rank="mythic"]  .perk-icon { filter: brightness(0) saturate(100%) invert(82%) sepia(40%) saturate(600%) hue-rotate(10deg) brightness(105%) contrast(95%); opacity: 0.85; }
.product-modal[data-rank="social"]  .perk-icon { filter: brightness(0) saturate(100%) invert(70%) sepia(20%) saturate(600%) hue-rotate(260deg) brightness(105%) contrast(95%); opacity: 0.85; }

/* Also patch .product-modal__perk-item so the gap fits an image not emoji */
.product-modal__perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Action button in modal */
.product-modal__actions {
  padding: 16px 24px 28px;
}
.modal-add-btn,
.modal-discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.modal-discord-btn img {
  filter: brightness(0) invert(1);
  width: 16px;
  height: 16px;
}

/* ──────────────────────────────────────────────────────────
   SIDEBAR WIDGETS
────────────────────────────────────────────────────────── */
.store-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--navbar-h) + 28px);
}

.sidebar-widget {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}
.sidebar-widget__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.sidebar-widget__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.sidebar-widget__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-widget__dot--green {
  background: var(--success-color);
  box-shadow: 0 0 6px var(--success-color);
  animation: bubblePulse 3s ease-in-out infinite;
}

.sidebar-top-crown { margin-left: auto; font-size: 1rem; }

/* Recent buyers — avatar row */
.sidebar-buyers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.buyer-avatar-wrap {
  position: relative;
  display: inline-block;
}

.buyer-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  object-fit: cover;
  display: block;
  cursor: default;
  transition: border-color var(--t-fast), transform var(--t-fast);
  background: var(--border-color);
}
.buyer-avatar-wrap:hover .buyer-avatar {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Tooltip on hover */
.buyer-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #0d1527;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
  transform: translateX(-50%) translateY(4px);
  z-index: 10;
}
.buyer-avatar-wrap:hover .buyer-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Tooltip arrow */
.buyer-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-color);
}

/* Top buyer */
.sidebar-widget--top {
  border-color: rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, var(--card-bg) 60%, rgba(245, 158, 11, 0.04) 100%);
}

.top-buyer {
  display: flex;
  align-items: center;
  gap: 14px;
}
.top-buyer__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid rgba(245, 158, 11, 0.35);
  background: var(--border-color);
  flex-shrink: 0;
}
.top-buyer__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.top-buyer__name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.top-buyer__amount {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
}

/* Info widget */
.sidebar-widget--info {
  background: rgba(56, 189, 248, 0.03);
  border-color: rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-info__text {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.sidebar-info__link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-color);
  transition: opacity var(--t-fast);
}
.sidebar-info__link:hover { opacity: 0.75; }
.sidebar-info__link img {
  filter: brightness(0) saturate(100%) invert(68%) sepia(57%) saturate(500%) hue-rotate(168deg) brightness(100%) contrast(95%);
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
────────────────────────────────────────────────────────── */

/* Tablet: 2 products per row */
@media (max-width: 1024px) {
  .store-layout {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: single column, products FIRST, sidebar BELOW */
@media (max-width: 768px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Products appear first on mobile */
  .store-products { order: 1; }
  .store-sidebar  { order: 2; position: static; } /* No sticky on mobile */

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .store-hero { padding: calc(var(--navbar-h) + 40px) 0 28px; }
  .store-hero__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .store-hero__note { font-size: 0.72rem; }

  /* Modal goes full-width on mobile */
  .product-modal { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .product-modal-overlay { align-items: flex-end; padding: 0; }
  .product-modal__top { flex-direction: column; }
  .product-modal__img-wrap { width: 100%; height: 180px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .product-modal__info { padding: 20px 20px 16px; }

  .sidebar-buyers { gap: 6px; }
  .buyer-avatar   { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .product-card__img-wrap { height: 140px; }
}



/* ── Store hero status + bedrock btn ───────────────────── */
.store-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 999px;
  padding: 4px 12px 4px 10px;
  font-size: 0.75rem;
  color: var(--primary-color);
}
.store-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.store-hero__bedrock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

/* ── Skeleton loaders ───────────────────────────────────── */
@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.buyer-avatar--skeleton {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--card-bg) 30%, rgba(255,255,255,0.05) 50%, var(--card-bg) 70%);
  background-size: 400% 100%;
  animation: skeletonShimmer 2.4s ease-in-out infinite;
}
.top-buyer__avatar--skeleton {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--card-bg) 30%, rgba(255,255,255,0.05) 50%, var(--card-bg) 70%);
  background-size: 400% 100%;
  animation: skeletonShimmer 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* ── sidebar-top-crown SVG fix ──────────────────────────── */
.sidebar-top-crown {
  margin-left: auto;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
