/* ==============================================
   Nippon Search Autocomplete — search.css
   ============================================== */
.swiper-container {
	overflow: hidden;
}
.custom-search-autocomplete > i {
	color: #fff;
    z-index: 2;
}
.custom-search-autocomplete.active {
    width: 100vw;
    opacity: .93 !important;
    z-index: 999999 !important;
}
.custom-search-autocomplete.active .search-div-product {
    position: absolute;
    top: 0;
    background: linear-gradient(180deg,rgb(70, 70, 70) 40%, rgb(207, 207, 207) 100%);
}
.custom-search-autocomplete.active ~ * {
    width: 100vw !important;
	filter: blur(6px);
}
.custom-search-autocomplete .search-div-product #search_product_ {
    margin: 100px 0 auto 0;
}
.nippon-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 580px;
    font-family: 'Sarabun', 'Prompt', sans-serif;
}

/* ── Input Row ── */
.nippon-search-input-wrap {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #d8d8d8;
    border-radius: 40px;
    padding: 0 16px;
    height: 48px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nippon-search-input-wrap:focus-within {
    border-color: #003D87;
    box-shadow: 0 0 0 3px rgba(192, 0, 0, 0.1);
}

.nippon-search-icon {
    color: #000;
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}


.nippon-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #222;
    font-family: inherit;
}

.nippon-search-input::placeholder {
    color: #aaa;
}

.nippon-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    background-color: #000;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.nippon-search-clear:hover {
    opacity: .9;
}

/* ── Dropdown ── */
.nippon-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    /* background: #ffffff; */
    background-color: transparent;
    /* border: 1px solid #e5e5e5;
    border-radius: 12px; */
    /* box-shadow: 0 8px 32px rgba(0,0,0,0.12); */
    max-width: 85%;
    margin: auto;
    z-index: 9999;
    overflow: hidden;
    animation: nippon-dropdown-in 0.18s ease;
}

@keyframes nippon-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Loading ── */
.nippon-search-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nippon-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #eee;
    border-top-color: #003D87;
    border-radius: 50%;
    animation: nippon-spin 0.7s linear infinite;
}

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

/* ── No Results ── */
.nippon-search-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ── Group ── */
.nippon-search-group {
    /* border-bottom: 1px solid #f2f2f2; */
}

.nippon-search-group:last-child {
    border-bottom: none;
}

.nippon-search-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 6px;
    font-family: "Sukhumvit Set", sans-serif !important;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nippon-search-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Sukhumvit Set", sans-serif !important;
    /* background: #f0f0f0; */
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 20px;
    padding: 1px 0;
    /* min-width: 24px; */
}

/* ── Item ── */
.nippon-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
    color: #222;
    transition: background 0.12s;
}

/* .nippon-search-item:hover,
.nippon-search-item:focus {
    background: #fff5f5;
    outline: none;
} */

.nippon-search-item-thumb {
    width: 48px;
    height: 48px;
    /* border-radius: 8px; */
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
    /* border: 1px solid #eee; */
}

.nippon-search-item-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nippon-search-item-thumb-placeholder svg {
    color: #ccc;
}

.nippon-search-item-title {
    font-size: 16px;
    line-height: 1.4;
    color: #fff;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Footer / View All ── */
.nippon-search-footer {
    padding: 10px 16px;
    /* border-top: 1px solid #f0f0f0; */
    /* text-align: center; */
}

.nippon-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid #fff;
    border-radius: 30px;
    padding: 7px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nippon-view-all-btn:hover {
    background: #003D87;
    border-color: #003D87;
    color: #ffffff;
}

.nippon-view-all-btn svg {
    transition: transform 0.15s;
}

.nippon-view-all-btn:hover svg {
    transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .nippon-search-wrapper {
        max-width: 100%;
    }

    .nippon-search-dropdown {
        border-radius: 8px;
    }

    .nippon-search-item-thumb,
    .nippon-search-item-thumb-placeholder {
        width: 40px;
        height: 40px;
    }
}
