/* ================================================================
   TIENDA.CSS — Tienda de puntos del canal
   ================================================================ */

.shop-page {
  position: relative; z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 96px 20px 80px;
}

.shop-hero { text-align: center; margin-bottom: 40px; }
.shop-eyebrow {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.shop-title {
  font-family: var(--font-accent);
  font-size: clamp(44px, 8vw, 72px);
  letter-spacing: .08em; line-height: .95;
  color: var(--text);
}
.shop-title span { color: var(--gold); }
.shop-sub {
  max-width: 560px; margin: 14px auto 0;
  font-size: 15px; color: var(--text-dim); line-height: 1.6;
}

/* ── Sesión ── */
.shop-session { margin-bottom: 56px; display: flex; justify-content: center; }
.shop-session-card {
  width: 100%; max-width: 520px;
  padding: 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(14px 0%, 100% 0%, calc(100% - 14px) 100%, 0% 100%);
}
.shop-session-card p { font-size: 14px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }

.shop-twitch-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 700;
  letter-spacing: .05em;
  color: #fff;
  background: var(--purple, #9146FF);
  border: 1px solid rgba(255,255,255,.15);
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: filter .2s, transform .2s;
}
.shop-twitch-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.shop-login-error { color: #DC2626; font-size: 13px; margin-top: 12px; }

.shop-user-card {
  display: flex; align-items: center; gap: 16px;
  text-align: left;
}
.shop-avatar {
  width: 56px; height: 56px; flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.shop-user-info { flex: 1; min-width: 0; }
.shop-username {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--text);
}
.shop-balance { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.shop-balance-num {
  font-family: var(--font-accent);
  font-size: 34px; line-height: 1;
  color: var(--gold-light);
}
.shop-balance-lbl {
  font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}
.shop-balance-note { margin-top: 4px; font-size: 12px; color: var(--muted); }
.shop-logout {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600;
  color: var(--text-dim);
  text-decoration: underline;
}
.shop-logout:hover { color: var(--text); }

/* ── Catálogo ── */
.shop-section-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: 8px;
  position: relative; padding-left: 16px;
}
.shop-section-title::before {
  content: '';
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.shop-section-sub {
  font-size: 14px; color: var(--text-dim);
  margin-bottom: 20px; padding-left: 16px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.shop-item {
  padding: 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
  transition: border-color .2s, transform .2s;
}
.shop-item:hover { border-color: rgba(200,155,60,.35); transform: translateY(-2px); }
.shop-item-icon { font-size: 30px; margin-bottom: 10px; }
.shop-item-name {
  font-family: var(--font-accent);
  font-size: 20px; letter-spacing: .05em;
  color: var(--text);
  margin-bottom: 6px;
}
.shop-item-desc { font-size: 13px; color: var(--text-dim); line-height: 1.45; margin-bottom: 12px; }
.shop-item-price {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  padding: 4px 10px;
  border: 1px solid rgba(200,155,60,.3);
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

/* ── FAQ ── */
.shop-faq-item {
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 14px; color: var(--text-dim); line-height: 1.55;
  background: var(--bg-card);
  border-left: 3px solid var(--gold-dark);
}
.shop-faq-item strong { color: var(--text); display: block; margin-bottom: 3px; }
.shop-faq-item code {
  font-family: var(--font-body); font-weight: 700;
  color: var(--gold-light);
  background: rgba(200,155,60,.1);
  padding: 1px 6px;
}

@media (max-width: 520px) {
  .shop-page { padding-top: 80px; }
  .shop-user-card { flex-direction: column; text-align: center; }
}

/* ── Artículos canjeables ── */
.shop-item-live { opacity: 1; border-color: rgba(200,155,60,.3); }
.shop-buy-btn {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 700; letter-spacing: .05em;
  color: #060810;
  background: var(--gold);
  border: none; cursor: pointer;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: filter .2s;
}
.shop-buy-btn:hover:not(:disabled) { filter: brightness(1.15); }
.shop-buy-btn:disabled { opacity: .55; cursor: default; }
.shop-buy-result { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
.shop-buy-result.ok  { color: #4ADE80; }
.shop-buy-result.err { color: #F87171; }

.shop-item-input {
  width: 100%; padding: 8px 10px; margin-bottom: 10px;
  font-family: var(--font-body); font-size: 13px;
  color: var(--text);
  background: rgba(6,8,16,.8);
  border: 1px solid var(--border);
}
.shop-item-input:focus { outline: none; border-color: var(--gold); }

/* ══ Etiquetas de escasez en cada artículo ══ */
.shop-item-limits {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 4px;
}
.shop-item-limits span {
  font-size: 10px; letter-spacing: .06em;
  padding: 3px 8px;
  color: var(--gold);
  background: rgba(200,155,60,.08);
  border: 1px solid rgba(200,155,60,.22);
  border-radius: 3px;
  white-space: nowrap;
}

/* ══ Historial + Feed: dos columnas a la misma altura ══ */
.shop-history-row {
  max-width: 1100px; margin: 0 auto 48px; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  align-items: stretch; /* las dos columnas miden lo mismo */
}
/* Cada columna es una pila: título · subtítulo · lista (crece) · paginador */
.shop-col { display: flex; flex-direction: column; min-width: 0; }
.shop-col .shop-section-title { margin-bottom: 4px; }
.shop-col .shop-section-sub { margin-bottom: 12px; min-height: 34px; }

.shop-mine-list, .shop-feed-list {
  display: flex; flex-direction: column;
  flex: 1; /* estira hasta el fondo: los dos paneles acaban a la misma altura */
  border: 1px solid rgba(200,155,60,.16);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  background: linear-gradient(165deg, rgba(200,155,60,.03), rgba(13,17,23,.4));
}
.shop-mine-row, .shop-feed-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 13px;
}
.shop-mine-row:last-child, .shop-feed-row:last-child { border-bottom: none; }
.shop-mine-row:hover, .shop-feed-row:hover { background: rgba(255,255,255,.02); }

.shop-mine-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-mine-item { color: var(--text); font-weight: 600; }
.shop-mine-input { font-size: 11px; color: var(--text-dim); font-style: italic; }
.shop-mine-st {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; font-weight: 700;
}
.shop-mine-st.ok   { color: #4ADE80; background: rgba(74,222,128,.1);  border: 1px solid rgba(74,222,128,.3); }
.shop-mine-st.ko   { color: #F87171; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.28); }
.shop-mine-st.pend { color: var(--gold); background: rgba(200,155,60,.1); border: 1px solid rgba(200,155,60,.3); }
.shop-mine-price { color: var(--gold); font-weight: 700; white-space: nowrap; }
.shop-mine-time, .shop-feed-time { font-size: 11px; color: var(--text-dim); white-space: nowrap; min-width: 84px; text-align: right; }

/* ══ Feed público ══ */
.shop-feed-name { font-weight: 700; color: var(--electric); white-space: nowrap; }
.shop-feed-item { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-feed-price { color: var(--gold); font-weight: 700; white-space: nowrap; }

@media (max-width: 640px) {
  .shop-mine-row, .shop-feed-row { flex-wrap: wrap; gap: 8px; }
  .shop-mine-time, .shop-feed-time { min-width: 0; }
}

/* ── Paginador del historial ── */
.shop-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 12px;
}
.shop-pager-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; cursor: pointer;
  color: var(--gold); background: rgba(200,155,60,.06);
  border: 1px solid rgba(200,155,60,.28);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  transition: all .18s ease;
}
.shop-pager-btn:hover:not(:disabled) {
  background: rgba(200,155,60,.16);
  border-color: rgba(200,155,60,.6);
  color: #f0d88a;
}
.shop-pager-btn:disabled { opacity: .28; cursor: default; }
.shop-pager-info {
  font-family: monospace; font-size: 12px; letter-spacing: .08em;
  color: var(--text-dim); min-width: 46px; text-align: center;
}
.shop-mine-empty {
  padding: 28px 18px; text-align: center;
  color: var(--text-dim); font-size: 13px;
}

@media (max-width: 900px) {
  .shop-history-row { grid-template-columns: 1fr; gap: 40px; }
  .shop-col .shop-section-sub { min-height: 0; }
}
