@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

:root {
    --main-color: #565656;
    --main-tcd-color: var(--main-color);
    /*--main-tcd-font: var(--main-font);*/
    /*--main-tcd-font: 'Rubik', sans-serif;*/
    --main-tcd-font: 'Roboto', sans-serif;
    --bg-wrap: #f3f3f3;
}

.tcd-container {
    background: var(--bg-wrap);
    /*background: var(--bg-wrap) url('https://avtomarket.com.ua/apps/avtomarket/templates/img/meatal-bg.jpg') bottom repeat-x;*/
    /*background: var(--bg-wrap) url('https://bestauto.com.ua/apps/bestauto/templates/img/bg_select_modif.jpg') bottom repeat-x;*/
    /*background-position: 100% 100%;*/
}

.search-by-year-container {
    margin-bottom: 0;
    margin-top: 0;
    min-height: 285px;
}

#search-by-year-data-container {
    padding-bottom: 10px;
}

.search-by-year-container .bs-example {
    border-radius: 0;
    padding: 10px 0 0 0;
    position: relative;
    box-shadow: none;
}

.search-by-year-container .bs-example .header_block {
    font-size: 16px;
    color: #363636;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin: 0 0 10px;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-overlay.no-close {
    cursor: default;
}

.custom-modal-overlay.no-close .custom-modal {
    cursor: default;
}

.custom-modal {
    background: white;
    border-radius: 6px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    transform: translateY(-50px) scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
    border: none !important;
}

.custom-modal-overlay.active .custom-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.custom-modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.custom-modal-title {
    margin: 0;
    font-size: 14px;
    color: #1f2937;
    font-family: var(--main-tcd-font);
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 21px;
    cursor: pointer;
    color: #9397a1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
    font-weight: bold;
}

.custom-modal-close:hover {
    background-color: var(--main-tcd-color);
    color: white;
}

.custom-modal-body {
    padding: 24px;
    color: #222222;
    line-height: 1.6;
    max-height: 95vh;
    overflow-y: auto;
    font-size: 14px;
    font-family: var(--main-tcd-font);
    background: white;
}

.modal-isolated-content {
    font-family: var(--main-tcd-font);
}

.custom-modal-footer {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.custom-modal-btn {
    padding: 7px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 90px;
    font-family: var(--main-tcd-font);
    text-transform: none !important;
}

.custom-modal-btn-primary {
    background-color: #0d6efd !important;
    color: white !important;
}

.custom-modal-btn-primary:hover {
    background-color: #0b5ed7 !important;
    transform: translateY(-2px);
}

.custom-modal-btn-secondary {
    background-color: #6b7280 !important;
    color: white !important;
}

.custom-modal-btn-secondary:hover {
    background-color: #4b5563 !important;
    transform: translateY(-2px);
}

/* Сбрасываем все возможные Bootstrap стили */
.custom-modal-overlay * {
    box-sizing: border-box !important;
    margin: 0 !important;
}

.custom-modal *:not(button) {
    background: transparent !important;
}

/* Пример кастомных стилей через ID */
#special-modal .custom-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#special-modal .custom-modal-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#special-modal .custom-modal-title {
    color: white;
}

#warning-modal .custom-modal {
    border-left: 6px solid #f59e0b;
    background: #fffbeb;
}

#warning-modal .custom-modal-header {
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
}

#warning-modal .custom-modal-title {
    color: #92400e;
}

#large-modal .custom-modal {
    max-width: 800px;
}

#small-modal .custom-modal {
    max-width: 300px;
}

#dark-modal .custom-modal {
    background: #1f2937;
    color: white;
}

#dark-modal .custom-modal-header {
    background: #374151;
    border-bottom: 2px solid #4b5563;
}

#dark-modal .custom-modal-title {
    color: white;
}

#dark-modal .custom-modal-body {
    background: #1f2937;
    color: #d1d5db;
}

.loading-error {
    font-size: 14px;
    text-align: center;
    padding: 40px;
    color: #F44336;
}

.custom-modal-loadContent {
    text-align: center;
    padding: 40px;
    display: flex;
    justify-content: center;
}

/* Классы позиционирования */
.custom-modal-overlay.top-align {
    align-items: flex-start;
    padding-top: 20px;
}

.custom-modal-overlay.bottom-align {
    align-items: flex-end;
    padding-bottom: 20px;
}

.custom-modal-overlay.left-align {
    justify-content: flex-start;
    padding-left: 20px;
}

.custom-modal-overlay.right-align {
    justify-content: flex-end;
    padding-right: 20px;
}

