/* =========================================
   CSI EŞSTORE
========================================= */

.market-view {
    display: none;
    min-height: calc(100vh - 80px);
    padding: 125px 35px 80px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255, 208, 0, .08),
            transparent 35%
        ),
        #0b0b0b;
}

.market-view.active {
    display: block;
}

.market-shell {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.market-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.market-kicker {
    display: block;
    margin-bottom: 8px;
    color: #FFD54A;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.market-heading h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
}

.market-heading h1 i {
    margin-right: 10px;
    color: #FFD54A;
}

.market-heading p {
    margin: 14px 0 0;
    color: #999;
    font-size: 15px;
}

.market-user-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.market-coin-box {
    min-width: 175px;
    height: 66px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    gap: 13px;

    background: #151515;
    border: 1px solid rgba(255, 213, 74, .28);
    border-radius: 14px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, .25);
}

.market-coin-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: rgba(255, 213, 74, .12);
    color: #FFD54A;
    font-size: 18px;
}

.market-coin-box small {
    display: block;
    margin-bottom: 3px;

    color: #777;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.market-coin-box strong {
    color: #FFD54A;
    font-size: 18px;
}

.market-orders-btn,
.market-refresh-btn {
    border: 1px solid rgba(255,255,255,.1);
    background: #151515;
    color: #ddd;

    border-radius: 12px;
    cursor: pointer;

    transition: .2s;
}

.market-orders-btn {
    height: 52px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    gap: 9px;

    font-weight: 700;
}

.market-orders-btn:hover,
.market-refresh-btn:hover {
    border-color: rgba(255, 213, 74, .5);
    color: #FFD54A;
}

.market-divider {
    height: 1px;
    margin: 42px 0;

    background:
        linear-gradient(
            90deg,
            rgba(255,213,74,.35),
            rgba(255,255,255,.05),
            transparent
        );
}

.market-section-head {
    margin-bottom: 24px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.market-section-head span {
    color: #FFD54A;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.market-section-head h2 {
    margin: 6px 0 0;
    color: #fff;
    font-size: 26px;
}

.market-refresh-btn {
    width: 44px;
    height: 44px;
}

.market-products {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.market-product-card {
    position: relative;
    overflow: hidden;

    min-height: 390px;

    display: flex;
    flex-direction: column;

    background: #131313;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;

    transition:
        transform .25s,
        border-color .25s,
        box-shadow .25s;
}

.market-product-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(255, 213, 74, .28);

    box-shadow:
        0 20px 50px rgba(0,0,0,.35);
}

.market-product-image {
    height: 185px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle,
            rgba(255,213,74,.11),
            transparent 65%
        ),
        #101010;
}

.market-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 25px;
}

.market-product-placeholder {
    font-size: 62px;
    color: rgba(255,213,74,.7);
}

.market-product-body {
    flex: 1;
    padding: 20px;

    display: flex;
    flex-direction: column;
}

.market-product-body h3 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 20px;
}

.market-product-body p {
    margin: 0 0 18px;

    color: #888;
    font-size: 13px;
    line-height: 1.6;
}

.market-product-bottom {
    margin-top: auto;
}

.market-stock {
    display: block;
    margin-bottom: 11px;

    color: #888;
    font-size: 12px;
}

.market-stock.available {
    color: #78d68b;
}

.market-stock.empty {
    color: #e16d6d;
}

.market-product-buy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.market-price {
    color: #FFD54A;
    font-size: 19px;
    font-weight: 800;
}

.market-buy-btn {
    min-width: 110px;
    height: 42px;

    padding: 0 16px;

    border: 0;
    border-radius: 10px;

    background: #FFD54A;
    color: #111;

    font-weight: 800;
    cursor: pointer;

    transition: .2s;
}

.market-buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.market-buy-btn:disabled {
    background: #292929;
    color: #666;
    cursor: not-allowed;
}

.market-loading,
.market-empty,
.market-error {
    grid-column: 1 / -1;

    min-height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    color: #888;

    border: 1px dashed rgba(255,255,255,.1);
    border-radius: 16px;
}

