.smartsearch-page {
    --main-color: <?=$arParams['MAIN_COLOR'] ?: '#8450DB'?>;
    --color-gray-200: #F3F5F6;
    --color-gray-500: #ABB5BE;
    --color-gray-700: #666666;
    max-width: 1200px;
    margin: 0 auto;
}

.smartsearch-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.smartsearch-page__input-container {
    display: none;
}

.smartsearch-select {
    height: 48px;
    padding: 0 30px 0 15px;
    border: 1px solid var(--color-gray-200);
    border-radius: 5px;
    background: #fff;
    min-width: 200px;
    appearance: none;
    position: relative;
    cursor: pointer;
	color: black;
	font-size: medium;
    font-family: "robotomedium";
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.smartsearch-select::-ms-expand {
    display: none;
}


.search-page-params {
    color: var(--main-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--main-color);
    font-size: 14px;
}

.search-sections {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 разделов в ряд */
    gap: 10px; /* Уменьшаем отступ между блоками */
    margin-bottom: 15px; /* Уменьшаем отступ перед товарами */
}

.search-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 товара в ряд */
    gap: 20px;
}

.search-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.search-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-item__image {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.search-item__image a {
    flex: 0 0 100px;
    display: block;
    transition: opacity 0.3s ease;
}

.search-item__image a:hover {
    opacity: 0.9;
}

.search-item__image img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
}

.search-item__stock {
    flex: 1;
    color: var(--color-gray-700);
    font-size: 14px;
	height: 120px;
}

.stock-total {
    margin-bottom: 10px;
    background-color: #f3f3f3;
    border-radius: 5px;
    padding: 0 12px;
    color: #888888;
    font-weight: bold;
    width: 85%;
}

.stock-total .icon {
    width: 16px;
    height: 16px;
}

.stock-details {
    margin-bottom: 5px;
    width: 85%;
}

.stock-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    line-height: 1.4;
}

.stock-name {
    text-align: left;
}

.stock-amount {
    text-align: right;
}

.stock-amount.stock-low {
    color: #f1c40f;
    font-weight: bold;
}

.stock-amount.stock-high {
    color: green;
    font-weight: bold;
}

.stock-CML2_ARTICLE {
    font-size: 12px;
    background-color: #f3f3f3;
    border-radius: 5px;
    text-align: center;
    padding: 0 12px;
    color: #888888;
    font-weight: bold;
    margin-top: 10px;
    width: 85%;
}

.search-item__content {
    flex: 1;
}

.search-item__title {
    color: var(--main-color);
    font-size: 18px;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.search-item__description {
    color: var(--color-gray-700);
    font-size: 14px;
    margin-bottom: 10px;
}

.search-item__price {
    color: green;
    font-weight: 600;
    margin-bottom: 5px;
}

.search-item__section {
    color: var(--color-gray-700);
    font-size: 14px;
    margin-bottom: 5px;
}

.search-item__section a {
    color: var(--main-color);
    text-decoration: underline;
    text-decoration-color: rgba(var(--main-color), 0.5);
    text-decoration-thickness: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.3s ease, text-decoration-color 0.3s ease;
    display: inline-block;
}

.search-item__section a:hover {
    background-color: rgba(var(--main-color), 0.2);
    text-decoration-color: var(--main-color);
}

.search-sorting {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-gray-200);
}

.search-sorting a {
    color: var(--main-color);
    text-decoration: none;
}

.search-sorting .active {
    color: var(--color-gray-700);
    font-weight: 600;
}

.search-item--section {
    display: flex;
    flex-direction: column;
    padding: 5px; /* Уменьшаем внутренние отступы */
    background: #fff;
    border-radius: 8px; /* Уменьшаем радиус для компактности */
    box-shadow: 0 1px 5px rgba(0,0,0,0.05); /* Уменьшаем тень */
    transition: all 0.3s ease;
}

.search-item--section:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-item--section .search-item__image {
    display: flex;
    justify-content: center; /* Картинка по центру */
	align-items: center;
    margin-bottom: 5px; /* Уменьшаем отступ под картинкой */
}

.search-item--section .search-item__image a {
    display: block;
	text-align: center;
    transition: opacity 0.3s ease;
}

.search-item--section .search-item__image img {
    width: 50px; /* Уменьшаем размер картинки */
    height: 50px;
    object-fit: contain;
    border-radius: 6px; /* Уменьшаем радиус картинки */
	margin: 0 auto;
}

.search-item--section .search-item__image a:hover {
    opacity: 0.9;
}

.search-item--section .search-item__content {
    text-align: center;
}

.search-item--section .search-item__title {
    font-size: 14px; /* Уменьшаем размер текста */
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500; /* Уменьшаем жирность текста */
    margin-bottom: 0; /* Убираем отступ под текстом */
    display: block;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .search-sections {
        grid-template-columns: repeat(3, 1fr); /* 3 раздела в ряд */
    }
    .search-items {
        grid-template-columns: repeat(2, 1fr); /* 2 товара в ряд */
    }
}

@media (max-width: 768px) {
    .search-sections {
        grid-template-columns: 1fr; /* 1 раздел в ряд */
    }
    .search-items {
        grid-template-columns: 1fr; /* 1 товар в ряд */
    }
    .search-item--section {
        flex-direction: row; /* Фото слева, название справа */
        align-items: center;
        padding: 10px;
		max-height: 70px;
    }
    .search-item--section .search-item__image {
        margin-bottom: 0;
        margin-right: 15px; /* Отступ между фото и текстом */
        justify-content: flex-start;
    }
    .search-item--section .search-item__content {
        text-align: left; /* Выравнивание текста слева */
		height: 55px;
        flex: 1;
    }
    .search-item__image {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        height: 150px;
    }
    .search-item__image a {
        flex: 0 0 40%;
    }
    .search-item__image img {
        width: 100%;
        height: 150px;
        object-fit: contain;
    }
    .search-item__stock {
        flex: 0 0 60%;
        text-align: center;
        padding-top: 27px;
    }
    .search-item__content {
        padding-top: 55px;
    }
    .smartsearch-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .search-sections {
        grid-template-columns: 1fr;
    }
    .search-items {
        grid-template-columns: 1fr;
    }
    .search-item--section .search-item__image img {
        width: 80px; /* Уменьшаем фото на маленьких экранах */
        height: 80px;
    }
}