.custom-modal-overlay.top-left-align {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 0 0 20px;
}

.custom-modal-overlay.top-right-align {
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px 20px 0 0;
}

.custom-modal-overlay.bottom-left-align {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 0 20px 20px;
}

.custom-modal-overlay.bottom-right-align {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 20px 20px 0;
}

/* Анимации для разных позиций */
.custom-modal-overlay.top-align .custom-modal {
    transform: translateY(-50px) scale(0.9);
}

.custom-modal-overlay.top-align.active .custom-modal {
    transform: translateY(0) scale(1);
}

.custom-modal-overlay.bottom-align .custom-modal {
    transform: translateY(50px) scale(0.9);
}

.custom-modal-overlay.bottom-align.active .custom-modal {
    transform: translateY(0) scale(1);
}

.custom-modal-overlay.left-align .custom-modal {
    transform: translateX(-50px) scale(0.9);
}

.custom-modal-overlay.left-align.active .custom-modal {
    transform: translateX(0) scale(1);
}

.custom-modal-overlay.right-align .custom-modal {
    transform: translateX(50px) scale(0.9);
}

.custom-modal-overlay.right-align.active .custom-modal {
    transform: translateX(0) scale(1);
}

.custom-modal-overlay.top-left-align .custom-modal {
    transform: translate(-50px, -50px) scale(0.9);
}

.custom-modal-overlay.top-left-align.active .custom-modal {
    transform: translate(0, 0) scale(1);
}

.custom-modal-overlay.top-right-align .custom-modal {
    transform: translate(50px, -50px) scale(0.9);
}

.custom-modal-overlay.top-right-align.active .custom-modal {
    transform: translate(0, 0) scale(1);
}

.custom-modal-overlay.bottom-left-align .custom-modal {
    transform: translate(-50px, 50px) scale(0.9);
}

.custom-modal-overlay.bottom-left-align.active .custom-modal {
    transform: translate(0, 0) scale(1);
}

.custom-modal-overlay.bottom-right-align .custom-modal {
    transform: translate(50px, 50px) scale(0.9);
}

.custom-modal-overlay.bottom-right-align.active .custom-modal {
    transform: translate(0, 0) scale(1);
}

/* Режим на весь экран */
.custom-modal-fullscreen {
    width: 99vw !important;
    height: 97vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
}

.custom-modal-fullscreen-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.custom-modal-body {
    max-height: calc(90vh - 100px) !important;
}

.custom-modal-fullscreen .custom-modal-body {
    max-height: calc(97vh - 80px) !important;
}

/* Плавная анимация */
.custom-modal {
    transition: all 0.3s ease;
}


/* Кастомные стили для конкретных модальных окон через ID */
#tcd-large-modal .custom-modal {
    max-width: 1040px;
}

#tcd-large-modal .custom-modal-header, #tcd-large-modal .custom-modal-footer {
    padding: 10px 24px;
}

#tcd-large-modal .custom-modal-title {
    font-family: var(--main-tcd-font);
    font-size: 14px;
    font-weight: 400;
}

#user_message_specify_modification {
    display: none !important;
}

#searchImageInGoogleModal .custom-modal {
    max-width: 1040px;
}

#searchImageInGoogleModal .custom-modal-header, #searchImageInGoogleModal .custom-modal-footer {
    padding: 10px 24px;
}

#searchImageInGoogleModal .custom-modal-title {
    font-family: var(--main-tcd-font);
    font-size: 14px;
    font-weight: 400;
}

.spareparts_h1 {
    font-weight: 700;
    font-size: 18px !important;
    border-bottom: 1px solid #d6d6d6;
    line-height: 1.6;
}

.response, .responsive_2 {
    width: 100%;
    overflow: auto;
}

.pct_attr {
    border-collapse: separate;
    border: solid #ccc 1px;
    border-radius: 4px;
    border-left: 0px;
    border-top: 0px;
}

.spareparts_pct .pct_attr th {
    font-weight: 700;
}

.spareparts_pct .pct_attr th, .spareparts_pct .pct_attr td {
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
}

.table-bordered-tcd {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #dee2e6;
}

.table-bordered-tcd th,
.table-bordered-tcd td {
    border: 1px solid #dee2e6;
    padding: .75rem;
    vertical-align: middle !important;
}

.table-bordered-tcd thead th {
    border-bottom-width: 2px;
}

.table-bordered-tcd tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.widget-categories-list__body {
    padding: 1.5rem;
}

