.header__search svg .hover {
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.header__search:hover svg .hover {
    opacity: 1;
}

.search-modal {
    position: fixed;
    inset: 0;
    background-color: #fff;
    z-index: 1000;
    width: 100%;
    height: 100%;
    /* display: none; */
    /* По умолчанию скрыто */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.search-modal--active {
    display: block;
}

.search-modal__wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.search-modal__close:hover {
    opacity: 0.7;
}

.search-modal__content {
    width: 100%;
    height: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 20px;
    margin: 0 auto;
}

.search-modal__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-modal__input-wrapper .button-send {
    background: #000;
    color: #fff;
    padding: 10px;
    border: 1px solid #000;
    cursor: pointer;
}

.search-modal__input-wrapper-inner {
    position: relative;
    width: 100%;
}

.search-modal__quick-results {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 16px;
    top: 81px;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 10;
    padding: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.search-modal__quick-results-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-modal__quick-results-item:last-child {
    border-bottom: none;
}

.search-modal__quick-results-item:hover {
    background-color: #f9fafb;
}

.search-modal__quick-results-item img {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    object-fit: cover;
    background-color: #f9f9f9;
    font-size: 8px;
    font-weight: 400;
}

.search-modal__quick-results-item-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 1;
}

.search-modal__quick-results-item-title span:first-child {
    font-size: 18px;
    font-weight: 700;
}

.search-modal__quick-results-item-title small {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.search-modal__content input {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.35);
    padding: 24px 8px;
    outline: none;
    font-weight: 700;
    color: #000;
    padding-right: 68px;
    font-size: 24px;
    letter-spacing: -.03em;
}

.search-modal__content input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.search-modal__buttons {
    position: absolute;
    right: 0;
    display: flex;
    gap: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.search-modal__button {
    width: 24px;
    height: 24px;
    color: #000;
    transition: all 0.3s ease-in-out;
}

.search-modal__button:hover {
    opacity: 0.7;
}

.search-modal__input-file {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.search-modal__input-file-uploader {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-modal__input-file-drop-zone {
    position: relative;
    border: 1px dashed #ccc;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.search-modal__input-file-drop-zone.drag-over {
    border-color: #000;
    background-color: rgba(0, 0, 0, 0.05);
}

.search-modal__input-file-drop-zone svg {
    width: 48px;
    height: 48px;
}

.search-modal__input-file-drop-zone p {
    font-size: 14px;
    color: #000;
}

.search-modal__input-file-drop-zone:hover,
.search-modal__input-file-drop-zone.dragover {
    border-color: #666;
    background-color: #f9f9f9;
}

.search-modal__input-file-drop-zone svg {
    margin-bottom: 16px;
    color: #c7c7c7;
}

.search-modal__input-file-drop-zone:hover svg {
    color: #000;
}

.search-modal__input-file-drop-zone p {
    margin: 0 !important;
    color: #000;
}

.search-modal__input-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.search-modal__input-file-separator {
    position: relative;
    color: #666;
    font-size: 14px;
    padding: 0 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal__input-file-separator div {
    padding: 12px 4px;
    background-color: #fff;
    z-index: 1;
    font-size: 12px;
    text-transform: uppercase;
}

.search-modal__input-file-separator:before {
    content: '';
    display: block;
    width: 1px;
    height: 100%;
    background-color: #c7c7c7;
    position: absolute;
    left: 50%;
    top: 0;
}

.search-modal__input-file-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

.search-modal__input-file-link input {
    width: 100%;
    padding: 12px;
    border: 1px solid #c7c7c7;
    font-size: 14px;
    font-weight: 400;
}

.search-modal__input-file-link-button {
    padding: 12px;
    border: 1px solid #000;
    background-color: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
}

.search-modal__input-file-link-button:hover {
    background-color: #333;
    border-color: #333;
}

.search-modal__input-file-link input:focus {
    border-color: #666;
}

.search-modal__input-file--active {
    display: flex;
}

.search-modal__input-file-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.search-modal__input-file-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: transparent;
    padding: 8px;
    transition: all 0.3s ease-in-out;
    border: 1px solid #000;
    color: #000;
}

.search-modal__input-file-button:first-child {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.search-modal__input-file-button:first-child:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
    opacity: 0.7;
}

.search-modal__input-file-button:hover {
    color: #fff;
    border-color: #000;
    background-color: #000;
}

.search-modal__input-file-button svg {
    width: 64px;
    height: 64px;
}

.search-modal__input-file-preview {
    width: 100%;
    height: 100%;
}

.search-modal__input-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-results__item--news {
    display: block;
    padding: 15px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.search-results__item--news:hover {
    background-color: #f9f9f9;
}

.search-results__item-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.search-results__item-text {
    font-size: 16px;
    color: #000;
    margin-bottom: 5px;
}

.search-results__item-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Стили для выделенного текста в результатах поиска */
.search-results__item b {
    background-color: #fff3cd;
    font-weight: normal;
}

/* Стили для превью */
.file-preview-container {
    position: absolute;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.preview-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-image-wrapper img {
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);
    object-fit: contain;
}

.remove-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 4;
}

.remove-preview:hover {
    background: #333;
}

/* Стили для индикатора загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Модификация стилей drop-zone при наличии превью */
.search-modal__input-file-drop-zone.has-preview {
    position: relative;
}

.search-modal__input-file-drop-zone.has-preview>*:not(.file-preview-container) {
    opacity: 0;
}

/* Скрываем основной контент при наличии превью */
.search-modal__input-file-drop-zone.has-preview .search-modal__input-file-content {
    opacity: 0;
    pointer-events: none;
}

.search-modal__input-file-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1;
}

.search-results__list.catalog__list {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.search-results__list.catalog__list h2 {
    font-weight: 500;
    font-size: 18px;
    grid-column: -1 / 1;
    margin-bottom: 0;
}

.search-modal__preview {
    position: relative;
}

.search-modal__preview img {
    max-height: 160px;
}

.search-modal__preview-clear {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.3s ease;
}

.search-modal__preview-clear:hover {
    background: rgba(0, 0, 0, 0.7);
}

.search-modal__preview-clear svg {
    width: 16px;
    height: 16px;
}

.search-modal__loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-modal__loader span {
    display: block;
    width: 10px;
    height: 10px;
    background: #000;
    animation: blink 0.6s infinite;
}

.search-modal__loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.search-modal__loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .search-modal__close {
        top: 10px;
        right: 10px;
    }

    .search-modal__content input {
        padding-left: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 16px;
    }

    .search-modal__content {
        gap: 8px;
        padding: 32px 10px;
    }

    .search-modal__input-file {
        flex-direction: column;
    }

    .search-modal__input-file-separator {
        height: 20px;
        width: 100%;
    }

    .search-modal__input-file-separator div {
        padding: 0 20px;
    }

    .search-modal__input-file-separator:before {
        height: 1px;
        width: 100%;
        left: 0;
        top: 50%;
    }
}

.search-modal__button-voice {
    opacity: 1;
}

.search-modal__button-voice:hover {
    opacity: 1;
}

.search-modal__button-voice.recording {
    opacity: 1;
}

.search-modal__button-voice.recording:hover {
    opacity: 0.5;
}

.search-results__section {
    margin-bottom: 30px;
    width: 100%;
}

.search-results__section:last-child {
    margin-bottom: 0;
}

.search-results__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.search-results__products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.search-results__news {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

a.search-results__item.search-results__item--news {
    padding: 8px 0;
    border: none;
    margin: 0;
}

@media (max-width: 768px) {
    .search-results__products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .catalog__item--sm {
        margin: 0;
    }

    .catalog-card__title {
        font-size: 14px;
        line-height: 1.3;
    }

    .catalog-card__article {
        font-size: 12px;
    }

    .catalog-card__price {
        font-size: 14px;
    }

    .search-modal__quick-results {
        max-height: calc(100vh - 75px);
        top: 45px;
    }
}

@media (max-width: 480px) {
    .search-results__products {
        gap: 8px;
    }
}

.search-modal__quick-results-title {
    padding: 8px 0;
    font-weight: 500;
    color: #667085;
    font-size: 14px;
}

.search-modal__quick-results-separator {
    margin: 8px 0;
}

.search-modal__quick-results-item--news {
    padding-left: 0;
    cursor: pointer;
}

.search-modal__quick-results-item--news:hover {
    background-color: #f9fafb;
}

.search-modal__quick-results-item--news .search-modal__quick-results-item-title {
    padding: 4px 0;
}

.search-modal__quick-results-item--news .search-modal__quick-results-item-title-text {
    font-weight: 400 !important;
}

.search-modal__quick-results-item--news .search-modal__quick-results-item-date {
    color: #667085;
    font-size: 12px;
    order: -1;
    margin-bottom: 4px;
}

/* Стилизуем скроллбар для современных браузеров */
.search-modal__quick-results::-webkit-scrollbar {
    width: 8px;
}

.search-modal__quick-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-modal__quick-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.search-modal__quick-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Стили для полных результатов поиска */
.search-results__full-section {
    margin-bottom: 30px;
    width: 100%;
}

.search-results__full-section:last-child {
    margin-bottom: 0;
}

.search-results__full-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.search-results__products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

.search-results__full-news {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

a.search-results__full-item.search-results__full-item--news {
    padding: 8px 0;
    border: none;
    margin: 0;
}

@media (max-width: 768px) {
    .search-results__products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .search-results__products-grid {
        gap: 8px;
    }
}