/* ═══════════════════════════════════════════════════════════════
   SHOP.CSS  –  Worldwidegangster Premium Shop Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── KEYFRAMES ── */

@keyframes rarity-pulse {
    0%, 100% { box-shadow: 0 0 10px var(--rarity-color, #888), 0 0 20px var(--rarity-color, #888)22; }
    50%       { box-shadow: 0 0 20px var(--rarity-color, #888), 0 0 40px var(--rarity-color, #888)44; }
}

@keyframes legendary-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes card-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-3px); }
}

@keyframes inspect-overlay-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.93) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ════════════════════════════════════════════════════════
   SHOP HERO HEADER
   ════════════════════════════════════════════════════════ */

.shop-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #30363d;
}

.shop-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, #0a0f0a 0%, #0d1f10 40%, #111a0e 70%, #0a100a 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2356d364' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.shop-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    gap: 16px;
}

.shop-hero-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-hero-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 12px #56d36488);
    line-height: 1;
}

.shop-hero-name {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #56d364;
    text-shadow: 0 0 20px #56d36466;
    line-height: 1.1;
}

.shop-hero-sub {
    font-size: 0.75rem;
    color: #484f58;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
}

.shop-hero-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shop-balance-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #161b22;
    border: 1px solid #2ea04388;
    border-radius: 20px;
    padding: 6px 14px;
}

.shop-balance-chip--diamond {
    border-color: #388bfd88;
}

.shop-balance-icon { font-size: 1rem; }

.shop-balance-val {
    font-size: 0.9rem;
    font-weight: 700;
    color: #56d364;
}

.shop-balance-chip--diamond .shop-balance-val {
    color: #79c0ff;
}

.shop-cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1f2d1f;
    border: 1px solid #2ea043;
    border-radius: 10px;
    color: #56d364;
    font-size: 1.2rem;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-cart-btn:hover {
    background: #2ea04322;
    box-shadow: 0 0 12px #56d36433;
}

.shop-cart-label {
    font-size: 0.8rem;
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════
   SHOP ITEM CARD  (sic-)
   ════════════════════════════════════════════════════════ */

.sic-card {
    background: #0d1117;
    border-radius: 14px;
    border: 2px solid var(--rarity-color, #30363d);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
    position: relative;
}

.sic-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 32px var(--rarity-color, #30363d)44;
}

.sic-card--legendary {
    animation: rarity-pulse 2.8s ease-in-out infinite;
}

.sic-card--epic:hover    { box-shadow: 0 8px 32px #a371f766; }
.sic-card--rare:hover    { box-shadow: 0 8px 32px #388bfd55; }

/* ── IMAGE AREA ── */

.sic-image-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    background: #0a0e14;
    overflow: hidden;
    flex-shrink: 0;
}

.sic-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.3s;
}

.sic-card:hover .sic-image {
    transform: scale(1.07);
}

.sic-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.sic-rarity-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    opacity: 0.6;
}

.sic-card:hover .sic-rarity-glow {
    opacity: 1;
}

.sic-rarity-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 2;
}

.sic-cart-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #f0883e;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 8px #f0883e88;
}

.sic-inspect-overlay {
    position: absolute;
    inset: 0;
    background: #00000088;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    backdrop-filter: blur(2px);
}

.sic-card:hover .sic-inspect-overlay {
    opacity: 1;
    animation: inspect-overlay-fade 0.2s ease;
}

/* ── BODY ── */

.sic-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
}

.sic-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e6edf3;
    margin-bottom: 8px;
    line-height: 1.3;
}

.sic-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    flex: 1;
}

.sic-stat {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.03em;
}

