.market-page {
    background: #f6f8f4;
    color: #1d2f21;
}

.market-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(10, 18, 10, 0.88) 0%, rgba(16, 29, 15, 0.72) 40%, rgba(20, 16, 10, 0.4) 100%),
        linear-gradient(180deg, rgba(6, 12, 6, 0.08) 0%, rgba(6, 12, 6, 0.28) 100%),
        url('/assets/img/pijaca.jpg');
    background-position: center, center, 58% center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-size: cover, cover, cover;
}

.market-hero--list {
    padding: 42px 0 28px;
}

.market-hero--detail {
    padding: 34px 0 24px;
}

.market-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    align-items: end;
}

.market-hero__inner--list {
    grid-template-columns: minmax(0, 1.35fr) 320px;
}

.market-hero__inner--detail {
    grid-template-columns: minmax(0, 1.45fr) 300px;
}

.market-hero__eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.market-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2.15rem, 4vw, 3.25rem);
    line-height: 1.05;
}

.market-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.65;
}

.market-breadcrumbs,
.market-last-update {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 14px;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.86rem;
    line-height: 1.45;
}

.market-breadcrumbs {
    margin-bottom: 16px;
}

.market-last-update {
    margin-top: 16px;
}

.market-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.market-hero-stat,
.market-hero__update,
.market-summary-card,
.market-card,
.market-filter-row,
.market-product-row {
    border: 1px solid rgba(24, 38, 23, 0.06);
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(26, 42, 30, 0.08);
}

.market-hero-stat,
.market-hero__update,
.market-hero__meta {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.market-hero-stat {
    padding: 16px 18px;
}

.market-hero-stat strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1;
}

.market-hero-stat span,
.market-hero__update span,
.market-summary-card small,
.market-inline-stat span,
.market-recent-item__meta small {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.market-hero__update,
.market-hero__meta {
    padding: 20px 22px;
}

.market-hero__update strong {
    display: block;
    margin-top: 8px;
    font-size: 1.15rem;
}

.market-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #63b640 0%, #418f2d 100%);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.market-btn--hero,
.market-btn--full {
    width: 100%;
}

.market-section {
    padding: 24px 0 44px;
}

.market-section--compact {
    padding-top: 0;
    padding-bottom: 12px;
}

.market-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.market-filter-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto auto;
    gap: 12px;
    padding: 14px;
    background: #fff;
    margin-bottom: 18px;
}

.market-info-note {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #e5ecdf;
    border-radius: 16px;
    background: #fbfcf9;
    color: #5f7063;
    line-height: 1.6;
}

.market-filter-chip {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #e6ede1;
    border-radius: 14px;
    background: #fafcf8;
    color: #647568;
}

.market-filter-input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #e6ede1;
    border-radius: 14px;
    background: #fafcf8;
    color: #324336;
}

.market-filter-input:disabled {
    color: #8a968c;
    background: #f1f4ee;
}

.market-reset-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    color: #537455;
    text-decoration: none;
    background: #f4f7f1;
    font-weight: 700;
}

.market-list-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.market-list-layout--two-col {
    grid-template-columns: 220px minmax(0, 1fr);
}

.market-side-blocks,
.market-products-column,
.market-detail-main,
.market-detail-side {
    display: grid;
    gap: 18px;
}

.market-detail-main,
.market-detail-side,
.market-detail-grid-top > .market-card,
.market-detail-grid-bottom > .market-card {
    min-width: 0;
}

.market-card {
    background: #fff;
    padding: 20px;
}

.market-card h2,
.market-card h3,
.market-card__head h2 {
    margin: 0;
}

.market-card__head,
.market-card__head--inline {
    margin-bottom: 16px;
}

.market-card__head--inline {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.market-card p,
.market-source-item p,
.market-product-row__main p,
.market-card li {
    color: #627265;
    line-height: 1.65;
}

.market-side-nav {
    display: grid;
    gap: 6px;
}

.market-side-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 14px;
    color: #253629;
    text-decoration: none;
    font-weight: 600;
}

.market-side-nav a.active {
    background: #edf8e7;
    color: #458833;
}

