/* =========================================================
   Search suggestion dropdown (header live search)
   ========================================================= */

.search-wrapper.search-appear {
    /* the wrapper is clipped (overflow:hidden + max-height) while collapsed,
       so it has to release the clip while open or the panel stays invisible */
    overflow: visible;
    /* stay above slideshow/banner content (.content-absolute, .arrow-slider use z-index 9) */
    z-index: 100;
}

.items-zone {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1140px;
    z-index: 999;
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(17, 17, 26, 0.12), 0 4px 12px rgba(17, 17, 26, 0.06);
    overflow: hidden;
    animation: itemsZoneIn 0.18s ease-out;
}

.items-zone.is-open {
    display: block;
}

@keyframes itemsZoneIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.items-zone .items-zone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f1f4;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8d93;
    font-weight: 600;
}

.items-zone .items-zone-head .items-zone-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: #b0b3b8;
}

.items-zone ul {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: min(60vh, 460px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.items-zone ul::-webkit-scrollbar {
    width: 8px;
}

.items-zone ul::-webkit-scrollbar-thumb {
    background: #d8d9de;
    border-radius: 8px;
    border: 2px solid #fff;
}

.items-zone ul::-webkit-scrollbar-thumb:hover {
    background: #bcbec4;
}

.items-zone ul li {
    list-style: none;
    position: relative;
}

.items-zone ul li + li {
    border-top: 1px solid #f4f4f6;
}

.items-zone .search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #1c1d21;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.items-zone .search-item:hover,
.items-zone .search-item:focus,
.items-zone li.is-active .search-item {
    background: #f6f7f9;
    color: #1c1d21;
    text-decoration: none;
}

.items-zone .search-item-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f6f7f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.items-zone .search-item-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.items-zone .search-item-body {
    min-width: 0;
    flex: 1 1 auto;
}

.items-zone .search-item-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
    color: #1c1d21;
    margin: 0;
    white-space: normal;
    word-break: break-word;
}

.items-zone .search-item-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #8a8d93;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.items-zone .search-item-arrow {
    flex: 0 0 auto;
    color: #c3c5cb;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.items-zone .search-item:hover .search-item-arrow,
.items-zone li.is-active .search-item-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* footer: view all results */
.items-zone .items-zone-foot {
    border-top: 1px solid #f1f1f4;
    padding: 10px 20px;
    background: #fafafb;
}

.items-zone .items-zone-foot a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #e8542f;
    text-decoration: none;
}

.items-zone .items-zone-foot a:hover {
    text-decoration: underline;
}

/* states */
.null-items,
.items-zone .items-zone-state {
    padding: 28px 20px;
    text-align: center;
    color: #8a8d93;
    font-size: 14px;
    cursor: default;
}

.items-zone .items-zone-state strong {
    color: #1c1d21;
    font-weight: 600;
}

.items-zone .search-skeleton {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
}

.items-zone .search-skeleton span {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #f1f2f4 25%, #e7e8ec 37%, #f1f2f4 63%);
    background-size: 400% 100%;
    animation: searchSkeleton 1.2s ease-in-out infinite;
}

.items-zone .search-skeleton .sk-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 10px;
}

.items-zone .search-skeleton .sk-lines {
    flex: 1 1 auto;
}

.items-zone .search-skeleton .sk-line-1 {
    height: 12px;
    width: 70%;
    margin-bottom: 8px;
}

.items-zone .search-skeleton .sk-line-2 {
    height: 12px;
    width: 40%;
}

@keyframes searchSkeleton {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@media screen and (max-width: 1200px) {
    .items-zone {
        max-width: calc(100% - 24px);
    }
}

@media screen and (max-width: 767px) {
    .items-zone {
        border-radius: 12px;
    }

    .items-zone ul {
        max-height: 65vh;
    }

    .items-zone .search-item-thumb {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
    }

    .items-zone .search-item-name {
        font-size: 13px;
    }

    .items-zone .search-item-arrow {
        display: none;
    }
}