.market-error {
    color: #e16d6d;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {

    .market-products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {

    .market-view {
        padding:
            105px 18px 60px;
    }

    .market-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .market-user-area {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .market-coin-box {
        width: 100%;
    }

    .market-orders-btn {
        justify-content: center;
    }

    .market-products {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   EŞSTORE - SİPARİŞLERİM
========================================= */

.market-orders-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0,0,0,.82);
    backdrop-filter: blur(7px);
}

.market-orders-modal {
    width: min(760px, 96vw);
    max-height: 86vh;

    overflow: hidden;

    background: #121212;

    border:
        1px solid
        rgba(255,213,74,.22);

    border-radius: 18px;

    box-shadow:
        0 30px 90px
        rgba(0,0,0,.65);
}

.market-orders-header {
    padding: 22px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255,255,255,.07);
}

.market-orders-header small {
    color: #FFD54A;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.market-orders-header h2 {
    margin: 4px 0 0;

    color: #fff;
    font-size: 24px;
}

.market-orders-close {
    width: 40px;
    height: 40px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 10px;

    background: #1b1b1b;
    color: #fff;

    cursor: pointer;
}

.market-orders-close:hover {
    color: #FFD54A;

    border-color:
        rgba(255,213,74,.4);
}

.market-orders-list {
    max-height:
        calc(86vh - 86px);

    overflow-y: auto;

    padding: 18px;
}

.market-order-row {
    padding: 17px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;

    background: #181818;

    border:
        1px solid
        rgba(255,255,255,.06);

    border-radius: 12px;

    margin-bottom: 12px;
}

.market-order-row strong {
    display: block;

    color: #fff;

    font-size: 15px;
}

.market-order-row small {
    display: block;

    margin-top: 5px;

    color: #777;

    font-size: 11px;
}

.market-order-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.market-order-price {
    color: #FFD54A;
    font-weight: 800;
}

.market-order-status {
    padding: 7px 10px;

    border-radius: 8px;

    font-size: 11px;
    font-weight: 800;
}

.market-order-status.pending {
    color: #f2c94c;
    background:
        rgba(242,201,76,.1);
}

.market-order-status.completed {
    color: #79d692;
    background:
        rgba(121,214,146,.1);
}

.market-order-status.cancelled {
    color: #eb7474;
    background:
        rgba(235,116,116,.1);
}

.market-orders-empty {
    padding: 50px 20px;

    text-align: center;

    color: #777;
}

@media (max-width:650px) {

    .market-order-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-order-right {
        width: 100%;

        justify-content:
            space-between;
    }
}


/* =========================================
   EŞSTORE - SİPARİŞLERİM
========================================= */

.market-orders-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0,0,0,.82);
    backdrop-filter: blur(7px);
}

.market-orders-modal {
    width: min(760px, 96vw);
    max-height: 86vh;

    overflow: hidden;

    background: #121212;

    border:
        1px solid
        rgba(255,213,74,.22);

    border-radius: 18px;

    box-shadow:
        0 30px 90px
        rgba(0,0,0,.65);
}

.market-orders-header {
    padding: 22px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid
        rgba(255,255,255,.07);
}

.market-orders-header small {
    color: #FFD54A;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.market-orders-header h2 {
    margin: 4px 0 0;

    color: #fff;
    font-size: 24px;
}

.market-orders-close {
    width: 40px;
    height: 40px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 10px;

    background: #1b1b1b;
    color: #fff;

    cursor: pointer;
}

.market-orders-close:hover {
    color: #FFD54A;

    border-color:
        rgba(255,213,74,.4);
}

.market-orders-list {
    max-height:
        calc(86vh - 86px);

    overflow-y: auto;

    padding: 18px;
}

.market-order-row {
    padding: 17px 18px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;

    background: #181818;

    border:
        1px solid
        rgba(255,255,255,.06);

    border-radius: 12px;

    margin-bottom: 12px;
}

.market-order-row strong {
    display: block;

    color: #fff;

    font-size: 15px;
}

.market-order-row small {
    display: block;

    margin-top: 5px;

    color: #777;

    font-size: 11px;
}

.market-order-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.market-order-price {
    color: #FFD54A;
    font-weight: 800;
}

.market-order-status {
    padding: 7px 10px;

    border-radius: 8px;

    font-size: 11px;
    font-weight: 800;
}

