.zty-market,
.zty-market-details {
    --zty-ink: #152441;
    --zty-muted: #51617b;
    --zty-panel: #fff;
    --zty-border: #dce4f2;
    --zty-soft: #f1f5ff;
    --zty-accent: #1748c8;
    --zty-button: #194cd3;
    color: var(--zty-ink);
}

.zty-market.wrapper {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(16px, 4vw, 48px) 0 clamp(40px, 7vw, 88px);
}

.zty-market .zty-market-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, 25%);
    align-items: center;
    gap: clamp(8px, 3vw, 42px);
    overflow: hidden;
    min-height: 202px;
    padding: clamp(22px, 6vw, 72px);
    border: 1px solid #d5e1fb;
    border-radius: 24px;
    background: linear-gradient(112deg, #f7f9ff 17%, #e6eeff 64%, #ceddff);
    color: #152441;
}

.zty-market-hero::after {
    position: absolute;
    z-index: -1;
    right: -54px;
    width: min(50vw, 490px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 28px, #2257d51e 29px 30px);
    content: "";
    pointer-events: none;
}

.zty-market-hero h1 {
    margin: 0 0 12px;
    color: inherit;
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.14;
    overflow-wrap: anywhere;
}

.zty-market-hero p {
    margin: 0;
    color: #455678;
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.6;
}

.zty-market-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 212px;
    margin: auto;
    filter: drop-shadow(0 18px 20px #1748c835);
}

.zty-market-catalog { margin-top: 24px; }

.zty-market-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px 20px;
    margin: 0 0 24px;
    padding: 12px;
    border: 1px solid var(--zty-border);
    border-radius: 16px;
    background: var(--zty-panel);
}

.zty-market-tabs { display: flex; flex-wrap: wrap; gap: 4px; }

.zty-market-tabs a,
.zty-market-search input,
.zty-market-search select,
.zty-market-search button,
.zty-market-pages a {
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
}

.zty-market-tabs a,
.zty-market-pages a {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    color: var(--zty-ink);
    text-decoration: none;
    font-weight: 650;
}

.zty-market-tabs a:hover,
.zty-market-tabs a[aria-current],
.zty-market-pages a:hover {
    background: var(--zty-soft);
    color: var(--zty-accent);
}

.zty-market-search {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto auto;
    flex: 0 1 390px;
    gap: 6px;
}

.zty-market-search input,
.zty-market-search select {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid var(--zty-border);
    background: var(--zty-panel);
    color: var(--zty-ink);
}

.zty-market-search input::placeholder { color: var(--zty-muted); opacity: 1; }

.zty-market-search button {
    margin: 0;
    padding: 7px 14px;
    border: 1px solid transparent;
    background: var(--zty-button);
    color: #fff;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.zty-market .zty-market-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 24px);
    padding: 0;
    margin: 0;
    list-style: none;
}

.zty-market-grid > li { display: block; min-width: 0; }

.zty-market .zty-market-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--zty-border);
    border-radius: 16px;
    background: var(--zty-panel);
    color: var(--zty-ink);
    text-decoration: none;
}

.zty-market .zty-market-card:hover {
    border-color: var(--zty-accent);
    box-shadow: 0 8px 22px #17366b14;
}

.zty-market-cover {
    --zty-cover: #e0eaff;
    --zty-cover-ink: #5c7ad4;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 80% 10%, #ffffffc9, transparent 55%), var(--zty-cover);
}

.zty-cover-plugin { --zty-cover: #d5f0e9; --zty-cover-ink: #297e79; }
.zty-cover-template { --zty-cover: #ece2fa; --zty-cover-ink: #8163b1; }

.zty-market-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zty-market-cover-shape {
    width: 38%;
    aspect-ratio: 3 / 2;
    border: 2px solid var(--zty-cover-ink);
    border-top-width: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, #fff 37%, transparent 37% 43%, #ffffffb9 43%);
    box-shadow: 8px 8px 0 var(--zty-cover-ink);
    transform: rotate(-7deg);
}

.zty-market-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: start;
    gap: 10px;
    padding: clamp(14px, 2vw, 22px);
}

.zty-market-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--zty-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.zty-market-card-meta span:first-child {
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--zty-soft);
    color: var(--zty-accent);
    font-weight: 650;
}

.zty-market-card-body h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.4;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.zty-market-card-body p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--zty-muted);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.zty-market-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-self: stretch;
    margin-top: auto;
    padding-top: 8px;
    color: var(--zty-accent);
    font-size: 14px;
    font-weight: 650;
}

.zty-market-empty {
    padding: 48px 18px;
    border: 1px dashed var(--zty-border);
    border-radius: 16px;
    background: var(--zty-panel);
    text-align: center;
}

.zty-market-empty h2 { margin: 0 0 10px; font-size: 18px; color: inherit; }
.zty-market-empty a { color: var(--zty-accent); text-decoration: underline; }

.zty-market-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
    color: var(--zty-muted);
}

.zty-market-pages a { border: 1px solid var(--zty-border); background: var(--zty-panel); }

.zty-market :focus-visible,
.zty-market-details :focus-visible { outline: 2px solid var(--zty-accent); outline-offset: 2px; }

.entry-content .zty-market-details {
    margin: 0 0 24px;
    padding: clamp(14px, 2vw, 22px);
    border: 1px solid var(--zty-border);
    border-radius: 12px;
    background: var(--zty-soft);
    overflow-wrap: anywhere;
}

.zty-market-details dl { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 0; }
.zty-market-details dl > div { min-width: 82px; }
.zty-market-details dt { color: var(--zty-muted); font-size: 13px; }
.zty-market-details dd { margin: 0; font-size: 15px; font-weight: 650; }
.entry-content .zty-market-demo { display: inline-block; margin-top: 12px; color: var(--zty-accent); font-weight: 650; }
.zty-market-details details { margin-top: 12px; border-top: 1px solid var(--zty-border); padding-top: 10px; }
.zty-market-details summary { cursor: pointer; font-weight: 650; }
.zty-market-changes { padding-top: 8px; white-space: pre-wrap; }

@media (max-width: 900px) {
    .zty-market .zty-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .zty-market-search { flex: 1 0 100%; }
    .zty-market .zty-market-hero { min-height: 155px; border-radius: 16px; }
}

@media (max-width: 480px) {
    .zty-market .zty-market-grid { grid-template-columns: minmax(0, 1fr); }
    .zty-market-hero h1 { font-size: 30px; }
    .zty-market-tabs a { padding-inline: 10px; }
}
