#altop_search_desktop {
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: "Open Sans", sans-serif;
}

#altop_search_desktop form {
    position: relative;
    width: 100%;
}

#altop_search_desktop .icon-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.6;
}

#altop_search_desktop .searching-input {
    width: 100%;
    height: 48px;
    padding: 0 150px 0 44px;
    font-size: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

#altop_search_desktop .searching-input:focus {
    outline: none;
    border-color: #09B0D4;
    box-shadow: 0 0 0 4px rgba(9,176,212,0.15);
}

.input-group {
    position: relative;
}

.clear-input-btn {
    position: absolute;
    right: 110px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #aaa;
    cursor: pointer;
    display: none;
    padding: 0 8px;
    line-height: 1;
    z-index: 2000;
    transition: color 0.2s ease, transform 0.2s ease;
}

.clear-input-btn:hover {
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.clear-input-btn:active {
    transform: translateY(-50%) scale(0.95);
}
/* BEFORE / AFTER isolation classes */
.before-search-subtitle,
.after-search-subtitle {
    font-weight: 600;
    font-size: 14px;
    color: #09B0D4;
    margin-bottom: 8px;
}

#altop_search_desktop .input-group .btn.btn-primary {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #09B0D4, #07a0c3);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
    z-index: 10;
}
.search-content {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 1000;
    animation: jellyShow 0.25s ease;
    overflow: auto;
    box-sizing: border-box;
}

.main-block-menu {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    align-items: flex-start;
}

#brands-block .brand-item {
    display: flex;
    align-items: center;
}

#brands-block .brand-item .brand-logo {
    display: block;
    width: 48px;
    height: 28px;
    object-fit: contain;
}

/* Популярные запросы */
.popular-searches {
    margin-top: 12px;
}

.popular-searches-title {
    font-size: 14px;
    font-weight: 600;
    color: #006d3c;
    margin-bottom: 8px;
}

.popular-searches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-divider {
    height: 1px;
    background: #2AB0D436;
    margin: 12px 0;
    border-radius: 1px;
}

.search-divider.slim {
    height: 1px;
    background: linear-gradient(90deg, rgba(0,0,0,0.04), rgba(0,0,0,0));
    margin: 10px 0;
}

.bottom-blocks {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.before-sections-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.before-section-chip {
    display: inline-block;
    padding: 6px 10px;
    background: #f5f7f8;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.before-section-chip:hover {
    background: #e6f5ec;
    color: #006d3c;
}

.before-brands-list {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 4px;
}

.before-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    text-decoration: none;
}

.before-brand img {
    height: 28px;
    width: auto;
    display: block;
    object-fit: contain;
}

.popular-search-chip {
    display: inline-block;
    padding: 6px 10px;
    color: #000;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease, transform 0.08s ease;
}

.popular-search-chip:hover {
    background: #e6f5ec;
    color: #006d3c;
}

.search-dropdown {
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
}

.search-subtitle {
    font-weight: 600;
    font-size: 14px;
    color: #09B0D4;
    margin-bottom: 8px;
}

.search-col{
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-item a,
.brand-item a,
.suggestion-item a {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.section-item a:hover,
.brand-item a:hover,
.suggestion-item a:hover {
    background: #e6f5ec;
    color: #006d3c;
}

.tovar-items {
    position: relative;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    transition: box-shadow 0.25s ease, transform 0.15s ease;
    width: 50%;
}

.tovar-item-search {
    position: relative;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    transition: box-shadow 0.25s ease, transform 0.15s ease;
}

.tovar-items:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tovar-link{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tovar-img {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tovar-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* BEFORE/AFTER specific tovar image rules (kept separate from general .tovar-img) */
.after-tovar-img {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.before-tovar-img{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 75%;
}

.before-tovar-img img,
.after-tovar-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tovar-info {
    flex: 1;
    padding: 8px 4px;
}

.tovar-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    margin-bottom: 4px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tovar-price {
    font-size: 14px;
    font-weight: 700;
    color: #09B0D4;
}

/* BEFORE/AFTER specific name/price rules */
.before-tovar-name,
.after-tovar-name {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    margin-bottom: 4px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.before-tovar-price,
.after-tovar-price {
    font-size: 14px;
    font-weight: 700;
    color: #09B0D4;
}

.recent-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.2px;
    user-select: none;
}

.recent-title span {
    color: #09B0D4;
    font-weight: 600;
}

.divider {
    flex: 1;
    height: 1px;
    margin-left: 10px;
    background: linear-gradient(90deg, rgba(9,176,212,0.25), transparent);
}

.popular-recently{
    height: 100%;
}

.recent-grid {
    display: flex;
    height: 100%;
    gap: 15px;
}

.recent-tovar-item {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.recent-tovar-item:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.recent-tovar-img {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

.recent-tovar-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.recent-tovar-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #222;
}

.recent-tovar-desc {
    font-size: 12px;
    color: #666;
}

.recent-tovar-price {
    font-size: 14px;
    font-weight: 700;
    color: #09B0D4;
}

.history-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #09B0D4;
}

.history-clear-btn {
    background: none;
    border: none;
    color: #09B0D4;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
}

.history-clear-btn:hover {
    color: #006d3c;
}

/* AFTER results header (shows above quick results) */
.after-results-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 12px 6px;
}

.after-results-title .results-count {
    margin-left: 6px;
    color: #09B0D4;
    font-weight: 700;
}

.show-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, #09B0D4, #07a0c3);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.show-all-btn:hover {
    background: linear-gradient(135deg, #07a0c3, #09B0D4);
    color: #ffffff;
}


.after-sections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.after-brands-list {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 4px;
}


.section-item-wrap,
.brand-item-wrap {
    display: flex;
    align-items: center;
}

.after-brands-list .brand-item-wrap {
    flex: 0 0 auto;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.history-item {
    display: flex;
    height: 32px;
    width: fit-content;
    background: #F3F3F7;
    color: #39393d;
    border-radius: 6px;
    padding: 0 8px;
    cursor: pointer;
    transition: all ease-out .3s;
    align-items: center;
}

.history-item:hover {
    background: #e6f5ec;
    color: #006d3c;
}

.search-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 10px;
    color: #555;
    font-size: 14px;
}

.search-loader .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #09B0D4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes jellyShow {
    0% { opacity: 0; transform: translateY(-10px) scaleY(0.95); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}


.section-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 6px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

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

.search-result-list li{
    list-style-type: none;
}

.search-result-list .result-item{
    padding: 7px;
    width: 100%;
    border-radius: 10px;
    background: #f3f3f7;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all ease-out .1s;
    cursor: pointer;
}

.search-result-list .result-item:hover{
    background: #e6f5ec;
    transform: scale(1.01);
}

.search-result-list .result-item .title-searchs-result{
    color: #000;
    width: 100%;
}

.search-result-list .result-item:hover.title-searchs-result{
    width: 100%;
    color: #006d3c;
}

.search-result-list .result-item img{
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 10px;
}

.search-result-list .result-item .brand-logo-result{
    text-decoration: none;
}

.search-result-list .result-item .brand-logo-result .brand-logo-result-img{
    width: 48px;
    height: 48px;
    object-fit: contain;
}