@font-face {
    font-family: "ZhiyeUI";
    src: url("/assets/font.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #151719;
    --muted: #71777d;
    --line: #dfe4e8;
    --soft-line: #edf0f2;
    --blue: #eaf5fd;
    --blue-strong: #377da9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #f6f8f9;
    font-family: "ZhiyeUI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }

.site-nav { position: sticky !important; top: 0; }
.catalog-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

.catalog-toolbar {
    position: sticky;
    top: 72px;
    z-index: 88;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--soft-line);
    backdrop-filter: blur(18px);
}

.catalog-toolbar-inner {
    width: min(1240px, calc(100% - 48px));
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 0 auto;
}

.catalog-search {
    min-width: 260px;
    width: min(590px, 55vw);
    height: 44px;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    background: #f5f7f8;
    border: 1px solid #dce1e4;
}

.catalog-search i { justify-self: center; color: #6f787e; font-size: 16px; }
.catalog-search input { width: 100%; height: 100%; padding: 0 12px 0 0; color: var(--ink); background: transparent; border: 0; outline: none; font-size: 12px; }
.catalog-search:focus-within { border-color: #6e9fbd; box-shadow: inset 0 0 0 1px #6e9fbd; }

.catalog-filters { display: flex; align-items: center; gap: 8px; }
.catalog-filter { position: relative; cursor: pointer; }
.catalog-filter input { position: absolute; opacity: 0; pointer-events: none; }
.catalog-filter-ui {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px 0 8px;
    color: #666e73;
    background: #fff;
    border: 1px solid #d9dfe2;
    border-radius: 18px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 10px;
    transition: color .22s ease, border-color .22s ease, background .22s ease, padding .34s cubic-bezier(.22, 1, .36, 1), gap .34s cubic-bezier(.22, 1, .36, 1);
}
.catalog-filter-ui i { width: 21px; height: 21px; display: grid; place-items: center; background: #edf1f3; border-radius: 50%; font-size: 11px; }
.catalog-filter-text { display: inline-block; max-width: 100px; overflow: hidden; opacity: 1; transition: max-width .36s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
.catalog-filter input:checked + .catalog-filter-ui { gap: 0; padding-right: 7px; color: var(--ink); background: #eff8fd; border-color: #6e9fbd; }
.catalog-filter input:checked + .catalog-filter-ui .catalog-filter-text { max-width: 0; opacity: 0; }
.catalog-filter input:focus-visible + .catalog-filter-ui { outline: 2px solid rgba(55, 125, 169, .55); outline-offset: 2px; }

.catalog-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: 80px 0 50px;
}
.catalog-eyebrow { margin: 0 0 12px; color: var(--blue-strong); font-size: 10px; font-weight: 500; }
.catalog-intro h1 { margin: 0; font-size: clamp(42px, 5.4vw, 68px); line-height: 1; font-weight: 400; }
.catalog-intro p:last-child { max-width: 620px; margin: 17px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.square-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 17px;
    color: #fff;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 0;
    font-size: 11px;
    white-space: nowrap;
}

.market-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 16px; padding-bottom: 110px; }
.market-card { min-width: 0; display: flex; flex-direction: column; padding: 12px; background: #fff; border: 1px solid #e1e5e8; transition: transform .2s ease, box-shadow .2s ease; }
.market-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(20, 28, 33, .08); }
.market-card[hidden] { display: none; }
.market-card-image { aspect-ratio: 1.25; overflow: hidden; background: #edf6fb; }
.market-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; filter: saturate(.62) brightness(1.02); }
.market-card-copy { display: flex; flex: 1; flex-direction: column; padding: 17px 4px 4px; }
.market-card-seller { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #7d858a; font-size: 9px; }
.market-card-seller em { color: #9a732d; font-style: normal; }
.market-card h2, .market-card h3 { margin: 12px 0 7px; font-size: 17px; line-height: 1.25; font-weight: 500; }
.market-card p { min-height: 48px; margin: 0; color: #7b8287; font-size: 10px; line-height: 1.6; }
.market-card-price { display: block; margin: 18px 0 13px; font-size: 15px; font-weight: 600; }
.market-card-button { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto; color: #fff; background: var(--ink); border-radius: 0; font-size: 10px; }

.self-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 110px; }
.self-card { position: relative; min-height: 440px; overflow: hidden; background: #eef7fc; border: 1px solid #dfe6ea; }
.self-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; filter: grayscale(.38) saturate(.46); transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.self-card:hover img { transform: scale(1.025); }
.self-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,.8), rgba(255,255,255,0) 48%); }
.self-card-copy { position: relative; z-index: 1; padding: 25px; }
.self-card-copy span { color: var(--blue-strong); font-size: 9px; }
.self-card h2 { margin: 10px 0 8px; font-size: 23px; font-weight: 500; }
.self-card p { max-width: 280px; margin: 0; color: #687178; font-size: 11px; line-height: 1.6; }
.self-card-price { display: block; margin-top: 13px; font-size: 13px; font-weight: 600; }
.self-card-arrow { position: absolute; top: 23px; right: 23px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #aeb8be; border-radius: 50%; font-size: 13px; }

.empty-state { display: none; padding: 70px 0 120px; color: var(--muted); text-align: center; font-size: 12px; }
.empty-state.show { display: block; }

@media (max-width: 980px) {
    .catalog-toolbar-inner { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 0; }
    .catalog-search { width: 100%; }
    .catalog-filters { overflow-x: auto; padding-bottom: 2px; }
    .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .self-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .catalog-shell, .catalog-toolbar-inner { width: calc(100% - 32px); }
    .catalog-toolbar { top: 64px; }
    .catalog-intro { align-items: flex-start; flex-direction: column; padding: 58px 0 38px; }
    .catalog-intro h1 { font-size: 44px; }
    .market-grid, .self-grid { grid-template-columns: 1fr; }
    .self-card { min-height: 410px; }
}
