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

.catalog-embedded {
    width: 100%;
    color: #1f252b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.catalog-embedded a {
    color: #155d9a;
    text-decoration: none;
}

.catalog-embedded a:hover {
    text-decoration: underline;
}

.catalog-shell {
    width: 100%;
}

.catalog-header,
.catalog-main,
.catalog-footer {
    max-width: 1180px;
    margin: 0 auto;
}

.catalog-header {
    padding: 20px;
}

.catalog-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 14px;
}

.catalog-brand {
    color: #17202a;
    font-size: 22px;
    font-weight: bold;
    white-space: nowrap;
}

.catalog-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 2px;
    overflow: hidden;
    border-radius: 7px;
    background: #c7ddea;
    font-size: 14px;
}

.catalog-nav a {
    display: block;
    min-width: 125px;
    padding: 11px 18px;
    background: #6ea4c5;
    color: #fff;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.catalog-nav a:hover {
    background: #5e95b6;
    text-decoration: none;
}

.header-search,
.hero-search {
    display: flex;
    gap: 8px;
}

.header-search input,
.hero-search input,
.filters input,
.filters select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccd3da;
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

button,
.primary-button,
.secondary-button {
    display: inline-block;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
    text-decoration: none;
}

button,
.primary-button {
    background: #1f6f43;
    color: #fff;
}

button:hover,
.primary-button:hover {
    text-decoration: none;
    background: #185b36;
}

.secondary-button {
    border: 1px solid #ccd3da;
    background: #fff;
    color: #17202a;
}

.catalog-main {
    padding: 0 20px 55px;
}

.hero,
.vehicle-hero {
    padding: 38px;
    border: 1px solid #e1e5e9;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.05);
}

.hero h1,
.vehicle-hero h1 {
    margin: 3px 0 8px;
    font-size: 34px;
    line-height: 1.2;
}

.hero p,
.vehicle-hero p,
.page-heading p {
    margin: 0 0 22px;
    color: #65707a;
}

.hero-search {
    max-width: 900px;
}

.hero-search input {
    min-height: 50px;
    font-size: 17px;
}

.hero-search button {
    min-height: 50px;
}

.hero-note {
    margin-top: 13px;
    color: #747c84;
    font-size: 13px;
}

.hero-kicker,
.section-kicker {
    color: #1f6f43;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.search-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 13px;
    font-size: 13px;
}

.search-examples span {
    color: #737c85;
}

.search-examples a {
    padding: 5px 9px;
    border-radius: 20px;
    background: #eef4f1;
}

.section {
    margin-top: 36px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 2px 0 0;
    font-size: 24px;
}

.page-heading {
    margin: 4px 0 22px;
}

.page-heading h1 {
    margin: 3px 0 7px;
    font-size: 31px;
}

.page-heading p {
    margin-bottom: 0;
}

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

.category-card,
.vehicle-card {
    display: block;
    padding: 17px;
    border: 1px solid #e0e5e9;
    border-radius: 8px;
    background: #fff;
}

.category-card:hover,
.vehicle-card:hover {
    border-color: #b7c6bc;
    text-decoration: none;
}

.category-card strong,
.category-card span,
.vehicle-card strong,
.vehicle-card span {
    display: block;
}

.category-card strong,
.vehicle-card strong {
    color: #20262c;
    font-size: 16px;
}

.category-card span,
.vehicle-card span {
    margin-top: 5px;
    color: #727b84;
    font-size: 13px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.vehicle-grid-large {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vehicle-card {
    text-align: center;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.product-list-item {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 19px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
}

.product-list-item h2 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
}

.part-type {
    color: #4d5963;
    font-weight: bold;
    font-size: 13px;
}

.sku-preview,
.list-meta {
    margin-top: 8px;
    color: #69747e;
}

.sku-preview {
    font-size: 13px;
}

.list-meta {
    margin-top: auto;
    padding-top: 12px;
}

.badge,
.summary-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    background: #eef1f3;
    color: #56616b;
    font-size: 12px;
}

.details-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
}

