/* Nexus Unified Catalog v2 — Phase 1 temporary visual lock */

:root {
    --nxc-blue-900: #094a84;
    --nxc-blue-700: #0b5ea8;
    --nxc-blue-100: #eaf4fc;
    --nxc-blue-050: #f4f9fd;
    --nxc-ink-900: #17233a;
    --nxc-ink-700: #3f4d63;
    --nxc-ink-500: #68758a;
    --nxc-line: #dfe6ee;
    --nxc-surface: #ffffff;
    --nxc-bg: #f5f7fa;
    --nxc-danger: #c63b38;
    --nxc-radius-lg: 17px;
    --nxc-radius-md: 13px;
    --nxc-shadow: 0 10px 28px rgba(22, 49, 78, 0.07);
}

.nx-catalog-body {
    margin: 0;
    background: var(--nxc-bg);
    color: var(--nxc-ink-900);
}

.nx-catalog,
.nx-catalog * {
    box-sizing: border-box;
}

.nx-catalog {
    direction: rtl;
    padding: 22px 16px 58px;
    font-family: inherit;
}

.nx-catalog a {
    color: inherit;
    text-decoration: none;
}

.nx-catalog__container {
    width: min(1380px, 100%);
    margin-inline: auto;
}

.nx-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nx-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-bottom: 11px;
    color: var(--nxc-ink-500);
    font-size: 12px;
    line-height: 1.7;
}

.nx-breadcrumb a:hover {
    color: var(--nxc-blue-700);
}

.nx-breadcrumb__separator {
    opacity: 0.52;
}

/* Compact category/search heading */

.nx-catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 118px;
    padding: 20px 24px;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-lg);
    background: var(--nxc-surface);
    box-shadow: var(--nxc-shadow);
}

.nx-catalog-head--category {
    display: block;
}

.nx-catalog-head__content {
    min-width: 0;
}

.nx-catalog-head__eyebrow {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--nxc-blue-700);
    font-size: 11px;
    font-weight: 800;
}

.nx-catalog-head h1 {
    margin: 0;
    color: var(--nxc-ink-900);
    font-size: clamp(22px, 2.2vw, 29px);
    font-weight: 850;
    line-height: 1.65;
    letter-spacing: -0.018em;
}

.nx-catalog-head p {
    max-width: 920px;
    margin: 6px 0 0;
    color: var(--nxc-ink-700);
    font-size: 13px;
    line-height: 1.95;
}

.nx-catalog-search {
    display: flex;
    flex: 0 1 440px;
    gap: 8px;
    padding: 6px;
    border: 1px solid #cfd9e5;
    border-radius: 13px;
    background: var(--nxc-surface);
}

.nx-catalog-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 9px 11px;
    background: transparent;
    color: var(--nxc-ink-900);
    font: inherit;
    font-size: 13px;
}

.nx-catalog-search button {
    border: 0;
    border-radius: 9px;
    padding: 9px 18px;
    background: var(--nxc-blue-700);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.nx-catalog-search button:hover {
    background: var(--nxc-blue-900);
}

/* Layout and sidebar */

.nx-catalog-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.nx-catalog-sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #c7d3df transparent;
    padding-inline-end: 3px;
}

.nx-catalog-sidebar::-webkit-scrollbar {
    width: 6px;
}

.nx-catalog-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c7d3df;
}

.nx-filter-panel {
    display: grid;
    gap: 10px;
}

.nx-filter-group {
    overflow: hidden;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-md);
    background: var(--nxc-surface);
}

.nx-filter-group h2 {
    margin: 0;
    padding: 13px 14px 10px;
    border-bottom: 1px solid #edf1f5;
    color: var(--nxc-ink-900);
    font-size: 13px;
    line-height: 1.7;
}

.nx-filter-links {
    display: grid;
    padding: 7px;
}

.nx-filter-links a {
    padding: 8px 9px;
    border-radius: 8px;
    color: var(--nxc-ink-700);
    font-size: 12px;
    line-height: 1.55;
    transition: background 0.18s ease, color 0.18s ease;
}