.market-order-status.pending {
    color: #f2c94c;
    background:
        rgba(242,201,76,.1);
}

.market-order-status.completed {
    color: #79d692;
    background:
        rgba(121,214,146,.1);
}

.market-order-status.cancelled {
    color: #eb7474;
    background:
        rgba(235,116,116,.1);
}

.market-orders-empty {
    padding: 50px 20px;

    text-align: center;

    color: #777;
}

@media (max-width:650px) {

    .market-order-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-order-right {
        width: 100%;

        justify-content:
            space-between;
    }
}


/* =========================================
   EŞSTORE - SATIN ALMA ONAY MODALI
========================================= */

body.market-purchase-open {
    overflow: hidden;
}

.market-purchase-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483500;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;

    background:
        rgba(0, 0, 0, .86);

    backdrop-filter:
        blur(9px);
}

.market-purchase-modal {
    position: relative;

    width: min(760px, 96vw);
    max-height: 92vh;

    overflow-y: auto;

    padding: 32px;

    border:
        1px solid
        rgba(255, 204, 0, .48);

    border-radius: 22px;

    background:
        radial-gradient(
            circle at 18% 0%,
            rgba(255, 213, 74, .08),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #17191d,
            #0e0f12
        );

    box-shadow:
        0 40px 120px
        rgba(0, 0, 0, .8);

    animation:
        marketPurchaseIn
        .22s ease;
}

@keyframes marketPurchaseIn {

    from {
        opacity: 0;
        transform:
            translateY(14px)
            scale(.975);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}


.market-purchase-close {
    position: absolute;

    top: 20px;
    right: 20px;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border:
        1px solid
        rgba(255,255,255,.09);

    border-radius: 11px;

    background:
        rgba(255,255,255,.035);

    color: #aaa;

    font-size: 20px;

    cursor: pointer;

    transition: .2s;
}

.market-purchase-close:hover {
    color: #FFD54A;

    border-color:
        rgba(255,213,74,.35);

    background:
        rgba(255,213,74,.07);
}


.market-purchase-title-row {
    padding-right: 45px;

    display: flex;
    align-items: center;
    gap: 20px;
}

.market-purchase-main-icon {
    width: 74px;
    height: 74px;

    flex: 0 0 74px;

    display: grid;
    place-items: center;

    border:
        1px solid
        rgba(255,213,74,.5);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,213,74,.18),
            rgba(255,213,74,.035)
        );

    color: #FFD54A;

    font-size: 29px;

    box-shadow:
        0 0 35px
        rgba(255,213,74,.08);
}

.market-purchase-kicker {
    color: #FFD54A;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;
}

.market-purchase-title-row h2 {
    margin:
        4px 0 6px;

    color: #fff;

    font-size: 30px;
}

.market-purchase-title-row p {
    margin: 0;

    color: #9a9a9a;

    font-size: 14px;
}


.market-purchase-product {
    margin-top: 26px;

    padding: 20px;

    display: flex;
    align-items: center;
    gap: 18px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 15px;

    background:
        rgba(0,0,0,.18);
}

.market-purchase-product-icon {
    width: 84px;
    height: 84px;

    flex: 0 0 84px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        radial-gradient(
            circle,
            rgba(255,213,74,.17),
            rgba(255,213,74,.035)
        );

    color: #FFD54A;

    font-size: 36px;
}

.market-purchase-product-info {
    flex: 1;
    min-width: 0;
}

.market-purchase-product-info h3 {
    margin:
        0
        0
        7px;

    color: #fff;

    font-size: 20px;
}

.market-purchase-product-info p {
    margin: 0;

    color: #8e8e8e;

    line-height: 1.55;

    font-size: 13px;
}

.market-purchase-product-price {
    flex-shrink: 0;

    padding:
        12px
        14px;

    border:
        1px solid
        rgba(255,255,255,.12);

    border-radius: 10px;

    color: #FFD54A;

    font-size: 15px;
    font-weight: 900;
}


.market-purchase-summary {
    margin-top: 18px;

    padding:
        7px
        22px;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 15px;

    background:
        rgba(255,255,255,.025);
}