.widget-categories-list__root {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-categories-list__root-item {
    line-height: 20px;
}

.widget-categories-list__body a {
    color: inherit;
    -webkit-transition: color .1s;
    transition: color .1s;
}

.widget-categories-list__body a:hover {
    color: #e32d2d;
}

.widget-categories-list__root-link {
    font-weight: 700;
    font-size: 18px;
}

.widget-categories-list__child {
    list-style: none;
    padding: 0;
    font-size: 14px;
    margin: 10px 0 0;
}

.widget-categories-list__child-item {
    padding: 3px 0;
}

.widget-categories-list__root-item--has-children + .widget-categories-list__root-item {
    margin-top: 1.375rem;
}

.section-header__body {
    margin-bottom: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.section-header__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    position: relative;
    top: 2px;
}

.section-header__divider {
    width: 100%;
    height: 2px;
    margin-top: 8px;
    background: #ebebeb;
}

.categories-list-block {
    margin-top: 10px;
    margin-bottom: 30px;
}

.categories-list__body {
    background-color: #fff;
    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.09);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.09);
    list-style: none;
    padding: 0;
    margin: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.categories-list__item {
    padding: 1.125rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #ebebeb;
}

.categories-list__item:hover:before {
    opacity: 1;
}

@media (min-width: 1400px) {
    .categories-list--layout--columns-5-sidebar .categories-list__item {
        width: calc((100% - 4px) / 4);
    }
}

@media (max-width: 575.98px) {
    .categories-list--layout--columns-5-sidebar .categories-list__item {
        width: calc((100% - 1px) / 2);
    }
    .section-header__divider {
        background: transparent;
    }
    .section-header__title {
        top: 14px;
    }
}

@media (min-width: 576px) and (max-width: 1199.98px) {
    .categories-list--layout--columns-5-sidebar .categories-list__item {
        width: calc((100% - 2px) / 3);
    }
}

.categories-list__item:before {
    position: absolute;
    display: block;
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    opacity: 0;
    -webkit-transition: opacity .12s;
    transition: opacity .12s;
    z-index: 1;
}

.categories-list__item a {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: inherit;
}

.categories-list__item .image {
    width: 100%;
    max-width: 140px;
    margin: 0 auto;
}

.image--type--category .image__body {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.image--type--product .image__tag, .image--type--category .image__tag {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    -o-object-fit: scale-down;
    object-fit: scale-down;
}

.categories-list__divider {
    width: 1px;
    background-color: #ebebeb;
}

.card {
    background-color: #fff;
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
    border: none;
    border-radius: 0;
}


.widget-categories-list__show-more {
    position: relative;
    display: inline;
    border: none;
    background: transparent;
    padding: 0;
    color: #999;
    font-size: 14px;
    font-family: inherit;
    margin-top: 4px;
}

.widget-categories-list__show-more {
    padding-left: 16px;
}

.widget-categories-list__show-more-collapse-text {
    display: none;
}

.widget-categories-list__show-more-arrow {
    left: 0;
}

.widget-categories-list__show-more-arrow {
    fill: currentColor;
    position: absolute;
    top: 6px;
    -webkit-transition: -webkit-transform .2s;
    transition: -webkit-transform .2s;
    transition: transform .2s;
    transition: transform .2s, -webkit-transform .2s;
    opacity: .78;
}

.widget-categories-list__show-more-arrow svg {
    display: block;
}

.widget-categories-list__show-more[aria-expanded="true"] .widget-categories-list__show-more-expand-text {
    display: none;
}
.widget-categories-list__show-more[aria-expanded="true"] .widget-categories-list__show-more-collapse-text {
    display: inline;
}

.widget-categories-list__show-more[aria-expanded="false"] .widget-categories-list__show-more-collapse-text {
    display: none;
}
.widget-categories-list__show-more[aria-expanded="false"] .widget-categories-list__show-more-expand-text {
    display: inline;
}

.widget-categories-list__show-more[aria-expanded="true"] .widget-categories-list__show-more-arrow {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

.selected-by-user a {
    color: #ad1e1e;
}


.panel-heading-choose-car .panel-title {
    font-size: 14px !important;
}

/* Карточки товара */
.skin-autooptimal .bg-lgrey {
    display: none !important;
}

.skin-autooptimal .currency-block {
    border: none !important;
}

.skin-autooptimal #myForm label {
    font-family: inherit !important;
}

input[name="currency"][type="radio"] {
    position: relative;
    top: 2px !important;
    margin-right: 4px !important;
}

.buy a.widget:hover, .buy .plus:hover, .buy:hover .btn {
    background-color: #3c8dbc !important;
    border-color: #3c8dbc !important;
    color: #fff !important;
}

.catalog-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 15px;
    margin: 15px 0;
}