.nx-filter-links a:hover {
    background: var(--nxc-blue-050);
    color: var(--nxc-blue-700);
}

.nx-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 11px;
}

.nx-filter-chips a {
    min-width: 52px;
    padding: 7px 8px;
    border: 1px solid #d9e3ed;
    border-radius: 999px;
    background: #fff;
    color: var(--nxc-ink-700);
    font-size: 11px;
    text-align: center;
}

.nx-filter-chips a:hover {
    border-color: var(--nxc-blue-700);
    color: var(--nxc-blue-700);
}

.nx-catalog-mobile-filters {
    display: none;
    margin-top: 14px;
}

.nx-catalog-mobile-filters details {
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-md);
    background: var(--nxc-surface);
}

.nx-catalog-mobile-filters summary {
    padding: 13px 15px;
    color: var(--nxc-blue-700);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.nx-catalog-mobile-filters .nx-filter-panel {
    padding: 0 9px 9px;
}

/* Results toolbar */

.nx-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    margin-bottom: 13px;
    padding: 9px 14px;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-md);
    background: var(--nxc-surface);
}

.nx-catalog-count {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.nx-catalog-count strong {
    color: var(--nxc-blue-700);
    font-size: 19px;
}

.nx-catalog-count span {
    color: var(--nxc-ink-500);
    font-size: 12px;
}

.nx-catalog-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nxc-ink-500);
    font-size: 12px;
}

.nx-catalog-sort select {
    min-width: 145px;
    border: 1px solid #d6e0e9;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
    color: var(--nxc-ink-900);
    font: inherit;
}

/* Four-column product grid */

.nx-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.nx-product-card {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-md);
    background: var(--nxc-surface);
    box-shadow: 0 4px 15px rgba(23, 48, 76, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nx-product-card:hover {
    transform: translateY(-2px);
    border-color: #c8d9e8;
    box-shadow: 0 12px 25px rgba(20, 61, 96, 0.095);
}

.nx-product-card__primary {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.nx-product-card__media {
    position: relative;
    display: flex;
    height: 222px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    border-bottom: 1px solid #edf1f5;
    background: linear-gradient(145deg, #ffffff 30%, #f8fafc);
}

.nx-product-card__media img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nx-product-card__badge {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 8px;
    background: #fff0e9;
    color: #b24522;
    font-size: 10.5px;
    font-weight: 800;
}

.nx-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 13px;
}

.nx-product-card__type-row {
    display: flex;
    align-items: center;
    min-height: 25px;
}

.nx-product-card__type {
    display: inline-flex;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--nxc-blue-100);
    color: var(--nxc-blue-700);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
}

.nx-product-card__model {
    margin-top: 7px;
    overflow: hidden;
    color: #496178;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.45;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-product-card h2 {
    display: -webkit-box;
    min-height: 56px;
    margin: 8px 0 11px;
    overflow: hidden;
    color: var(--nxc-ink-900);
    font-size: 14.5px;
    font-weight: 820;
    line-height: 1.9;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nx-product-card__features {
    display: grid;
    gap: 7px;
    margin: auto 0 0;
}

.nx-product-card__features > div {
    display: grid;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 33px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f7f9fb;
}

.nx-product-card__features dt,
.nx-product-card__features dd {
    margin: 0;
    line-height: 1.65;
}

.nx-product-card__features dt {
    color: var(--nxc-ink-500);
    font-size: 11px;
}

.nx-product-card__features dd {
    overflow: hidden;
    color: var(--nxc-ink-700);
    font-size: 12.5px;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-height: 76px;
    padding: 11px 13px;
    border-top: 1px solid #edf1f5;
    background: #fcfdfe;
}

.nx-product-card__price {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.nx-product-card__price del {
    color: #9a6470;
    font-size: 10.5px;
    line-height: 1.4;
}

.nx-product-card__price strong {
    color: var(--nxc-blue-900);
    font-size: 16.5px;
    font-weight: 850;
    line-height: 1.45;
    white-space: nowrap;
}

.nx-product-card__price span {
    color: var(--nxc-ink-500);
    font-size: 10px;
}

.nx-product-card__unavailable {
    color: var(--nxc-danger) !important;
}

.nx-product-card__cart,
.nx-product-card__details {
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    padding: 9px 10px;
    background: var(--nxc-blue-700);
    color: #fff !important;
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
}

.nx-product-card__cart:hover,
.nx-product-card__details:hover {
    background: var(--nxc-blue-900);
}

/* Pagination, empty state and SEO text */

.nx-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-top: 22px;
}

.nx-pagination__pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nx-pagination a,
.nx-pagination .is-current {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nxc-line);
    border-radius: 9px;
    background: #fff;
    color: var(--nxc-ink-700);
    font-size: 11px;
}

.nx-pagination a:hover,
.nx-pagination .is-current {
    border-color: var(--nxc-blue-700);
    background: var(--nxc-blue-700);
    color: #fff;
}

.nx-pagination__arrow {
    min-width: auto !important;
    padding-inline: 13px;
}

.nx-empty-state {
    padding: 56px 20px;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-lg);
    background: var(--nxc-surface);
    text-align: center;
}

