/* =====================================================
   SEARCH INPUT (desktop + mobile)
   ===================================================== */
:root {
    --ss-main: #005862;
    --ss-tint: #f1f9fa;
}

.search-box .ss-form {
    width: 100%;
    margin: 0;
}
.search-box .ss-field {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-box .ss-field .searchInput {
    width: 100%;
    height: 40px;
    padding: 0 64px 0 20px;
    border: 1px solid var(--ss-main);
    border-radius: 999px;
    background: var(--ss-tint);
    color: #12343a;
    font-size: 14px;
    box-shadow: none;
    outline: none;
    transition:
        box-shadow 0.2s,
        background 0.2s;
}
.search-box .ss-field .searchInput:focus {
    background: #fff;
    border-color: var(--ss-main);
    box-shadow: 0 0 0 3px rgba(0, 88, 98, 0.16);
}

/* typing animation text (placeholder overlay) */
.search-box .typing-placeholder {
    position: absolute;
    left: 20px;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    color: #6f9399;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 3;
}
.search-box .typingText {
    color: var(--ss-main);
    font-weight: 500;
}
.search-box .typingText::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 1em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--ss-main);
    animation: ssBlink 0.9s steps(1) infinite;
}
@keyframes ssBlink {
    50% {
        opacity: 0;
    }
}

/* search button */
.search-box .ss-btn {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 4;
    width: 58px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    border-radius: 0 999px 999px 0;
    background: var(--ss-main);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.search-box .ss-btn:hover {
    background: #004149;
}

/* =====================================================
   DROPDOWN RESULTS
   ===================================================== */
.search-box .searchResults {
    position: absolute;
    top: 84%;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    max-height: 440px !important;
    margin-top: 6px;
    padding: 6px 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.search-box .searchResults:empty {
    display: none;
}

.ss-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    text-decoration: none !important;
    transition: background 0.15s;
}
.ss-item:hover,
.ss-item.is-active {
    background: #faf3f7;
}

.ss-img {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 8px;
    object-fit: cover;
    background: #f2f2f2;
}
.ss-name {
    flex: 1;
    min-width: 0;
    color: #005862;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ss-price {
    text-align: right;
    flex: 0 0 auto;
    font-family: "Rubik", sans-serif;
    line-height: 1.2;
}
.ss-final {
    display: block;
    color: #005862;
    font-weight: 600;
    font-size: 15px;
    font-family: "Rubik", sans-serif;
}
.ss-old {
    display: block;
    color: #9a9a9a;
    font-size: 12px;
    font-weight: 400;
    text-decoration: line-through;
    font-family: "Rubik", sans-serif;
}
.ss-badge {
    display: inline-block;
    margin-bottom: 3px;
    background: #e8f7ee;
    color: #12843f;
    font-family: "Rubik", sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
}

.ss-all {
    display: block;
    text-align: center;
    margin: 4px 4px 0;
    padding: 6px 0 6px;
    border-top: 1px solid #eee;
    border-radius: 30px;
    color: #111;
    background: #ddd;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
}
.ss-all:hover {
    color: #fff;
    background-color: #005862;
}

.ss-empty {
    padding: 18px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* skeleton */
.ss-sk {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
}
.ss-sk i,
.ss-sk b {
    display: block;
    border-radius: 6px;
    background: linear-gradient(90deg, #eee 25%, #f7f7f7 37%, #eee 63%);
    background-size: 400% 100%;
    animation: ssShimmer 1.2s ease infinite;
}
.ss-sk i {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 8px;
}
.ss-sk .l {
    flex: 1;
}
.ss-sk .l b {
    height: 11px;
    margin: 5px 0;
}
.ss-sk .l b:first-child {
    width: 80%;
}
.ss-sk .l b:last-child {
    width: 45%;
}
.ss-sk .r {
    width: 56px;
    height: 14px;
}
@keyframes ssShimmer {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

/* =====================================================
   MOBILE
   ===================================================== */
@media (max-width: 991.98px) {
    .search-box.d-lg-none {
        margin-top: 12px;
    }
    .search-box .searchResults {
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 62vh !important;
        border-radius: 12px !important;
    }
    .search-box .ss-field .searchInput {
        margin-top: 0;
        height: 36px;
        font-size: 13px;
    }
    .search-box .typing-placeholder {
        font-size: 14px;
        left: 18px;
    }
    .ss-item {
        padding: 8px 10px;
        gap: 10px;
    }
    .ss-img {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
    .ss-name {
        font-size: 13px;
    }
    .ss-final {
        font-size: 14px;
    }
    .ss-old {
        font-size: 11px;
    }
}
