@font-face {
    font-family: Farsi_Vazir_Normal;
    src: url("../../media/font/Vazir.ttf");
}

:root {
    --bg: #111111;
    --surface: #1b1b1b;
    --surface-2: #252525;
    --line: #303030;
    --text: #ffffff;
    --muted: #888888;
    --accent: #8BAE66;
    --accent-2: #9fc477;
    --gold: #e8c766;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Farsi_Vazir_Normal, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.store-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* soft green glow behind the hero */
.store-page::before {
    content: "";
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    max-width: 100%;
    background: radial-gradient(closest-side, rgba(139, 174, 102, .18), transparent);
    pointer-events: none;
    z-index: 0;
}


/* =========================
   Navbar
========================= */

.store-navbar {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 1300px;
    height: 68px;
    padding: 0 12px 0 14px;
    border-radius: 100px;
    background: rgba(27, 27, 27, .78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 1000;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.store-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.store-logo span {
    font-size: 20px;
    font-weight: bold;
}

.nav-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.nav-search i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}

.nav-search input {
    width: 100%;
    height: 44px;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: #fff;
    padding: 0 42px 0 16px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: .2s;
}

.nav-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 174, 102, .15);
}

.btn-header {
    min-width: 110px;
    height: 44px;
    padding: 0 22px;
    border-radius: 100px;
    border: none;
    background: var(--accent);
    color: #111;
    font-family: inherit;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: .2s;
}

.btn-header:hover {
    background: var(--accent-2);
    transform: translateY(-1px);
}


/* =========================
   Hero
========================= */

.store-hero {
    position: relative;
    z-index: 1;
    width: 94%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 130px 0 40px;
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 40px;
    align-items: center;
    animation: heroIn .7s ease both;
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.hero-text h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.35;
    margin: 0 0 18px;
    font-weight: bold;
}

.hero-text p {
    color: var(--muted);
    font-size: 15px;
    line-height: 2;
    max-width: 420px;
    margin: 0 0 22px;
}

.hero-count {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);
    color: var(--accent);
    font-size: 13px;
    min-height: 34px;
}

.hero-count:empty {
    visibility: hidden;
}

/* featured game */
.hero-feature {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 380px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    background-color: var(--surface);
    background-size: cover;
    background-position: center;
    transition: transform .4s ease, border-color .3s;
    isolation: isolate;
}

.hero-feature:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.hero-feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, .96) 8%, rgba(17, 17, 17, .35) 55%, rgba(17, 17, 17, .05));
    z-index: -1;
}

.feature-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--accent);
    color: #111;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 14px;
    border-radius: 100px;
}

.feature-body {
    padding: 28px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.feature-info h2 {
    font-size: 30px;
    margin: 0 0 8px;
}

.feature-info p {
    margin: 0;
    color: #bbb;
    font-size: 13px;
    line-height: 1.9;
    max-width: 420px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-side {
    flex-shrink: 0;
    text-align: center;
}

.feature-side .game-price-inline {
    display: block;
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 15px;
}

.feature-side .game-buy-btn,
.feature-side .game-owned {
    width: auto;
    padding: 11px 22px;
    white-space: nowrap;
}


/* =========================
   Container / Toolbar
========================= */

.store-container {
    position: relative;
    z-index: 1;
    width: 94%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 0 70px;
    flex: 1;
}

.store-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.store-toolbar h2 {
    margin: 0;
    font-size: 24px;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    border: 1px solid var(--line);
    background: var(--surface);
    color: #aaa;
    padding: 8px 18px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.chip:hover {
    background: #292929;
    color: #fff;
}

.chip.active {
    background: #333;
    color: var(--accent);
    border-color: var(--accent);
}


/* =========================
   Game Card
========================= */

.game-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, border-color .3s, box-shadow .3s;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 18px 40px -18px rgba(139, 174, 102, .35);
}

.game-media {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
}

.game-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.game-card:hover .game-banner {
    transform: scale(1.07);
}

.game-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    background: linear-gradient(to top, var(--surface), transparent);
    pointer-events: none;
}

.game-price {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(17, 17, 17, .85);
    backdrop-filter: blur(6px);
    color: var(--gold);
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 13px;
    font-weight: bold;
    padding: 6px 14px;
}

.game-price.free {
    color: var(--accent);
}

.game-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.game-name {
    font-size: 19px;
    font-weight: bold;
    margin: 0 0 10px;
}

.game-desk {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    margin: 0 0 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.game-buy-btn {
    width: 100%;
    background: var(--accent);
    color: #111;
    border: none;
    padding: 11px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;
}

.game-buy-btn i {
    margin-left: 7px;
}

.game-buy-btn:hover {
    background: var(--accent-2);
}

.game-buy-btn:disabled {
    opacity: .6;
    cursor: wait;
}

.game-owned {
    width: 100%;
    display: block;
    text-align: center;
    color: var(--accent);
    background: rgba(139, 174, 102, .12);
    border: 1px solid rgba(139, 174, 102, .35);
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
}

.game-owned i {
    margin-left: 6px;
}


/* =========================
   Loading / Empty
========================= */

.store-loading {
    text-align: center;
    padding: 80px 0;
    color: var(--muted);
}

.store-loading .spinner-border {
    color: var(--accent);
    margin-bottom: 15px;
}

.store-empty {
    text-align: center;
    padding: 90px 0;
    color: #777;
}

.store-empty i {
    font-size: 56px;
    margin-bottom: 18px;
    color: #444;
}

.store-empty h3 {
    font-size: 19px;
    color: #aaa;
}


/* =========================
   Footer
========================= */

.store-footer {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border-top: 1px solid var(--line);
    margin-top: 20px;
}

.footer-inner {
    width: 94%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 48px 0 32px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
}

.footer-brand p {
    color: var(--muted);
    font-size: 13px;
    line-height: 2;
    margin: 16px 0 0;
    max-width: 380px;
}

.footer-col h4 {
    font-size: 15px;
    margin: 0 0 16px;
}

.footer-col a {
    display: block;
    color: #999;
    font-size: 13px;
    padding: 6px 0;
    transition: .2s;
}

.footer-col a:hover {
    color: var(--accent);
    padding-right: 6px;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 18px 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #777;
    font-size: 12px;
}

.to-top {
    color: #aaa;
    transition: .2s;
}

.to-top:hover {
    color: var(--accent);
}


/* =========================
   Responsive
========================= */

@media (max-width: 992px) {

    .store-hero {
        grid-template-columns: 1fr;
        padding-top: 120px;
    }

    .hero-text p {
        max-width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {

    .store-navbar {
        padding: 0 8px 0 10px;
        gap: 8px;
    }

    .store-logo span {
        display: none;
    }

    .btn-header {
        min-width: 0;
        padding: 0 16px;
    }

    .hero-feature {
        min-height: 320px;
    }

    .feature-body {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .feature-side {
        text-align: right;
    }

    .feature-side .game-buy-btn,
    .feature-side .game-owned {
        width: 100%;
    }

    .feature-info h2 {
        font-size: 24px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

.box-enamad {
    width: 90%;
    margin: 5%;
    border-radius: 10px;
    background-color: #fff;
    height: fit-content;
    text-align: center;
}