.market-section {
    padding-top: 0.85rem !important;
}

.market-section .catalog-beaver-intro {
    margin-top: 0.35rem;
}

.market-filters {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.market-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.55rem 0.65rem;
    margin-top: 0.15rem;
}

.market-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.market-field__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.market-field .search-input {
    width: 100%;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: #1e293b;
}

.market-filter-actions {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.market-filter-actions .search-btn,
.market-filter-actions .catalog-btn-secondary {
    text-decoration: none;
}

.market-types {
    margin-top: 0.15rem;
}

.market-type {
    font-weight: 700;
    font-size: 0.84rem;
    min-height: 40px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.market-type span {
    opacity: 0.72;
    font-weight: 700;
}

.market-type.is-active {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
}

.market-type.is-active span {
    opacity: 0.9;
}

.market-section .market-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.market-section .market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(49, 46, 129, 0.12);
}

@media (max-width: 640px) {
    .market-fields {
        grid-template-columns: 1fr 1fr;
    }

    .market-filter-actions .search-btn {
        flex: 1;
    }
}

.market-empty,
.market-count,
.market-card__wholesale {
    color: var(--text-secondary);
}

.market-empty {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: var(--bg-secondary);
}

.market-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
}

.market-type {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #fff;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.market-type.is-active {
    background: var(--bg-gradient);
    color: #fff;
    border-color: transparent;
}

.market-section .products-grid {
    align-items: stretch;
}

.market-section .market-card {
    cursor: default;
    height: 100% !important;
}

.market-section .market-card .cat-card__body {
    flex: 1 1 auto;
    height: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.75rem 0.7rem !important;
    gap: 0.55rem;
}

.market-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-height: 1.7rem;
}

.market-card__price {
    flex: none;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
    color: #fff;
    background: linear-gradient(135deg, var(--cat-indigo, #6366f1), var(--cat-indigo-dark, #4f46e5));
}

.market-section .market-card .cat-card__title {
    -webkit-line-clamp: 1;
    min-height: 1.15rem;
}

.market-card__size {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #1e1b4b;
}

.market-card__meta {
    align-content: flex-start;
    height: 4.7rem;
    overflow: hidden;
}

.market-card__wholesale {
    margin: 0;
    font-size: 0.65rem;
}

.market-buy {
    margin-top: auto;
    width: 100%;
    height: 38px;
    padding: 0 0.85rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cat-indigo, #6366f1), var(--cat-indigo-dark, #4f46e5));
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.22);
}

.market-buy:hover {
    filter: brightness(1.05);
}

.market-buy:disabled {
    cursor: wait;
    opacity: 0.72;
    filter: none;
}

.market-count {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.85rem;
}

.pagination a.page-btn {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.catalog-staging .cat-card {
    cursor: default;
}

.market-buy {
    margin-top: 0.75rem;
    width: 100%;
    pointer-events: auto;
}

.market-instruction {
    margin: 1rem 0 0;
    text-align: left;
}

.market-instruction__title {
    margin: 0 0 0.35rem;
    font-weight: 700;
}

.market-instruction__text {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
}

.market-card.is-bought {
    outline: 2px solid #6d5efc;
    outline-offset: 0;
}

.market-card__bought {
    background: #efeaff;
    color: #3b2f8a;
}