.breadcrumbs {
    padding: 12px 0 20px;
    color: #717982;
    font-size: 13px;
}

.breadcrumbs .sep {
    padding: 0 7px;
}

.filters {
    display: grid;
    gap: 12px;
    align-items: end;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
}

.filters-search {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
}

.compact-wide {
    grid-template-columns: 1fr 1fr 1fr auto;
}

.filters label {
    display: block;
    margin-bottom: 5px;
    color: #59646e;
    font-size: 12px;
    font-weight: bold;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reset-link {
    white-space: nowrap;
    font-size: 13px;
}

.result-summary {
    margin: 18px 0;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.pagination a,
.pagination .current {
    min-width: 38px;
    padding: 8px 11px;
    border: 1px solid #d4d9de;
    border-radius: 4px;
    background: #fff;
    text-align: center;
}

.pagination .current {
    background: #273746;
    color: #fff;
    border-color: #273746;
}

.product-title-block {
    margin-bottom: 24px;
}

.product-title-block h1 {
    margin: 4px 0 12px;
    font-size: 33px;
    line-height: 1.22;
}

.product-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 24px;
    align-items: start;
}

.product-section {
    margin-bottom: 30px;
}

.product-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.info-card {
    padding: 15px;
    border: 1px solid #e1e5e9;
    border-radius: 7px;
    background: #fff;
}

.info-card span,
.info-card strong {
    display: block;
}

.info-card span {
    margin-bottom: 5px;
    color: #6b747d;
    font-size: 12px;
}

.info-card strong {
    font-size: 14px;
}

.sku-table-wrap {
    overflow-x: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.sku-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.sku-table th,
.sku-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #e2e6e9;
    text-align: left;
}

.sku-table tr:last-child td {
    border-bottom: 0;
}

.sku-table th {
    background: #eef1f3;
}

.article-number {
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

.sku-action {
    text-align: right !important;
    white-space: nowrap;
    font-size: 13px;
}

.contact-box {
    padding: 22px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #dce2e7;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.contact-box h2 {
    margin: 4px 0 8px;
}

.availability-button {
    display: block;
    margin: 5px 0 14px;
    padding: 13px 15px;
    border-radius: 7px;
    background: #1f6f43;
    color: #ffffff !important;
    font-size: 17px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.availability-button:hover {
    background: #185b36 !important;
    color: #fff;
    text-decoration: none !important;
}

.contact-box p {
    color: #626d77;
}

.sticky-box {
    position: sticky;
    top: 15px;
}

.contact-articles {
    margin: 16px 0;
    padding: 12px;
    border-radius: 7px;
    background: #f3f6f4;
}

.contact-articles span,
.contact-articles strong {
    display: block;
}

.contact-articles span {
    color: #68736c;
    font-size: 12px;
}

.contact-articles strong {
    margin-top: 3px;
    font-size: 18px;
}

.contact-actions {
    display: grid;
    gap: 9px;
}

.related-section {
    margin-top: 15px;
}

.empty-state {
    padding: 28px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
}

.empty-state p {
    margin-bottom: 0;
    color: #6c7680;
}

.catalog-footer {
    padding: 24px 20px 50px;
    border-top: 1px solid #e1e5e9;
    color: #727a83;
}

/* =========================================================
   CATALOG RESPONSIVE
   IMPORTANT:
   Everything below is scoped to .catalog-embedded.
   This file must NOT change Kandidat #header/#menu/.container/body.
   ========================================================= */

.catalog-embedded {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.catalog-embedded *,
.catalog-embedded *:before,
.catalog-embedded *:after {
    box-sizing: border-box;
}

/* Allow grid/flex children to shrink instead of pushing the page sideways. */
.catalog-embedded > *,
.catalog-embedded .product-layout > *,
.catalog-embedded .product-content,
.catalog-embedded .product-sidebar,
.catalog-embedded .product-list-item,
.catalog-embedded .info-card {
    min-width: 0;
}

.catalog-embedded input,
.catalog-embedded select,
.catalog-embedded textarea,
.catalog-embedded button {
    max-width: 100%;
}

/* SKU table may scroll inside its own block on a narrow phone. */
.catalog-embedded .sku-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.catalog-embedded h1,
.catalog-embedded h2,
.catalog-embedded h3,
.catalog-embedded .sku-preview {
    overflow-wrap: break-word;
    word-wrap: break-word;
}


@media screen and (max-width: 1000px) {

    .catalog-embedded .vehicle-grid,
    .catalog-embedded .vehicle-grid-large {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .catalog-embedded .filters-search {
        grid-template-columns: 2fr 1fr 1fr;
    }

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

    .catalog-embedded .sticky-box {
        position: static;
    }
}


@media screen and (max-width: 820px) {

    .catalog-embedded .category-grid,
    .catalog-embedded .product-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-embedded .vehicle-grid,
    .catalog-embedded .vehicle-grid-large {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .catalog-embedded .compact-wide {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-embedded .product-info-grid {
        grid-template-columns: 1fr;
    }
}


@media screen and (max-width: 620px) {

    .catalog-embedded .catalog-header-top,
    .catalog-embedded .hero-search,
    .catalog-embedded .header-search,
    .catalog-embedded .section-heading {
        display: block;
    }

    .catalog-embedded .catalog-nav {
        width: 100%;
        margin-top: 12px;
        grid-template-columns: 1fr;
    }

    .catalog-embedded .catalog-nav a {
        min-width: 0;
        width: 100%;
        padding: 10px 8px;
    }

    .catalog-embedded .header-search input,
    .catalog-embedded .hero-search input {
        width: 100%;
        margin-bottom: 8px;
    }

    .catalog-embedded .header-search button,
    .catalog-embedded .hero-search button {
        width: 100%;
    }

    .catalog-embedded .hero,
    .catalog-embedded .vehicle-hero {
        padding: 24px 18px;
    }

    .catalog-embedded .hero h1,
    .catalog-embedded .vehicle-hero h1,
    .catalog-embedded .product-title-block h1,
    .catalog-embedded .page-heading h1 {
        font-size: 24px;
    }

    .catalog-embedded .category-grid,
    .catalog-embedded .product-list,
    .catalog-embedded .product-info-grid,
    .catalog-embedded .vehicle-grid,
    .catalog-embedded .vehicle-grid-large,
    .catalog-embedded .filters,
    .catalog-embedded .filters-search,
    .catalog-embedded .compact-wide {
        grid-template-columns: 1fr;
    }

    .catalog-embedded .filter-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .catalog-embedded .sku-table {
        min-width: 480px;
    }

    .catalog-embedded .sku-action {
        display: none;
    }
}

/* =========================================
   MOBILE WIDTH FIX
   ========================================= */

@media screen and (max-width: 800px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /*
     * Ключевой момент:
     * padding теперь входит внутрь 100% ширины,
     * а не добавляется сверх неё.
     */
    .container,
    #header.container {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    #header {
        height: auto;
        overflow: visible;
    }

    #logo {
        float: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 15px 0 10px 0;
        box-sizing: border-box;
    }

    #menu {
        position: static;
        float: none;
        clear: both;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 10px 0 0 0;

        box-sizing: border-box;
    }

    #menu ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;

        float: none;

        width: 100%;
        max-width: 100%;

        margin: 0;
        padding: 0;

        box-sizing: border-box;
    }

    #menu li {
        float: none;

        width: 100%;
        min-width: 0;

        margin: 0;
        padding: 0;

        box-sizing: border-box;
    }

    #menu a {
        display: block;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        margin: 0;
        padding: 10px 4px;

        box-sizing: border-box;

        white-space: normal;
        text-align: center;
        font-size: 12px;
        line-height: 1.3;
    }

    #wrapper,
    #wrapper-bgbtm,
    #content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}


@media screen and (max-width: 480px) {

    #menu ul {
        grid-template-columns: 1fr;
    }
}