.market-card--cta-soft {
    background: linear-gradient(180deg, #eef8e8 0%, #fafcf8 100%);
}

.market-card--cta-soft-wide {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    text-align: center;
    min-height: 300px;
    padding: 28px;
}

.market-card--cta-soft-wide .market-card__head {
    margin-bottom: 4px;
}

.market-card--cta-soft-wide p {
    max-width: 28ch;
    margin: 0 0 10px;
}

.market-card--cta-soft-wide .market-btn {
    width: auto;
    min-width: 220px;
}

.market-about__image {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: linear-gradient(135deg, #d83b67 0%, #7a1530 100%);
}

.market-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef8e8;
    color: #448833;
    font-size: 0.8rem;
    font-weight: 800;
}

.market-table-count {
    color: #69806e;
    font-weight: 700;
    font-size: 0.92rem;
}

.market-link {
    display: inline-flex;
    margin-top: 8px;
    color: #468532;
    font-weight: 700;
    text-decoration: none;
}

.market-link--compact {
    margin-top: 0;
    min-width: 92px;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: #eef8e8;
    color: #468532;
    font-size: 0.9rem;
    font-weight: 800;
}

.market-summary-card small,
.market-recent-item__meta small {
    display: block;
    color: #7b887d;
    font-size: 0.88rem;
}

.market-summary-card strong {
    display: block;
    margin-top: 7px;
    color: #1d2f21;
    font-size: 1.18rem;
    line-height: 1.35;
    word-break: break-word;
}

.market-source-item + .market-source-item {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf1eb;
}

.market-map-placeholder {
    position: relative;
    min-height: 240px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0efd9 0%, #f7f3de 40%, #e8eedb 100%);
    overflow: hidden;
}

.market-map-placeholder::before {
    content: "";
    position: absolute;
    inset: 8% 10%;
    border: 2px solid rgba(192, 170, 108, 0.28);
    border-radius: 30px 22px 34px 24px;
    transform: rotate(-7deg);
}

.market-map-dot {
    position: absolute;
    min-width: 46px;
    height: 46px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.72);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(99, 83, 32, 0.14);
}

