/* =========================================================
   PRODUCTION SEARCH BAR + AUTOCOMPLETE DROPDOWN
   Clean layering • No seam lines • Sticky-nav safe
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;600;700&display=swap');

/* -------------------------
   ROOT WRAPPER
------------------------- */
.search_wrap {
    width: 100%;
    max-width: 600px;
    margin: 10px auto;
    padding: 0 15px;
    position: relative;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

/* -------------------------
   SEARCH BOX (PILL)
------------------------- */
.search_wrap .search_box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 46px;

    background: #ffffff;

    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 50px;

    overflow: hidden;

    box-shadow: 0 2px 6px rgba(0,0,0,0.06);

    position: relative;
    z-index: 20; /* sits above dropdown edge */
}

/* -------------------------
   INPUT FIELD
------------------------- */
.search_wrap .search_box .input {
    flex: 1;
    height: 100%;

    border: none;
    outline: none;
    background: transparent;

    padding: 0 18px;

    font-size: 16px;
    color: #111;
}

.search_wrap .search_box .input::placeholder {
    color: #888;
}

/* -------------------------
   SEARCH BUTTON
------------------------- */
.search_wrap .search_box .btn {
    width: 58px;
    height: 100%;

    border: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #007bff;
    color: #ffffff;

    transition: background 0.25s ease;
}

.search_wrap .search_box .btn:hover {
    background: #005ecb;
}

.search_wrap .search_box .btn i {
    font-size: 18px;
}

/* -------------------------
   AUTOCOMPLETE DROPDOWN
------------------------- */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 6px); /* gap prevents border seam */
    left: 0;
    right: 0;

    width: 100%;

    background: #ffffff;

    list-style: none;
    padding: 6px 0;
    margin: 0;

    border-radius: 22px;

    border: 1px solid rgba(0,0,0,0.08);

    box-shadow: 0 14px 30px rgba(0,0,0,0.12);

    max-height: 260px;
    overflow-y: auto;

    z-index: 15;

    display: none; /* shown by JS */
}

/* show state (toggle via JS) */
.autocomplete-list.active {
    display: block;
}

/* -------------------------
   AUTOCOMPLETE ITEMS
------------------------- */
.autocomplete-list li {
    padding: 12px 18px;

    font-size: 15px;
    color: #333;

    cursor: pointer;

    transition: background 0.18s ease;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
    background: #f3f6f9;
}

/* empty state */
.autocomplete-list li.no-results {
    color: #999;
    cursor: default;
}

/* -------------------------
   SCROLLBAR (OPTIONAL)
------------------------- */
.autocomplete-list::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* -------------------------
   MOBILE OPTIMIZATION
------------------------- */
@media (max-width: 768px) {

    .search_wrap {
        margin: 6px auto;
        padding: 0 10px;
    }

    .search_wrap .search_box {
        height: 42px;
    }

    .search_wrap .search_box .input {
        font-size: 14px;
        padding: 0 14px;
    }

    .search_wrap .search_box .btn {
        width: 50px;
    }

    .autocomplete-list {
        top: calc(100% + 5px);
        border-radius: 18px;
        max-height: 220px;
    }

    .autocomplete-list li {
        padding: 11px 14px;
        font-size: 14px;
    }
}

/* -------------------------
   STICKY HEADER SAFETY
   (prevents overlap artifacts)
------------------------- */
header,
.sticky-nav,
.category-filter {
    z-index: 10;
}