.sic-stat--attack  { background: #f8514922; color: #f85149; }
.sic-stat--def     { background: #388bfd22; color: #58a6ff; }
.sic-stat--speed   { background: #58a6ff22; color: #79c0ff; }
.sic-stat--stealth { background: #a371f722; color: #c9a8ff; }
.sic-stat--money   { background: #56d36422; color: #56d364; }
.sic-stat--respect { background: #f0883e22; color: #f0883e; }

.sic-price-row {
    margin-bottom: 10px;
}

.sic-price {
    font-size: 1rem;
    font-weight: 900;
    color: #56d364;
}

.sic-price--cant {
    color: #f85149;
}

/* ── ACTION BUTTONS ── */

.sic-actions {
    display: flex;
    gap: 6px;
}

.sic-btn-buy {
    flex: 1;
    padding: 7px 0;
    background: linear-gradient(135deg, #1a3a20, #0f2a16);
    border: 1px solid #2ea043;
    border-radius: 8px;
    color: #56d364;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sic-btn-buy:hover:not(.sic-btn--disabled) {
    background: linear-gradient(135deg, #2ea04333, #1a4a23);
    box-shadow: 0 0 10px #56d36444;
}

.sic-btn-cart {
    width: 38px;
    height: 34px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #8b949e;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sic-btn-cart:hover:not(.sic-btn--disabled) {
    border-color: #f0883e;
    color: #f0883e;
    background: #f0883e11;
}

.sic-btn-cart--active {
    border-color: #f0883e !important;
    color: #f0883e !important;
    background: #f0883e22 !important;
}

.sic-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ════════════════════════════════════════════════════════
   ITEM INSPECT MODAL  (iim-)
   ════════════════════════════════════════════════════════ */

.iim-backdrop {
    position: fixed;
    inset: 0;
    background: #000000cc;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(6px);
    animation: backdrop-in 0.2s ease;
}

.iim-panel {
    position: relative;
    background: #0d1117;
    border: 2px solid var(--rarity-color, #30363d);
    border-radius: 20px;
    display: flex;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow:
        0 0 0 1px var(--rarity-color, #30363d)33,
        0 0 60px var(--rarity-color, #30363d)33,
        0 24px 80px #00000088;
    animation: modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.iim-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #8b949e;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.iim-close:hover {
    background: #f8514922;
    border-color: #f85149;
    color: #f85149;
}

/* ── LEFT IMAGE SIDE ── */

.iim-image-side {
    width: 300px;
    min-width: 260px;
    background: #090d12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px 24px;
    position: relative;
    border-right: 1px solid #21262d;
    gap: 14px;
    flex-shrink: 0;
}

.iim-img-wrap {
    position: relative;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
}

.iim-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 24px var(--rarity-color, #888)55);
    transition: filter 0.3s;
}

.iim-img:hover {
    filter: drop-shadow(0 0 40px var(--rarity-color, #888)88);
}

.iim-img-glow {
    position: absolute;
    inset: -20px;
    pointer-events: none;
    z-index: 0;
}

.iim-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
}

.iim-rarity-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.iim-category-chip {
    font-size: 10px;
    font-weight: 700;
    color: #484f58;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── RIGHT DETAIL SIDE ── */

.iim-detail-side {
    flex: 1;
    padding: 32px 28px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.iim-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
    line-height: 1.2;
}

.iim-desc {
    font-size: 0.85rem;
    color: #8b949e;
    margin: 0 0 20px;
    line-height: 1.6;
    font-style: italic;
}

/* ── STATS GRID ── */

.iim-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.iim-stat-block {
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: border-color 0.2s;
}

.iim-stat-block:hover {
    border-color: #30363d;
}

.iim-stat-icon { font-size: 1.1rem; line-height: 1; }

.iim-stat-val {
    font-size: 1.1rem;
    font-weight: 900;
}

.iim-stat-label {
    font-size: 9px;
    color: #484f58;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.iim-divider {
    height: 1px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ── PRICE + ACTIONS ── */

.iim-price-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    flex-wrap: wrap;
}

.iim-price-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.iim-price-label {
    font-size: 10px;
    color: #484f58;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.iim-price-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: #56d364;
    line-height: 1;
}

.iim-cant-afford {
    color: #f85149;
}

.iim-sell-val {
    font-size: 11px;
    color: #484f58;
}

.iim-action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.iim-btn-buy {
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid var(--rarity-color, #2ea043);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 130px;
    justify-content: center;
}

.iim-btn-buy:hover:not(.iim-btn--disabled) {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--rarity-color, #2ea043)66 !important;
}

.iim-btn-cart {
    padding: 12px 20px;
    border-radius: 10px;
    background: #161b22;
    border: 1px solid #30363d;
    color: #8b949e;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iim-btn-cart:hover:not(.iim-btn--disabled) {
    border-color: #f0883e;
    color: #f0883e;
    background: #f0883e11;
}

.iim-btn-cart--active {
    border-color: #f0883e !important;
    color: #f0883e !important;
    background: #f0883e22 !important;
}

.iim-btn--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── RESPONSIVE ── */

@media (max-width: 640px) {
    .shop-hero-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 20px;
    }

    .shop-hero-right {
        width: 100%;
        justify-content: flex-start;
    }

    .shop-hero-name {
        font-size: 1.4rem;
    }

    .iim-panel {
        flex-direction: column;
        max-height: 95vh;
    }

    .iim-image-side {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #21262d;
        padding: 20px;
        flex-direction: row;
        gap: 16px;
        justify-content: flex-start;
        align-items: center;
    }

    .iim-img-wrap {
        width: 100px;
        height: 100px;
    }

    .iim-detail-side {
        padding: 20px;
    }

    .iim-title {
        font-size: 1.2rem;
    }
}

/* ── MOBIL (< 600px): två kort per rad, kompaktare kort ── */
@media (max-width: 599.98px) {
    .sic-image-wrap { height: 120px; }
    .sic-body { padding: 8px 10px 10px; }
    .sic-name { font-size: 0.85rem; }
    .sic-stats { align-items: flex-start; align-content: flex-start; margin-bottom: 6px; }
    .sic-stat { font-size: 9.5px; padding: 2px 5px; }
    .sic-price { font-size: 0.9rem; }
    .sic-actions { gap: 6px; }
    .sic-btn-buy { min-height: 40px; font-size: 0.78rem; }
    .sic-btn-cart { width: 40px; height: 40px; flex-shrink: 0; }
}
