.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.search_box {
    position: relative;
}

.search-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    max-width: 400px;
    min-width: 300px;
    width: 100%;
    position: relative;
    z-index: 3;
    box-sizing: border-box;
}

.search_in_head.search-container {
    height: 30px;
}


.search_in_menu .search-container {
	min-width: unset;
}

.search-container input {
    all: unset;
    width: 100%;
    height: 100%;
    padding: 10px;
    border: 1px solid #888;
    border-radius: 10px;
    background-color: #fff;
    font-size: 16px;
    text-align: left;

}

.search_in_head.search-container input {
    border: 1px solid var(--main-color);
    padding: 0 10px;
    font-size: 14px;
}

.search_in_menu .search-container input {
    width: 100%;
	padding: 12px 40px 12px 15px;
    padding-left: 35px;
	border: none;
	outline: none;
	font-size: 16px;
	background: #f5f5f5;
}

.search-container i {
    position: absolute;
    right: 10px;
    top: 50%;
    color: #888;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
}

.search-container i#close_search_chevron {
    left: 10px;
    right: unset;
    font-size: 16px;
    cursor: pointer;
}

/* Icon animation states */
.search-container i.icon_shown {
    opacity: 1;
    transform: translateY(-50%) rotate(0deg);
    transition: all 0.3s ease-in-out;
}
.search-container i.icon_hidden {
    opacity: 0;
    transform: translateY(-50%) rotate(-40deg);
}

.close_search_button {
    position: absolute;
    right: 10px;
    top: 5px;
    cursor: pointer;
    font-size: 24px;
    color: #888;
}


.animated_search {
    color: #888 !important;
}

.results_container {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid #888;
    border-radius: 5px;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 10px;
    margin-top: -12px;
    z-index: 2;
    background-color: #fff;
    max-height: 400px;
    overflow-y: scroll;
    position: absolute;

}

.result {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
    align-content: center;
    background-color: #fff;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 15px;
    padding-left: 24px !important;

}

.result.predlozena_pretraga {
    padding-left: 10px !important;
}

.result.focused {
    background-color: #f0f0f0;
}

.result:hover {
    background-color: #f0f0f0;
}



.result_icon {
    width: 50px;
    color: #444;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result_icon_image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.result_title {
    font-size: 16px;
    font-weight: 500;
    flex-grow: 1;
    color: #444;
}

.result_category {
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
}

.result_section .result_category {
    padding: 10px 0 5px 10px;
    font-weight: 500;
    color: #888;

}



.search_wrapper {
    max-width: 1200px;
    padding: 20px;
    display: flex;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    flex-grow: 1;
    transition: opacity 0.3s ease-in-out;
}

.search_wrapper .search_wrapper_background {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
    opacity: 1;
    transition: all 0.1s ease-in-out;
}

.search_wrapper.search_closed .search_wrapper_background {
    opacity: 0;
}



.new_search * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.search_wrapper.search_closed .new_search * {
    height: 0;
    width: 0;
    overflow: hidden;
}

.new_search {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgba(248, 249, 250, 0.95);
    z-index: 5;
    color: #333;
   
    position: absolute;
    top: 66px;

    height: 80dvh;
    max-height: 80dvh;
    width: 100dvw;
    max-width: 500px;

    margin: 0 auto;

    box-sizing: border-box;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.search_in_menu .search_wrapper {
    position: relative;
    z-index: 1000; /* was 0; match mobile behavior on desktop */
}
.search_in_menu .new_search {
    z-index: 1001; /* ensure panel is above anything in menu_content */
    position: absolute;
    top: 100%;
    left: -10px;
    width: min(100dvw, 400px);
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background-color: white;
}

.search_wrapper.search_closed .new_search {
    

    width: 0;
    height: 0;
    max-height: 0;
    max-width: 0;
}






/* Main Container */
.new_search .container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    box-sizing: border-box;
    height: 100%;
    padding: 0px;

}

.search_in_menu .new_search .container {
    padding: 0;

}


/* Sidebar */
.new_search .sidebar {
    width: 100%;
    /* max-width: 350px; */
    height: fit-content;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    height: 100%;
    overflow-y: auto;
}

.search_in_menu .new_search .sidebar {
    height: calc(100dvh - 43px  - var(--head-height));
    overflow-y: auto;
    width: 100%;
    border-radius: 0;
    padding-bottom: 120px;
}



.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    text-transform: uppercase;
}

.sidebar-title span {
    width: 15px;
}

.sidebar-items {
    list-style: none;
}

.sidebar-items li {
    margin-bottom: 8px;
}

.sidebar-items a,
.sidebar-items div {
    color: #666;
    text-decoration: none;
    padding: 7px 0;
    display: block;
    transition: color 0.3s;
    background: none;
}

.sidebar-items a:hover,
.sidebar-items div:hover {
    color: var(--main-color);
    background: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

.results-header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.results-count {
    color: #666;
    font-size: 14px;
}

/* Product Grid */
.search_uzorci_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.search_uzorak_card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.search_uzorak_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.search_uzorak_image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.search_uzorak_image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.search_result_uzorak {
    padding: 15px;
    text-align: center;
}

.search_result_uzorak .uzorak-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-weight: 400;
}

.search_result_uzorak .uzorak-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 400;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--main-color);
}

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

    .search_wrapper {
        background-color: rgba(248, 249, 250, 1);
        width: 100%;
        
        max-height: unset;
        z-index: 1000;
        padding: 0;
    }

    .search_wrapper.search_closed {
        position: relative;
    }

    .new_search {
        background-color: rgba(248, 249, 250, 1);
        height: calc(100dvh - 66px);
        /* width: 100dvw; */
        /* position: fixed; */
        max-height: unset;
        left: 0;
    }

    .new_search .container {
        /* flex-direction: column-reverse; */
        padding: 30px;
        overflow-y: scroll;
    }

    .new_search .sidebar {
        width: 100%;
        background-color: transparent;
    }

    .new_search .search_uzorci_grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        /* max-height:50dvh;
        overflow-y: scroll; */
    }

    .head_search_icon {
        display: block !important;
        font-size: 24px;
        margin-left: 12px;
        cursor: pointer;
        color: white;
        margin-top: -2px;
    }
}



.typed_animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    padding: 0 10px;
    box-sizing: border-box;
    color: #888;
    background-color: transparent;
    font-size: 14px;
    text-align: left;  
    caret-color: transparent;
    display: flex;
    align-items: center;
}