@media (max-width: 992px) {
    .catalog-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        order: 2;
    }

    .products-main {
        order: 1;
    }
}

/* Сайдбар с фильтрами */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    height: fit-content;
    /*position: sticky;*/
    top: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3c8dbc;
}

/* Стили для чекбоксов брендов */
.brands-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.brands-list::-webkit-scrollbar {
    width: 6px;
}

.brands-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.brands-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.brands-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.brand-item {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    padding: 2px;
    border-radius: 6px;
    transition: background 0.2s;
}

.brand-item:hover {
    background: #f5f9ff;
}

.brand-checkbox {
    margin: 0 !important;
    margin-right: 10px !important;
    width: 18px;
    height: 18px;
    cursor: pointer;
    top: 0 !important;
}

.brand-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    flex: 1;
    font-weight: 400;
}

.brand-count {
    font-size: 12px;
    color: #444242;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
}

.search-brands {
    margin-bottom: 15px;
}

.brands-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.brands-search-input:focus {
    outline: none;
    border-color: #3c8dbc;
}

/* Основная область с товарами */
.products-main {
    background: white;
    border-radius: 12px;
    padding: 0;
}

.products-header {
    padding: 20px 0;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 0;
}

.filters-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.status-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.filter-btn:hover {
    border-color: #3c8dbc;
    color: #3c8dbc;
}

.filter-btn.active {
    background: #3c8dbc;
    color: white;
    border-color: #3c8dbc;
}

.clear-filters-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
}

.products-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.product-count {
    font-size: 14px;
    color: #333;
}

.product-count strong {
    color: #3c8dbc;
}

.selected-brands-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brand-tag {
    background: #e8f4ff;
    color: #3c8dbc;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-tag-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    margin-left: 4px;
}

.brand-tag-remove:hover {
    color: #ff4444;
}

/* Сетка товаров - ВИД КАРТОЧКИ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.products-grid.table-view {
    display: block;
    grid-template-columns: none;
    gap: 0;
    padding: 15px 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    /*overflow: hidden;*/
    overflow: visible;
    border: 1px solid #eaeaea;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.products-grid.table-view .product-card {
    display: flex;
    flex-direction: row;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 0;
    height: auto;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    align-items: stretch;
}

.products-grid.table-view .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #3c8dbc;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card__header {
    padding: 15px 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid.table-view .product-card__header {
    padding: 15px;
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
    min-width: 200px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fafafa;
}

.product-card__supplier-logo {
    height: 30px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.products-grid.table-view .product-card__supplier-logo {
    height: 40px;
    max-width: 120px;
    margin-bottom: 8px;
}

.product-card__supplier-name {
    font-size: 18px;
    color: #343434;
    font-weight: 700;
    text-transform: uppercase;
}

.products-grid.table-view .product-card__supplier-name {
    font-size: 16px;
    text-align: center;
    font-weight: 700;
    color: #4c4c4c;
}

.products-grid:not(.table-view) .product-card__header .product-card__supplier-name {
    display: none;
}

.products-grid.table-view .product-card__content .product-card__supplier-name {
    display: none;
}

.product-card__content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.products-grid.table-view .product-card__content {
    padding: 15px 20px;
    flex-direction: column;
    justify-content: center;
    flex: 3;
    border-right: 1px solid #f0f0f0;
    min-height: 120px;
}

.product-card__title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.12;
    color: #000000;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 0;
}

.products-grid.table-view .product-card__title {
    font-size: 16px;
    line-height: 1.4;
    height: auto;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
    font-weight: 500;
    color: #000000;
}

