:root {
    --market-primary: #0b5ea8;
    --market-primary-dark: #084a85;
    --market-accent: #22c3ff;
    --market-bg: #eef3fb;
    --market-panel: #ffffff;
    --market-text: #10253d;
    --market-muted: #637f98;
    --market-line: #d8e2f0;
    --market-success: #10925b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--market-text);
    background:
        radial-gradient(1000px 480px at 6% -8%, rgba(34, 195, 255, 0.2) 0%, rgba(34, 195, 255, 0) 58%),
        radial-gradient(850px 460px at 100% 0%, rgba(11, 94, 168, 0.16) 0%, rgba(11, 94, 168, 0) 55%),
        var(--market-bg);
}

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

.market-shell {
    min-height: 100vh;
}

.market-topbar {
    background: #1c2b3b;
    color: #ffffff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    font-weight: 600;
}

.market-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: linear-gradient(110deg, var(--market-primary) 0%, #2674c1 65%, #3d8ee0 100%);
    box-shadow: 0 9px 24px rgba(8, 43, 80, 0.22);
}

.market-header-container {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.market-brand {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.market-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.market-brand-copy {
    display: flex;
    flex-direction: column;
}

.market-brand-copy strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.market-brand-copy span {
    font-size: 0.76rem;
    opacity: 0.9;
}

.market-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    white-space: nowrap;
}

.market-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.market-active-link {
    background: #ffffff;
    color: var(--market-primary) !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.market-account-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.market-menu-toggle {
    display: none;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
}

.market-mobile-close {
    display: none;
    border: 0;
    background: transparent;
    color: #2f5e87;
    font-size: 1.4rem;
    align-self: flex-end;
    margin-bottom: 4px;
    cursor: pointer;
}

.market-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1100;
    transition: opacity 0.2s ease;
}

.market-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.market-main {
    width: min(1220px, 100%);
    margin: 0 auto;
    padding: 20px 14px 36px;
}

.market-hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
    background: linear-gradient(155deg, #0f64b0 0%, #2d7bc4 62%, #3f97e8 100%);
    border-radius: 18px;
    color: #ffffff;
    padding: 18px;
    box-shadow: 0 20px 34px rgba(8, 46, 86, 0.28);
    margin-bottom: 16px;
}

.market-kicker {
    margin: 0 0 7px;
    letter-spacing: 0.08em;
    font-size: 0.77rem;
    font-weight: 800;
    opacity: 0.9;
}

.market-hero h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 2.15rem);
    line-height: 1.22;
    font-family: "Sora", "Manrope", sans-serif;
}

.market-hero p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.95);
}

.market-cta-btn {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #ffd24d;
    color: #1f2f43;
    font-weight: 800;
    border-radius: 10px;
    padding: 0.67rem 0.98rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(13, 24, 38, 0.22);
}

.market-hero-stats {
    display: grid;
    gap: 10px;
}

.market-stat-card {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 12px 13px;
    backdrop-filter: blur(3px);
}

.market-stat-card strong {
    font-size: 1.2rem;
    line-height: 1.2;
}

.market-stat-label {
    display: block;
    font-size: 0.84rem;
    opacity: 0.95;
    margin-bottom: 4px;
}

.market-filters-card {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
    background: var(--market-panel);
    border: 1px solid var(--market-line);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 22px rgba(13, 35, 59, 0.08);
    margin-bottom: 14px;
}

.market-filter-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market-filter-row label {
    font-size: 0.84rem;
    font-weight: 700;
    color: #3b5673;
}

.market-filter-row input,
.market-filter-row select {
    width: 100%;
    border: 1px solid #c8d5e8;
    border-radius: 10px;
    padding: 0.58rem 0.64rem;
    font-size: 0.9rem;
    background: #ffffff;
    color: #21364e;
}

.market-filter-row input:focus,
.market-filter-row select:focus {
    outline: 2px solid rgba(11, 94, 168, 0.2);
    border-color: var(--market-primary);
}

.market-filter-actions {
    display: flex;
    align-items: flex-end;
}

.market-reset-btn {
    width: 100%;
    border: 1px solid #b5c8dd;
    background: #f6faff;
    color: var(--market-primary-dark);
    font-weight: 800;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
}

.market-reset-btn:hover {
    background: #eaf3ff;
}

.market-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.market-results-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.market-results-head p {
    margin: 0;
    color: #385774;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.market-card {
    background: var(--market-panel);
    border: 1px solid var(--market-line);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(13, 35, 59, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 28px rgba(13, 35, 59, 0.16);
}

.market-card.is-hidden {
    display: none;
}

.market-card-media {
    position: relative;
}

.market-card-media img {
    width: 100%;
    height: 182px;
    object-fit: cover;
    display: block;
}

.market-chip {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(12, 47, 81, 0.85);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
}

.market-card-body {
    padding: 12px;
    display: grid;
    gap: 6px;
}

.market-card-body h3 {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.3;
}

.market-meta {
    margin: 0;
    color: var(--market-muted);
    font-size: 0.84rem;
}

.market-price {
    margin: 2px 0 0;
    font-size: 1.03rem;
    font-weight: 800;
    color: var(--market-success);
}

.market-desc {
    margin: 0;
    color: #34526f;
    font-size: 0.86rem;
    line-height: 1.4;
    min-height: 2.4em;
}

.market-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

.market-btn {
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 800;
    border-radius: 9px;
    padding: 0.52rem 0.65rem;
    font-size: 0.86rem;
}

.market-btn-view {
    background: #edf5ff;
    color: #124f8b;
    border: 1px solid #c2d9f2;
}

.market-btn-call {
    background: #0b5ea8;
    color: #ffffff;
    border: 1px solid #0b5ea8;
}

.market-empty {
    background: #ffffff;
    border: 1px dashed #b8cadf;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    color: #496783;
    margin-top: 12px;
}

.market-empty h3 {
    margin: 0;
}

.market-empty p {
    margin: 8px 0 0;
}

@media (max-width: 1080px) {
    .market-filters-card {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
}

@media (max-width: 920px) {
    .market-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .market-nav {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: min(320px, 86vw);
        background: #ffffff;
        color: #2f4d6d;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        gap: 7px;
        transform: translateX(100%);
        transition: transform 0.2s ease;
        z-index: 1202;
    }

    .market-nav.active {
        transform: translateX(0);
    }

    .market-mobile-close {
        display: inline-flex;
    }

    .market-nav a {
        color: #26527a;
        border-radius: 10px;
        border: 1px solid #d5e0ef;
        padding: 0.62rem 0.7rem;
    }

    .market-nav a:hover {
        background: #f2f7fd;
    }

    .market-active-link {
        background: #0b5ea8 !important;
        color: #ffffff !important;
        border-color: #0b5ea8 !important;
    }

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

@media (max-width: 760px) {
    .market-filters-card {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

@media (max-width: 560px) {
    .market-filters-card {
        grid-template-columns: 1fr;
    }

    .market-results-head {
        align-items: flex-start;
    }
}
