/* ============================================================
   shop.css — Tienda de Pistas: Growth City
   ============================================================ */

/* ── Botón en HUD ────────────────────────────────────────── */
#shop-hud-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,.1);
    border: 1px solid rgba(255,215,0,.3);
    border-radius: 8px;
    color: #ffd93d;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 12px; font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    transition: background .18s, transform .12s;
    letter-spacing: .3px;
    pointer-events: all;
}
#shop-hud-btn:hover  { background: rgba(255,215,0,.18); }
#shop-hud-btn:active { transform: scale(.97); }

/* ── Overlay ─────────────────────────────────────────────── */
#shop-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    transition: background .25s ease;
}
#shop-overlay.visible {
    background: rgba(0,0,0,.76);
    pointer-events: all;
}

/* ── Card ─────────────────────────────────────────────────── */
#shop-card {
    background: #080d12;
    border: 1px solid rgba(255,215,0,.18);
    border-radius: 18px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    transform: scale(.88) translateY(18px);
    opacity: 0;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255,215,0,.06);
    font-family: 'Segoe UI', Arial, sans-serif;
}
#shop-card.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── Header ──────────────────────────────────────────────── */
#shop-header {
    background: linear-gradient(135deg, rgba(255,215,0,.08), rgba(255,140,0,.04));
    border-bottom: 1px solid rgba(255,215,0,.12);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
#shop-header-left { flex: 1; min-width: 0; }
#shop-title {
    font-size: 17px; font-weight: 700;
    color: #ffd93d; margin: 0 0 2px;
}
#shop-subtitle {
    font-size: 11px;
    color: rgba(255,215,0,.38);
    letter-spacing: .3px;
}
#shop-balance {
    font-size: 14px; font-weight: 700;
    color: #ffd93d;
    background: rgba(255,215,0,.1);
    border: 1px solid rgba(255,215,0,.25);
    border-radius: 18px;
    padding: 4px 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.shop-close {
    background: none; border: none;
    color: rgba(255,255,255,.28); font-size: 19px;
    cursor: pointer; line-height: 1; padding: 2px 5px;
    transition: color .2s; flex-shrink: 0;
}
.shop-close:hover { color: rgba(255,255,255,.65); }

/* ── Cuerpo ──────────────────────────────────────────────── */
#shop-body {
    padding: 16px 18px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 72vh;
}
#shop-body::-webkit-scrollbar { width: 3px; }
#shop-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

.shop-section-label {
    font-size: 10px; font-weight: 700;
    color: rgba(255,255,255,.25);
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 10px;
}

/* ── Ítem de tienda ──────────────────────────────────────── */
.shop-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: border-color .18s, background .18s;
}
.shop-item:last-child { margin-bottom: 0; }
.shop-item:hover:not(.disabled) {
    background: rgba(255,255,255,.055);
    border-color: rgba(255,215,0,.18);
}
.shop-item.disabled { opacity: .42; }

.shop-item-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    padding-top: 2px;
}
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name {
    font-size: 13px; font-weight: 700;
    color: #fff; margin-bottom: 3px;
}
.shop-item-desc {
    font-size: 11px;
    color: rgba(255,255,255,.42);
    line-height: 1.55;
    margin-bottom: 3px;
}
.shop-item-detail {
    font-size: 10px;
    color: rgba(255,215,0,.35);
    font-style: italic;
    line-height: 1.45;
}

.shop-item-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
}
.shop-item-badge {
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 10px;
    white-space: nowrap;
}
.shop-item-badge.active {
    background: rgba(74,222,128,.12);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.25);
}

/* ── Botón de compra ─────────────────────────────────────── */
.shop-buy-btn {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 12px; font-weight: 700;
    padding: 7px 14px;
    border: none; border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #b8860b, #ffd700);
    color: #1a0a00;
    white-space: nowrap;
    transition: transform .12s, filter .12s;
    min-height: 36px;
}
.shop-buy-btn:hover:not([disabled])  { filter: brightness(1.12); }
.shop-buy-btn:active:not([disabled]) { transform: scale(.95); }
.shop-buy-btn[disabled] {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.25);
    cursor: not-allowed;
}

/* ── Botón inline (dentro de NPC o caja) ─────────────────── */
.shop-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,.07);
    border: 1px dashed rgba(255,215,0,.28);
    border-radius: 8px;
    color: #ffd93d;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 12px; font-weight: 700;
    padding: 6px 13px;
    cursor: pointer;
    transition: background .18s;
    letter-spacing: .3px;
    margin-top: 8px;
}
.shop-inline-btn:hover:not([disabled]) { background: rgba(255,215,0,.14); }
.shop-inline-btn[disabled] {
    opacity: .38; cursor: not-allowed;
}

/* Resaltado de artefacto revelado */
.npc-v2-choice.revealed {
    border-color: #ffd93d !important;
    background: rgba(255,215,0,.15) !important;
    animation: shop-reveal-pulse 1.2s ease infinite;
}
@keyframes shop-reveal-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,215,0,.4); }
    50%      { box-shadow: 0 0 0 6px rgba(255,215,0,0); }
}

/* ── Toast de compra ─────────────────────────────────────── */
#shop-toast {
    position: fixed;
    bottom: 96px; left: 50%;
    transform: translateX(-50%);
    background: rgba(6,4,18,.92);
    border: 1px solid rgba(255,215,0,.35);
    color: #ffd93d;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 13px; font-weight: 700;
    padding: 9px 22px;
    border-radius: 22px;
    pointer-events: none;
    z-index: 700;
    opacity: 0;
    transition: opacity .3s;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 520px) {
    #shop-card      { border-radius: 14px; }
    #shop-body      { padding: 14px 14px 18px; }
    .shop-item      { padding: 10px 12px; }
    .shop-item-icon { font-size: 20px; width: 34px; }
    .shop-item-name { font-size: 12px; }
    .shop-item-detail { display: none; }
}

/* ── Ajuste al design system ─────────────────────────────── */
#shop-card, .shop-buy-btn, .shop-inline-btn {
    font-family: var(--font, 'Inter', sans-serif);
}
