/* =========================================================
   JV HEALTHCARE
   PREMIUM PRODUCT SEARCH INTERFACE
   CSS ONLY — HTML & JS UNCHANGED
========================================================= */


/* =========================================================
   MAIN SEARCH CONTAINER
========================================================= */

#jv-product-search {
    width: 100%;
    max-width: 1000px;
    margin: 35px auto;
    position: relative;
    z-index: 99999;
    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================================================
   SEARCH BAR
========================================================= */

#jv-product-search .jv-search-box {
    width: 100%;
    height: 72px;

    display: flex;
    align-items: center;

    padding: 8px 10px 8px 9px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #d9e3ec;

    border-radius: 20px;

    box-shadow:
        0 12px 35px rgba(20, 55, 90, 0.10),
        0 3px 8px rgba(20, 55, 90, 0.05);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


/* SEARCH BAR HOVER */

#jv-product-search .jv-search-box:hover {
    border-color: #a9bfd2;

    box-shadow:
        0 15px 40px rgba(20, 55, 90, 0.13),
        0 4px 10px rgba(20, 55, 90, 0.06);
}


/* SEARCH BAR ACTIVE */

#jv-product-search .jv-search-box:focus-within {

    border-color: #1670b7;

    box-shadow:
        0 0 0 5px rgba(22, 112, 183, 0.10),
        0 18px 45px rgba(20, 55, 90, 0.14);

    transform: translateY(-2px);
}


/* =========================================================
   SEARCH ICON
========================================================= */

#jv-product-search .jv-search-icon {

    width: 52px;
    height: 52px;

    min-width: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    background: linear-gradient(
        135deg,
        #eaf6ff,
        #d8ecfb
    );

    border-radius: 15px;

    color: #1266a3;

    font-size: 21px;

    box-shadow:
        inset 0 0 0 1px rgba(18, 102, 163, 0.08);
}


/* =========================================================
   SEARCH INPUT
========================================================= */

#jvSearchInput {

    flex: 1;

    width: 100%;
    height: 54px;

    padding: 0 8px;

    border: none !important;
    outline: none !important;

    background: transparent !important;

    box-shadow: none !important;

    color: #172b3a;

    font-family: "Segoe UI", Arial, sans-serif;

    font-size: 17px;

    font-weight: 500;

    letter-spacing: 0.5px;
}


/* PLACEHOLDER */

#jvSearchInput::placeholder {

    color: #8a9baa;

    opacity: 1;

    font-size: 15px;

    font-weight: 400;
}


/* =========================================================
   CLEAR BUTTON
========================================================= */

#jvClearSearch {

    width: 46px;
    height: 46px;

    min-width: 46px;

    display: flex;
    align-items: relative;
    justify-content: center;

    margin-left: 7px;

    padding: 0;

    
    border-radius: 13px;

    color: #8a9aaa;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


#jvClearSearch:hover {

    background: #edf3f8 !important;

    color: #17405f;

    transform: rotate(90deg);
}


/* =========================================================
   SEARCH RESULTS DROPDOWN
========================================================= */

#jvSearchResults {

    position: absolute;

    top: calc(100% + 12px);

    left: 0;
    right: 0;

    width: 100%;

    max-height: 450px;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 7px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #dce5ed;

    border-radius: 18px;

    box-shadow:
        0 25px 60px rgba(15, 45, 75, 0.16),
        0 6px 18px rgba(15, 45, 75, 0.07);

    z-index: 999999;

    scrollbar-width: thin;

    scrollbar-color: #9db2c3 #f2f6f9;
}


/* =========================================================
   RESULT SCROLLBAR
========================================================= */

#jvSearchResults::-webkit-scrollbar {
    width: 9px;
}

#jvSearchResults::-webkit-scrollbar-track {
    background: #f3f6f9;
    border-radius: 20px;
}

#jvSearchResults::-webkit-scrollbar-thumb {
    background: #9eb4c5;
    border-radius: 20px;
    border: 2px solid #f3f6f9;
}

#jvSearchResults::-webkit-scrollbar-thumb:hover {
    background: #66879d;
}


/* =========================================================
   PRODUCT RESULT CARD
========================================================= */

#jvSearchResults .jv-product-result {

    display: block;

    position: relative;

    padding: 17px 20px;

    margin: 2px 0;

    background: #ffffff;

    border-bottom: 1px solid #edf2f6;

    border-radius: 12px;

    text-decoration: none !important;

    color: inherit;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* HOVER */