.product-card__sku {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.products-grid.table-view .product-card__sku {
    margin-bottom: 8px;
    font-size: 14px;
}

.product-card__sku-badge {
    background: #f0f8ff;
    border: 1px solid #607D8B;
    color: #607D8B;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.products-grid.table-view .product-card__sku-badge {
    font-size: 13px;
    padding: 2px 8px;
    background: #e8f4ff;
    border-color: #3c8dbc;
    color: #3c8dbc;
}

.product-card__attributes {
    font-size: 12px;
    color: #403e3e;
    line-height: 1.2;
    margin: 12px 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex: 1;
}

.products-grid:not(.table-view) .product-card__attributes {
    max-height: 50px;
}

.products-grid.table-view .product-card__attributes {
    /*font-size: 13px;
    line-height: 1.4;
    max-height: 60px;
    margin: 0;
    padding: 0;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;*/

    font-size: 12px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    color: #403e3e;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card__attributes::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    /*background: linear-gradient(to bottom, transparent, white);*/
}

.product-card__found-badge {
    position: absolute;
    top: 18px;
    right: 10px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.products-grid.table-view .product-card__found-badge {
    display: none;
}

.product-card__not-found-badge {
    position: absolute;
    top: 18px;
    right: 10px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 2;
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.products-grid.table-view .product-card__not-found-badge {
    display: none;
}

.available-text {
    font-size: 14px;
}

.product-card__footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    margin-top: auto;
}

.products-grid.table-view .product-card__footer {
    padding: 15px 20px;
    border-top: none;
    border-left: 1px solid #f0f0f0;
    margin-top: 0;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #f9f9f9;
}

.product-card__availability {
    margin-bottom: 12px;
    font-size: 12px;
}

.products-grid.table-view .product-card__availability {
    margin-bottom: 10px;
    font-size: 13px;
    width: 100%;
    text-align: center;
}

.product-card__price {
    font-size: 20px;
    font-weight: 700;
    color: #e53935;
    margin-bottom: 12px;
}

.products-grid.table-view .product-card__price {
    font-size: 18px;
    margin-bottom: 12px;
    color: #d32f2f;
}

.product-card__price-label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 4px;
}

.products-grid.table-view .product-card__price-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.product-card__buy-widget {
    margin-top: 10px;
}

.products-grid.table-view .product-card__buy-widget {
    margin-top: 10px;
    width: 100%;
}

.product-card__images {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.products-grid.table-view .product-card__images {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex: 1;
    min-width: 180px;
    padding: 15px 0;
    justify-content: flex-start;
    align-items: center;
    background: #fefefe;
}

.product-card__image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s;
}

.products-grid.table-view .product-card__image {
    width: 55px;
    height: 55px;
    margin: 0 3px;
    border: 1px solid #ddd;
}

.product-card__image:hover {
    transform: scale(1.05);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3c8dbc;
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .products-grid.table-view .product-card {
        flex-direction: column;
    }

    .products-grid.table-view .product-card__header,
    .products-grid.table-view .product-card__content,
    .products-grid.table-view .product-card__footer,
    .products-grid.table-view .product-card__images {
        border: none;
        width: 100%;
        min-width: auto;
        border-bottom: 1px solid #f0f0f0;
    }

    .products-grid.table-view .product-card__content {
        order: 1;
    }

    .products-grid.table-view .product-card__header {
        order: 2;
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 15px;
        background: #f8f8f8;
    }

    .products-grid.table-view .product-card__images {
        order: 3;
        justify-content: flex-start;
        padding: 10px 15px;
    }

    .products-grid.table-view .product-card__footer {
        order: 4;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .filters-top {
        flex-direction: column;
        align-items: stretch;
    }

    .status-filter-buttons {
        justify-content: center;
    }
}

.no-brands-selected {
    color: #888;
    font-style: italic;
    font-size: 13px;
    padding: 5px 0;
}

/* НОВЫЕ СТИЛИ ДЛЯ ПАГИНАЦИИ */
.load-more-container {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #eaeaea;
    margin-top: 20px;
}

.load-more-btn {
    padding: 12px 36px;
    background: #3c8dbc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: #367fa9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(60, 141, 188, 0.25);
}

.load-more-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-btn .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.load-more-btn.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.products-count-info {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.product-card.hidden {
    display: none !important;
}

.pagination-info {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.no-filtered-products {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* КНОПКИ ПЕРЕКЛЮЧЕНИЯ ВИДА */
.view-toggle-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 15px;
}

.view-toggle-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.view-toggle-btn:hover {
    border-color: #3c8dbc;
    color: #3c8dbc;
    background: #f8fbff;
}

.view-toggle-btn.active {
    background: #3c8dbc;
    color: white;
    border-color: #3c8dbc;
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.products-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Индикатор наличия в табличном виде */
.table-availability {
    display: none;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
}

.products-grid.table-view .table-availability {
    display: inline-block;
}

.table-availability.available {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.table-availability.unavailable {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.back-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: #3c8dbc;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-link:hover {
    background-color: #3c8dbcb0;
    color: white;
}

/* Карточки товара конец */

/* Карточки товара в поиске */

.skin-autooptimal .tile-img.no-photo {
    opacity: 1 !important;
}

.tile-img{
    width: 125px!important;
    height: 125px !important;
    object-fit: cover;
    margin-bottom: 15px;
}

#products .product-item .text-block {
    height: 120px;
}

#products .product-item .text-block p {
    margin: 0 !important;
    line-height: 1;
}

/* Карточки товара в поиске конец */