/* ── Shop Page ─────────────────────────────────────────────────────────── */

.ao-shop-page {
  padding: 32px 0 64px;
  min-height: 60vh;
}

/* Header */
.ao-shop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ao-shop-header__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ao-text);
  margin-bottom: 4px;
}

.ao-shop-header__sub {
  font-size: 13px;
  color: var(--ao-text-muted);
}

/* Balance pill */
.ao-shop-balance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(
    135deg,
    rgba(249, 202, 36, 0.12),
    rgba(249, 202, 36, 0.06)
  );
  border: 1px solid rgba(249, 202, 36, 0.3);
  border-radius: 99px;
  padding: 8px 16px;
  color: #f9ca24;
  flex-shrink: 0;
}

.ao-shop-balance__amount {
  font-size: 18px;
  font-weight: 800;
}

.ao-shop-balance__label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
}

/* Tabs */
.ao-shop-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ao-border, rgba(255, 255, 255, 0.07));
  padding-bottom: 0;
}

.ao-shop-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ao-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.ao-shop-tab:hover {
  color: var(--ao-text);
}

.ao-shop-tab.is-active {
  color: var(--ao-primary, #6c5ce7);
  border-bottom-color: var(--ao-primary, #6c5ce7);
}

.ao-shop-tab__count {
  font-size: 10px;
  background: var(--ao-bg-alt, #1a1a2e);
  border-radius: 99px;
  padding: 1px 6px;
  font-weight: 700;
}

/* Notice */
.ao-shop-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ao-text);
  margin-bottom: 20px;
}

.ao-shop-notice a {
  color: var(--ao-primary, #6c5ce7);
  font-weight: 700;
}

/* Grid */
.ao-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

/* Item card */
.ao-shop-item {
  background: var(--ao-bg-card, #13152a);
  border: 1px solid var(--ao-border, rgba(255, 255, 255, 0.07));
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.ao-shop-item:hover {
  border-color: var(--ao-primary, #6c5ce7);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.15);
}

.ao-shop-item.is-owned {
  border-color: rgba(108, 92, 231, 0.35);
  background: rgba(108, 92, 231, 0.04);
}

/* Preview area */
.ao-shop-item__preview {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #0e1021 0%, #141629 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ao-shop-item__avatar {
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6ff7 0%, #4fc3f7 100%);
  overflow: hidden;
}

.ao-shop-item__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.ao-shop-item__frame-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  object-fit: contain;
  pointer-events: none;
}

.ao-shop-item__owned-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ao-primary, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Body */
.ao-shop-item__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.ao-shop-item__name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ao-text);
  text-align: center;
  word-break: break-word;
}

.ao-shop-item__status {
  font-size: 11px;
  font-weight: 700;
}

.ao-shop-item__status--owned {
  color: var(--ao-primary, #6c5ce7);
}

/* Buy button */
.ao-shop-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  background: #f9ca24;
  color: #1a1a2e;
  border: none;
  border-radius: 99px;
  padding: 6px 14px;
  cursor: pointer;
  transition:
    opacity 0.15s,
    transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.ao-shop-buy-btn:hover:not(:disabled) {
  opacity: 0.85;
  transform: scale(1.05);
}

.ao-shop-buy-btn:disabled {
  background: var(--ao-bg-alt, #1a1a2e);
  color: var(--ao-text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.ao-shop-buy-btn--login {
  background: var(--ao-primary, #6c5ce7);
  color: #fff;
}

/* Earn note */
.ao-shop-earn-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ao-text-muted);
}

/* Empty state */
.ao-shop-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--ao-text-muted);
}

.ao-shop-empty svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ── Name Plate Grid ─────────────────────────────────────────────────────── */

.ao-shop-grid--nameplates {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.ao-shop-item--nameplate .ao-shop-item__np-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: #0a0c18;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ao-shop-item__np-video,
.ao-shop-item__np-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* video overlays the static image */
.ao-shop-item__np-video {
  z-index: 1;
}

.ao-shop-item__np-static {
  z-index: 0;
}

/* User preview on nameplate */
.ao-shop-item__np-user {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.ao-shop-item__np-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ao-shop-item__np-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.ao-shop-item__np-username {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* ── Navbar shop icon ─────────────────────────────────────────────────────── */

.ao-header__shop-btn:hover {
  color: var(--ao-text);
  background: var(--ao-bg-alt, rgba(255, 255, 255, 0.06));
}

.ao-header__shop-btn.is-active {
  color: #f9ca24;
}

@media (max-width: 768px) {
  .ao-shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