.nx-empty-state__icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--nxc-blue-100);
    color: var(--nxc-blue-700);
    font-size: 24px;
    font-weight: 900;
}

.nx-empty-state h2 {
    margin: 16px 0 8px;
    font-size: 20px;
}

.nx-empty-state p {
    margin: 0 auto;
    max-width: 620px;
    color: var(--nxc-ink-500);
    font-size: 13px;
    line-height: 2;
}

.nx-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
}

.nx-empty-state__actions a {
    border: 1px solid var(--nxc-blue-700);
    border-radius: 9px;
    padding: 9px 14px;
    color: var(--nxc-blue-700);
    font-size: 11px;
    font-weight: 800;
}

.nx-catalog-seo {
    display: grid;
    grid-template-columns: minmax(210px, 0.32fr) minmax(0, 1fr);
    gap: 26px;
    margin-top: 24px;
    padding: 25px;
    border: 1px solid var(--nxc-line);
    border-radius: var(--nxc-radius-lg);
    background: var(--nxc-surface);
}

.nx-catalog-seo span {
    color: var(--nxc-blue-700);
    font-size: 11px;
    font-weight: 800;
}

.nx-catalog-seo h2 {
    margin: 7px 0 0;
    font-size: 19px;
    line-height: 1.8;
}

.nx-catalog-seo__text p {
    margin: 0 0 9px;
    color: var(--nxc-ink-700);
    font-size: 13px;
    line-height: 2.1;
}

@media (max-width: 1240px) {
    .nx-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nx-product-card__media {
        height: 235px;
    }
}

@media (max-width: 900px) {
    .nx-catalog {
        padding-inline: 11px;
    }

    .nx-catalog-head {
        align-items: stretch;
        flex-direction: column;
        padding: 18px 20px;
    }

    .nx-catalog-search {
        flex-basis: auto;
        width: 100%;
    }

    .nx-catalog-layout {
        grid-template-columns: 1fr;
    }

    .nx-catalog-sidebar {
        display: none;
    }

    .nx-catalog-mobile-filters {
        display: block;
    }

    .nx-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .nx-catalog {
        padding-top: 16px;
    }

    .nx-catalog-head {
        min-height: 0;
        padding: 16px;
    }

    .nx-catalog-head h1 {
        font-size: 22px;
    }

    .nx-catalog-search {
        flex-direction: column;
    }

    .nx-catalog-search button {
        width: 100%;
    }

    .nx-catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .nx-catalog-sort {
        justify-content: space-between;
    }

    .nx-catalog-sort select {
        flex: 1;
    }

    .nx-product-grid {
        grid-template-columns: 1fr;
    }

    .nx-product-card__media {
        height: 270px;
    }

    .nx-catalog-seo {
        grid-template-columns: 1fr;
        gap: 11px;
        padding: 19px;
    }

    .nx-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .nx-pagination__pages {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nx-pagination__arrow {
        width: 100%;
    }
}
