/* ═══════════════════════════════════════════════════════════════════
   SHOP v4.0 - The Black Market 🔫
   ENFORCER MINI APP
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   MARKET HEADER
   ═══════════════════════════════════════════════════════════════════ */

.market-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.mh-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}

.mh-icon {
    font-size: 22px;
}

.mh-subtitle {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   MARKET TABS
   ═══════════════════════════════════════════════════════════════════ */

.market-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mt-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.mt-tab span:first-child {
    font-size: 16px;
}

.mt-tab:active {
    transform: scale(0.96);
}

.mt-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* ═══════════════════════════════════════════════════════════════════
   MYSTERY BOX BANNER
   ═══════════════════════════════════════════════════════════════════ */

.mystery-box {
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 2px solid var(--gold);
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.mystery-box:active {
    transform: scale(0.98);
}

.mystery-box.locked {
    opacity: 0.6;
    border-color: var(--border);
}

.mb-glow {
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, var(--gold), transparent, var(--gold), transparent);
    animation: spin 4s linear infinite;
    opacity: 0.15;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mb-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}

.mb-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mb-icon {
    font-size: 40px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.mb-info {}

.mb-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
}

.mb-desc {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

.mb-right {
    text-align: right;
}

.mb-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

.mb-btn {
    margin-top: 6px;
    padding: 6px 16px;
    background: var(--gold);
    color: var(--bg);
    font-size: 11px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.mb-prizes {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    font-size: 18px;
    z-index: 1;
}

.mb-footer {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    font-size: 11px;
    z-index: 1;
}

.mb-timer {
    color: #ff6b6b;
    font-weight: 700;
}

.mb-ready {
    color: var(--positive);
    font-weight: 700;
}

.mb-cd {
    color: var(--text-dim);
}

.ims-value.small {
    font-size: 9px;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════ */

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.sh-icon {
    font-size: 14px;
}

.sh-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: 0.5px;
}

.sh-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURED ITEMS CAROUSEL
   ═══════════════════════════════════════════════════════════════════ */

.featured-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
    display: none;
}

.featured-item {
    flex-shrink: 0;
    width: 110px;
    padding: 14px 12px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    position: relative;
}

.featured-item:active {
    transform: scale(0.95);
    border-color: var(--accent);
}

.featured-item.vip {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--bg-card) 100%);
}

.featured-item.owned {
    border-color: var(--positive);
    opacity: 0.7;
}

.fi-discount {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 3px 6px;
    background: var(--negative);
    color: white;
    font-size: 9px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.fi-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.fi-name {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-price {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.fi-price.owned {
    color: var(--positive);
}

.fi-price.expensive {
    color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORY TABS
   ═══════════════════════════════════════════════════════════════════ */

.category-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.cat-tab:active {
    transform: scale(0.95);
}

.cat-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* ═══════════════════════════════════════════════════════════════════
   ITEMS GRID
   ═══════════════════════════════════════════════════════════════════ */

.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.market-item {
    position: relative;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.market-item:active {
    transform: scale(0.96);
    border-color: var(--accent);
}

.market-item.vip {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, var(--bg-card) 100%);
}

.market-item.owned {
    border-color: var(--positive);
    background: rgba(34, 197, 94, 0.05);
}

.market-item.locked {
    opacity: 0.6;
}

.mi-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    background: var(--gold);
    color: var(--bg);
    font-size: 8px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.mi-hot {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    animation: pulse 1s ease-in-out infinite;
}

.mi-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.mi-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mi-desc {
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 10px;
    min-height: 26px;
    line-height: 1.3;
}

.mi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.mi-price {
    font-size: 12px;
    font-weight: 700;
}

.mi-price.red {
    color: var(--negative);
}

.mi-owned {
    font-size: 11px;
    font-weight: 700;
    color: var(--positive);
}

.mi-buy {
    padding: 4px 10px;
    background: var(--accent);
    color: var(--bg);
    font-size: 10px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════════════
   STASH (INVENTORY)
   ═══════════════════════════════════════════════════════════════════ */

.stash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sth-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sth-icon {
    font-size: 20px;
}

.sth-title {
    font-size: 14px;
    font-weight: 800;
}

.sth-count {
    font-size: 12px;
    color: var(--text-dim);
}

.stash-section {
    margin-bottom: 20px;
}

.sts-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-left: 4px;
}

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

.stash-item {
    position: relative;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.stash-item:active {
    transform: scale(0.95);
    border-color: var(--accent);
}

.stash-item.active {
    border-color: var(--positive);
    background: rgba(34, 197, 94, 0.1);
}

.sti-qty {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    background: var(--accent);
    color: var(--bg);
    font-size: 9px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.sti-active {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 5px;
    background: var(--positive);
    color: white;
    font-size: 8px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.sti-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.sti-name {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.sti-use {
    padding: 6px 12px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--bg);
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.sti-use:active {
    transform: scale(0.9);
}

/* ═══════════════════════════════════════════════════════════════════
   HISTORY
   ═══════════════════════════════════════════════════════════════════ */

.history-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.hh-icon {
    font-size: 18px;
}

.hh-title {
    font-size: 14px;
    font-weight: 800;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tx-icon {
    font-size: 20px;
}

.tx-info {}

.tx-name {
    font-size: 12px;
    font-weight: 600;
}

.tx-desc {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
}

.tx-right {
    text-align: right;
}

.tx-amount {
    font-size: 13px;
    font-weight: 700;
}

.tx-item.positive .tx-amount {
    color: var(--positive);
}

.tx-item.negative .tx-amount {
    color: var(--negative);
}

.tx-date {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   ITEM MODAL
   ═══════════════════════════════════════════════════════════════════ */

.im-header {
    position: relative;
    margin-bottom: 12px;
}

.im-header.vip {
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%);
    border-radius: var(--radius-lg);
    margin: -20px -20px 16px -20px;
}

.im-icon {
    font-size: 56px;
    display: block;
    text-align: center;
}

.im-vip-badge, .im-active-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: var(--gold);
    color: var(--bg);
    font-size: 10px;
    font-weight: 800;
    border-radius: var(--radius-sm);
}

.im-active-badge {
    background: var(--positive);
    color: white;
}

.im-name {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.im-category {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 12px;
}

.im-desc {
    font-size: 13px;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 16px;
}

.im-stats {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
}

.ims-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
}

.ims-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.ims-label {
    color: var(--text-dim);
}

.ims-value {
    font-weight: 600;
}

.im-price-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.im-price {
    font-size: 24px;
    font-weight: 800;
}

.im-currency {
    font-size: 20px;
}

.im-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.im-btn:active {
    transform: scale(0.98);
}

.im-btn:disabled, .im-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.im-btn.vip {
    background: var(--gradient-gold);
    color: var(--bg);
}

.im-btn.owned {
    background: var(--positive);
}

.im-btn-secondary {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.im-btn-secondary:active {
    transform: scale(0.98);
    background: var(--accent);
    color: var(--bg);
}

.im-passive {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════ */

.shop-empty {
    text-align: center;
    padding: 40px 20px;
}

.se-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.se-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.se-text {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.se-btn {
    padding: 12px 24px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--bg);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.se-btn:active {
    transform: scale(0.95);
}