#jvSearchResults .jv-product-result:hover {

    background: linear-gradient(
        90deg,
        #f2f9ff,
        #ffffff
    );

    transform: translateX(4px);

    box-shadow:
        inset 4px 0 0 #1473b5;
}


/* =========================================================
   PRODUCT NAME
========================================================= */

#jvSearchResults .jv-product-name {

    margin-bottom: 6px;

    color: #123d60;

    font-size: 17px;

    font-weight: 700;

    line-height: 1.35;
}


#jvSearchResults .jv-product-result:hover .jv-product-name {

    color: #126ca9;
}


/* =========================================================
   COMPOSITION
========================================================= */

#jvSearchResults .jv-product-composition {

    margin-bottom: 8px;

    color: #66798a;

    font-size: 13px;

    line-height: 1.55;
}


/* =========================================================
   CATEGORY
========================================================= */

#jvSearchResults .jv-product-category {

    display: inline-block;

    margin-right: 6px;

    padding: 5px 10px;

    background: #f1f6fa;

    border: 1px solid #e1eaf1;

    border-radius: 7px;

    color: #597184;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;
}


/* =========================================================
   MRP
   This styles MRP if your existing JS already outputs it.
========================================================= */

#jvSearchResults .jv-product-mrp {

    display: inline-block;

    margin-top: 6px;

    padding: 5px 11px;

    background: #fff4f4;

    border: 1px solid #ffdede;

    border-radius: 7px;

    color: #c62828;

    font-size: 13px;

    font-weight: 700;
}


/* =========================================================
   NO RESULTS
========================================================= */

#jvSearchResults .jv-no-results {

    padding: 40px 20px;

    text-align: center;

    color: #718394;

    font-size: 14px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    #jv-product-search {

        width: calc(100% - 24px);

        margin: 22px auto;
    }


    #jv-product-search .jv-search-box {

        height: 60px;

        border-radius: 16px;

        padding: 6px 7px 6px 8px;
    }


    #jv-product-search .jv-search-icon {

        width: 44px;
        height: 44px;

        min-width: 44px;

        margin-right: 9px;

        border-radius: 12px;

        font-size: 18px;
    }


    #jvSearchInput {

        height: 44px;

        font-size: 15px;
    }


    #jvSearchInput::placeholder {

        font-size: 13px;
    }


    #jvClearSearch {

        width: 39px;
        height: 39px;

        min-width: 39px;

        font-size: 23px;
    }


    #jvSearchResults {

        top: calc(100% + 9px);

        max-height: 380px;

        padding: 5px;

        border-radius: 15px;
    }


    #jvSearchResults .jv-product-result {

        padding: 14px;

        border-radius: 10px;
    }


    #jvSearchResults .jv-product-name {

        font-size: 15px;
    }


    #jvSearchResults .jv-product-composition {

        font-size: 12px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    #jv-product-search {

        width: calc(100% - 16px);
    }


    #jv-product-search .jv-search-icon {

        width: 40px;
        height: 40px;

        min-width: 40px;

        margin-right: 7px;
    }


    #jvSearchInput {

        font-size: 14px;
    }


    #jvSearchInput::placeholder {

        font-size: 12px;
    }
}
/* =========================================================
   PRODUCT CATEGORY FILTERS
========================================================= */

.jv-search-filters {

    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 13px;

    padding: 4px 2px;

    overflow-x: auto;

    scrollbar-width: none;

    white-space: nowrap;
}

.jv-search-filters::-webkit-scrollbar {
    display: none;
}


/* FILTER BUTTON */

.jv-filter {

    flex: 0 0 auto;

    padding: 9px 16px;

    border: 1px solid #dce6ee;

    border-radius: 50px;

    background: #ffffff;

    color: #526779;

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;

    box-shadow: 0 2px 6px rgba(15,45,75,0.04);
}


/* HOVER */

.jv-filter:hover {

    border-color: #8db5d2;

    color: #126ca9;

    background: #f4faff;

    transform: translateY(-1px);
}


/* ACTIVE */

.jv-filter.active {

    background: linear-gradient(
        135deg,
        #126ca9,
        #0b527f
    );

    border-color: #126ca9;

    color: #ffffff;

    box-shadow:
        0 5px 14px rgba(18,102,163,0.20);
}


/* MOBILE */

@media (max-width: 600px) {

    .jv-search-filters {

        gap: 7px;

        margin-top: 10px;
    }

    .jv-filter {

        padding: 8px 13px;

        font-size: 12px;
    }
}