.market-purchase-summary-row {
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-bottom:
        1px solid
        rgba(255,255,255,.055);
}

.market-purchase-summary-row:last-child {
    border-bottom: none;
}

.market-purchase-summary-row > span {
    color: #bbb;

    font-size: 14px;
}

.market-purchase-summary-row > span i {
    width: 27px;

    color: #9d7cff;
}

.market-purchase-summary-row strong {
    color: #FFD54A;

    font-size: 15px;
}

.market-purchase-summary-row strong i {
    margin-right: 6px;
}

.market-purchase-remaining > span {
    color: #FFD54A;
    font-weight: 800;
}

.market-purchase-remaining strong.enough {
    color: #63cf78;
}

.market-purchase-remaining strong.insufficient {
    color: #ff6262;
}


.market-purchase-notice {
    margin-top: 18px;

    padding: 17px 18px;

    display: flex;
    align-items: center;
    gap: 14px;

    border:
        1px solid
        rgba(255,213,74,.27);

    border-radius: 13px;

    background:
        linear-gradient(
            90deg,
            rgba(255,213,74,.07),
            rgba(255,213,74,.025)
        );
}

.market-purchase-notice > i {
    color: #FFD54A;

    font-size: 24px;
}

.market-purchase-notice strong {
    display: block;

    margin-bottom: 3px;

    color: #ddd;

    font-size: 13px;
}

.market-purchase-notice p {
    margin: 0;

    color: #999;

    font-size: 12px;

    line-height: 1.5;
}


.market-purchase-actions {
    margin-top: 22px;

    display: grid;

    grid-template-columns:
        1fr
        1.75fr;

    gap: 13px;
}

.market-purchase-cancel,
.market-purchase-confirm {
    min-height: 58px;

    border-radius: 12px;

    font-size: 15px;
    font-weight: 900;

    cursor: pointer;

    transition: .2s;
}

.market-purchase-cancel {
    border:
        1px solid
        rgba(255,255,255,.11);

    background: #16171a;

    color: #aaa;
}

.market-purchase-cancel:hover {
    border-color:
        rgba(255,255,255,.23);

    color: #fff;
}

.market-purchase-cancel i {
    margin-right: 7px;
}


.market-purchase-confirm {
    padding:
        0
        21px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 0;

    background:
        linear-gradient(
            135deg,
            #e8b900,
            #FFD54A
        );

    color: #111;

    box-shadow:
        0 10px 30px
        rgba(255,213,74,.12);
}

.market-purchase-confirm:hover:not(:disabled) {
    transform:
        translateY(-2px);

    filter:
        brightness(1.06);
}

.market-purchase-confirm span i {
    margin-right: 8px;
}

.market-purchase-confirm strong {
    font-size: 14px;
}

.market-purchase-confirm strong i {
    margin-right: 5px;
}

.market-purchase-confirm:disabled {
    cursor: not-allowed;

    background: #292929;
    color: #777;

    box-shadow: none;
}


@media (max-width: 650px) {

    .market-purchase-overlay {
        padding: 10px;
    }

    .market-purchase-modal {
        width: 100%;

        padding:
            25px
            17px;
    }

    .market-purchase-title-row {
        align-items: flex-start;

        padding-right: 35px;
    }

    .market-purchase-main-icon {
        width: 56px;
        height: 56px;

        flex-basis: 56px;

        font-size: 22px;
    }

    .market-purchase-title-row h2 {
        font-size: 23px;
    }

    .market-purchase-product {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .market-purchase-product-icon {
        width: 62px;
        height: 62px;

        flex-basis: 62px;

        font-size: 27px;
    }

    .market-purchase-product-price {
        width: 100%;

        text-align: center;
    }

    .market-purchase-summary {
        padding:
            6px
            15px;
    }

    .market-purchase-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   MARKET AÇIKKEN ANA SAYFA İÇERİKLERİNİ
   KESİN OLARAK GİZLE
========================================= */

body.market-page-active #hero,
body.market-page-active #duyurular,
body.market-page-active #kurucular,
body.market-page-active #hakkimizda,
body.market-page-active #panel {
    display: none !important;
}


/* Market görünümü her durumda açık kalsın */

body.market-page-active #marketView {
    display: block !important;
}
