/* Wrapper posisi */
.search-wrapper {
    position: fixed;
    bottom: 80px; /* pastikan di atas menu */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}


/* Box pencarian */
.search-box {
    background: linear-gradient(135deg, #1717D0, #02033A); /* ✅ Biru gradient */
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Saat tampil */
.search-box.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Input Search */
.search-box input#product-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px; /* ruang untuk ikon */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px !important; /* ✅ Border input */
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.2); /* semi transparan */
    color: #fff;
    transition: box-shadow 0.3s ease, border 0.3s ease;
}

.search-box input#product-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Efek fokus */
.search-box input#product-search-input:focus {
    border-color: #fff !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Ikon Search di dalam input */
.search-box::before {
    content: '';
    position: absolute;
    top: 34px; /* posisikan sejajar input */
    left: 24px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M21 20l-5.6-5.6a7 7 0 10-1.4 1.4L20 21l1-1zM4 10a6 6 0 1112 0 6 6 0 01-12 0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* Rekomendasi hasil pencarian */
.suggestions-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    max-height: 220px;
    overflow-y: auto;
    margin: 4px 0 0;
    list-style: none;
    padding: 0;
    display: none;
}

.suggestions-list.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.suggestions-list li {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
    transition: background 0.2s ease;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover {
    background: #f5f9ff;
    color: #0073e6;
}

/* Animasi fade */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Wrapper posisi floating search box */
.search-wrapper {
    position: fixed;
    bottom: 80px; /* di atas menu bar bawah */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

/* Box pencarian */
.search-box {
    background: linear-gradient(135deg, #1717D0, #02033A);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    width: 320px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Saat tampil */
.search-box.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Input Search */
.search-box input#product-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px; 
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Placeholder */
.search-box input#product-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Fokus input */
.search-box input#product-search-input:focus {
    border-color: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Ikon Search di dalam input */
.search-box::before {
    content: '';
    position: absolute;
    top: 34px;
    left: 24px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M21 20l-5.6-5.6a7 7 0 10-1.4 1.4L20 21l1-1zM4 10a6 6 0 1112 0 6 6 0 01-12 0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* Suggestions list */
.suggestions-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    max-height: 220px;
    overflow-y: auto;
    margin: 4px 0 0;
    list-style: none;
    padding: 0;
    display: none;
}

.suggestions-list.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.suggestions-list li {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
    transition: background 0.2s ease;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover {
    background: #f5f9ff;
    color: #0073e6;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px);}
    to { opacity: 1; transform: translateY(0);}
}