.dot-a { top: 20%; left: 22%; background: #e0ad35; }
.dot-b { top: 48%; left: 42%; background: #71b447; }
.dot-c { top: 46%; left: 70%; background: #6caf3f; }
.dot-d { top: 70%; left: 18%; background: #e0ad35; }
.dot-e { top: 74%; left: 74%; background: #d4a444; }

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

.market-summary-card {
    padding: 22px;
    background: #fff;
}

.market-summary-card strong {
    font-size: 1.95rem;
}

.market-summary-card--accent {
    background: linear-gradient(180deg, #f3fbe9 0%, #ffffff 100%);
}

.market-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.market-detail-grid-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 18px;
}

.market-detail-grid-top > .market-card:first-child {
    grid-column: 1 / -1;
}

.market-detail-grid-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.market-table-wrap {
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th,
.market-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2ea;
    text-align: left;
    white-space: nowrap;
}

.market-table th {
    color: #78857a;
    font-size: 0.84rem;
    font-weight: 800;
    background: #fcfdfb;
}

.market-table--products td,
.market-table--products th {
    white-space: normal;
    vertical-align: middle;
}

.market-table--products thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.market-table--products tbody tr:hover {
    background: #f8fbf6;
}

.market-table--products tbody td {
    color: #425646;
    font-size: 0.96rem;
}

.market-table--products tbody td:first-child strong {
    color: #1d2f21;
    font-size: 1.02rem;
}

.market-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding-top: 18px;
}

.market-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    background: #f4f7f1;
    color: #466b49;
    text-decoration: none;
    font-weight: 700;
}

.market-pagination__link.is-active {
    background: #63b640;
    color: #fff;
}

.market-pagination__link.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

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

.market-tabs span {
    padding: 8px 12px;
    border-radius: 12px;
    background: #f7faf5;
    color: #607264;
    font-size: 0.9rem;
}

.market-tabs span.active {
    background: #eef8e8;
    color: #458633;
}

.market-chart-placeholder {
    position: relative;
    height: 300px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcf5 100%);
}

.market-chart-placeholder::before {
    content: "";
    position: absolute;
    inset: 18px 14px 22px;
    background: repeating-linear-gradient(to bottom, rgba(120, 137, 122, 0.18) 0 1px, transparent 1px 52px);
    border-radius: 14px;
}

.market-chart-placeholder svg {
    position: absolute;
    inset: 16px 14px 20px;
    width: calc(100% - 28px);
    height: calc(100% - 36px);
}

.market-bars {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    align-items: end;
    min-height: 180px;
}

.market-bars__item {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.market-bars__item span {
    width: 28px;
    border-radius: 10px 10px 6px 6px;
    background: linear-gradient(180deg, #d2d8cf 0%, #b8c0b7 100%);
}

.market-bars__item.active span {
    background: linear-gradient(180deg, #71b646 0%, #4b9a32 100%);
}

.market-about {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
}

.market-recent-list {
    display: grid;
    gap: 12px;
}

.market-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #edf1eb;
    border-radius: 16px;
    background: #fbfcfa;
}

.market-recent-item__meta {
    text-align: right;
}

.market-card--form {
    scroll-margin-top: 96px;
}

.market-form {
    display: grid;
    gap: 14px;
}

.market-form label {
    display: grid;
    gap: 8px;
    color: #29462f;
    font-weight: 700;
}

.market-form input,
.market-form select,
.market-form textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #dbe5d6;
    border-radius: 14px;
    background: #fff;
    color: #183020;
}

.market-form textarea {
    min-height: 220px;
    resize: vertical;
}

.market-alert,
.market-empty {
    padding: 14px 16px;
    border-radius: 16px;
}

.market-alert {
    margin-bottom: 18px;
}

.market-alert--success {
    background: #eef9e8;
    color: #285d2d;
}

.market-alert--error {
    background: #fff1f1;
    color: #932f2f;
}

.market-empty {
    background: #f8faf7;
    color: #657669;
}

.market-import-shell {
    max-width: 980px;
}

.market-import-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.cv-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 1280px) {
    .market-list-layout,
    .market-detail-layout,
    .market-detail-grid-top,
    .market-detail-grid-bottom,
    .market-hero__inner--list,
    .market-hero__inner--detail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .market-section {
        padding: 20px 0 32px;
    }

    .market-toolbar {
        justify-content: stretch;
    }

    .market-toolbar .market-btn {
        width: 100%;
    }

    .market-filter-row,
    .market-summary-grid,
    .market-hero__stats,
    .market-about {
        grid-template-columns: 1fr;
    }

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

    .market-card__head--inline,
    .market-recent-item,
    .market-import-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .market-card--cta-soft-wide .market-btn,
    .market-import-actions .market-btn,
    .market-pagination__link {
        width: 100%;
    }

    .market-recent-item__meta {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .market-page .container {
        width: min(100%, calc(100% - 24px));
    }

    .market-hero--list,
    .market-hero--detail {
        padding: 24px 0 18px;
    }

    .market-hero__inner {
        gap: 16px;
    }

    .market-hero__update,
    .market-hero__meta,
    .market-hero-stat {
        padding: 16px;
    }

    .market-hero__update strong,
    .market-summary-card strong {
        font-size: 1rem;
    }

    .market-card,
    .market-summary-card,
    .market-product-row,
    .market-filter-row {
        padding: 16px;
        border-radius: 18px;
    }

    .market-hero h1 {
        font-size: 2rem;
    }

    .market-hero p {
        font-size: 0.96rem;
        line-height: 1.55;
    }

    .market-breadcrumbs,
    .market-last-update {
        display: flex;
        padding: 8px 12px;
        border-radius: 18px;
    }

    .market-filter-input,
    .market-filter-chip,
    .market-reset-link,
    .market-btn,
    .market-pagination__link {
        min-height: 46px;
    }

    .market-card__head,
    .market-card__head--inline {
        margin-bottom: 12px;
    }

    .market-card__head h2,
    .market-card h2 {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .market-card--cta-soft-wide {
        padding: 22px 16px;
    }

    .market-card--cta-soft-wide .market-btn {
        min-width: 0;
    }

    .market-map-placeholder {
        min-height: 200px;
    }

    .market-table-wrap {
        margin: 0 -4px;
    }

    .market-table th,
    .market-table td {
        padding: 10px 12px;
        font-size: 0.88rem;
    }

    .market-table {
        min-width: 620px;
    }

    .market-table--products {
        min-width: 720px;
    }

    .market-summary-card {
        padding: 18px;
    }

    .market-summary-card strong {
        margin-top: 6px;
        font-size: 1.55rem;
    }

    .market-recent-item {
        padding: 12px 14px;
    }

    .market-form textarea {
        min-height: 180px;
    }

    .market-bars {
        gap: 8px;
        min-height: 160px;
    }

    .market-bars__item span {
        width: 20px;
    }
}
