/* ============================================
   AVTOBAZA - Header Styles
   Created: December 9, 2024
   Last Updated: December 9, 2024
   Version: 1.0
   ============================================ */

/* ============================================
   TABLE OF CONTENTS
   ============================================
   1. HEADER TOP (Contact, Phone, Language)
   2. HEADER BOTTOM (Navigation, Dropdown, Garage)
   3. SEARCH CONTAINER & DROPDOWN
   4. CART SUMMARY & DROPDOWN
   5. MOBILE FILTER MENU
   6. MOBILE NAVIGATION
   7. BREADCRUMB
   8. SIDEBAR (User Profile, Page Lists)
   ============================================ */

/* ============================================
   1. HEADER TOP (Contact, Phone, Language)
   ============================================ */

/* Header wrapper - ensure it stays above page content */
.header {
    position: relative;
    z-index: 999;
}

.header_top {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1019607843);
    padding: 16px 0;
}

@media (max-width: 768px) {
    .header_top {
        display: none;
    }
}

.header_top .link_wrapper li a,
.header_top .phone_wrapper li a,
.header_top .lang_wrapper li a {
    color: #000;
}

.header_top .link_wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header_top .phone_wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header_top .phone_wrapper li {
    position: relative;
}

.header_top .phone_wrapper li:nth-child(odd)::after {
    content: "";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    display: block;
    background-color: #000;
}

.header_top .phone_wrapper a {
    font-weight: 700;
}

.header_top .lang_wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header_top .lang_wrapper li {
    color: #707070;
    position: relative;
}

.header_top .lang_wrapper li:nth-child(odd)::after {
    content: "";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    display: block;
    background-color: #000;
}

.header_top .lang_wrapper li a {
    color: #707070;
}

/* ============================================
   2. HEADER BOTTOM (Navigation, Dropdown, Garage)
   ============================================ */

.header_bottom {
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 999;
}

@media (max-width: 1200px) {
    .header_bottom {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 20px;
    }
}

@media (max-width: 768px) {
    .header_bottom {
        display: flex;
        justify-content: space-between;
    }
}

/* Dropdown Menu */
.header_bottom .dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.header_bottom .dropdown-btn {
    background: #0f0f4c;
    color: #fff;
    padding: 12px 12px;
    border: none;
    outline: none;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 160px;
}

.header_bottom .dropdown-btn img {
    transition: 0.3s ease;
}

.header_bottom .dropdown-btn.active {
    border-radius: 5px 5px 0 0;
}

.header_bottom .dropdown-btn.active img {
    transform: rotate(180deg);
}

.header_bottom .dropdown-menu {
    display: flex;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    position: absolute;
    background: #0f0f4c;
    border-radius: 0 0 5px 5px;
    top: 100%;
    left: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0s linear 0.3s;
}

.header_bottom .dropdown-menu.show {
    width: 597px;
    opacity: 1;
    visibility: visible;
    max-height: 500px;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0s;
}

.header_bottom .dropdown-menu .menu-column {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    width: 33.3333333333%;
}

.header_bottom .dropdown-menu .menu-column a {
    color: #8786a7;
    padding: 8px 5px;
    border-bottom: 1px solid #8786a7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header_bottom .dropdown-menu .menu-column a:last-child {
    border-bottom: none;
}

/* Hover edilen veya aktif olan kategori link stili */
.menu-column a:hover,
.menu-column a.active {
    color: #ffffff !important;
    font-weight: bold;
    background-color: #ffffff4d;
    border-radius: 4px;
}

/* Garage Wrapper */
.header_bottom .garage_wrapper {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    gap: 8px;
    border-radius: 8px;
}

.header_bottom .garage_wrapper:hover {
    background: #0f0f4c;
}

.header_bottom .garage_wrapper:hover .text-sm {
    color: #FFFFFF !important;
}

/* Garage icon states */
.garage_wrapper .default-icon {
    display: inline-block;
}

.garage_wrapper .hover-icon {
    display: none;
}

.garage_wrapper:hover .default-icon {
    display: none;
}

.garage_wrapper:hover .hover-icon {
    display: inline-block;
}

.garage_wrapper:hover .text-sm {
    color: #FFFFFF;
}

.header_bottom .garage_wrapper img {
    width: 20px;
    height: 20px;
}

.header_bottom .garage_wrapper .text-sm {
    color: #000;
    font-weight: 500;
}

/* Mobile Filter Wrapper */
.header_bottom .mobile_filter_wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1000;
}

.header_bottom .mobile_filter_wrapper .mobile_search {
    cursor: pointer;
}

.header_bottom .mobile_filter_wrapper .mobile_filter-btn {
    background: #0f0f4c;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    z-index: 1000;
}

.header_bottom .mobile_filter_wrapper .mobile_filter-btn span {
    font-size: 16px;
    line-height: 18px;
    font-weight: 500;
}

/* ============================================
   3. SEARCH CONTAINER & DROPDOWN
   ============================================ */

.search-container {
    position: relative;
    width: 420px;
}

.search-container-b2b {
    position: relative;
    width: auto !important;
}

.search_b2b:hover {
    background-color: #1a1a87;
    color: #fff;
}

@media (max-width: 992px) {
    .search-container {
        width: 360px;
    }
}

.search-container .search-input {
    width: 100%;
}

.search-container .search-input input {
    padding: 8px 14px;
    background: #f3f3f3;
    border: 1px solid rgba(0, 0, 0, 0.1019607843);
    border-radius: 5px;
    color: rgba(0, 0, 0, 0.2);
    outline: none;
    display: block;
    width: 100%;
}

.search-container .search-input input.active {
    border-radius: 5px 5px 0 0;
}

.search-container .search-input .search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    outline: none;
    background: #0f0f4c;
    border: 1px solid rgba(0, 0, 0, 0.1019607843);
    border-radius: 5px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Search Dropdown */
#searchDropdown {
    position: absolute;
    background-color: #f3f3f3;
    width: calc(100% - 36px);
    z-index: 10000;
    border: 1px solid rgba(0, 0, 0, 0.1019607843);
    border-top: none;
    display: none;
    flex-direction: column;
    border-radius: 0 0 5px 5px;
    padding: 0 12px;
    height: 250px;
    content-visibility: auto;
    overflow-y: scroll;
}

.search-container #searchDropdown .dropdown-content {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.search-container #searchDropdown .dropdown-content:last-child {
    border-bottom: 0;
}

.search-container #searchDropdown .dropdown-content .img_wrapper img {
    background: #fff;
    border-radius: 5px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    object-fit: contain;
}

/* No Results Modern Design */
.no-results-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-results-icon {
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.no-results-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f0f4c;
    margin-bottom: 10px;
    line-height: 1.4;
}

.no-results-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.find-part-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffb91d 0%, #ffa500 100%);
    color: #0f0f4c;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 185, 29, 0.3);
}

.find-part-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 185, 29, 0.4);
    background: linear-gradient(135deg, #ffa500 0%, #ffb91d 100%);
}

.find-part-btn:active {
    transform: translateY(0);
}

.find-part-btn svg {
    transition: transform 0.3s ease;
}

.find-part-btn:hover svg {
    transform: rotate(90deg);
}

.no-results-container .error {
    color: #dc3545;
}

/* ============================================
   4. CART SUMMARY & DROPDOWN
   ============================================ */

.cart-summary {
    cursor: pointer;
    z-index: 1000;
    position: relative;
}

.cart-summary:hover .cart-info {
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid #717170;
}

.cart-summary .cart-info {
    background-color: #f1f1f1;
    padding: 12px;
    border-radius: 5px;
    width: 220px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

.cart-summary .cart-info .count-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-summary .cart-info .count-wrapper .item-count-wrapper {
    color: #8a8a8a;
    font-weight: 400;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.cart-summary .cart-info .count-wrapper .item-count-wrapper .item-count {
    font-size: 14px;
}

.cart-summary .cart-info .count-wrapper .item-count-wrapper .desc {
    font-size: 10px;
    line-height: 13px;
    font-weight: 700;
}

.cart-summary .cart-info .total_wrapper {
    color: #000 !important;
}

.cart-summary .cart-info .total_wrapper .total {
    font-size: 12px;
    line-height: 14px;
}

.cart-summary .cart-info .total_wrapper .total-price {
    font-size: 16px;
    line-height: 19px;
    font-weight: 700;
}

/* Cart Dropdown */
.cart-summary .cart-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f1f1f1;
    padding: 12px 8px;
    z-index: 10000;
    width: 100%;
    border-radius: 0 0 5px 5px;
}

.cart-summary:hover .cart-dropdown {
    display: block;
}

.cart-summary .cart-dropdown .cart-item {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px !important;
    justify-content: center;
}

.cart-summary .cart-dropdown .cart-item .img_wrapper {
    background: #fff;
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-summary .cart-dropdown .cart-item .img_wrapper img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    padding: 2px;
}

.cart-summary .cart-dropdown .cart-item .title {
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    color: #000;
}

.cart-summary .cart-dropdown .cart-item .count {
    font-size: 9px;
    line-height: 9px;
    font-weight: 400;
    color: #000;
}

.cart-summary .cart-dropdown .cart-item .price {
    font-size: 17px;
    line-height: 20px;
    font-weight: 700;
    color: #000;
}

/* Cart Item Styles (from blade) */
.headercartTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 150px;
    vertical-align: middle;
}

#cartDropdown .btn_wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#cartDropdown .btn_wrapper .order_btn {
    background: #ffb91d;
    border: none;
    outline: none;
    border-radius: 5px;
    color: #000000;
    padding: 10px;
    font-size: 16px;
    line-height: 19px;
    font-weight: 700;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item .img_wrapper {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 4px;
}

.cart-item .img_wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item .item-details {
    flex-grow: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
}

.cart-item .item-details .title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
    width: calc(14ch + 5px);
}

.cart-item .item-details .title::after {
    content: "...";
    display: inline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item .item-details .count {
    font-size: 12px;
    color: #666;
}

.cart-item .item-details .price {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin-top: 5px;
}

.cart-item .delete_icon {
    flex-shrink: 0;
    font-size: 16px;
    color: red;
    cursor: pointer;
    text-align: center;
    line-height: 16px;
    margin-left: 10px;
    align-self: flex-start;
}

#cartDropdown .cart-item:last-child {
    margin-bottom: 0;
}

#cartDropdown .register_btn {
    border: none;
    outline: none;
    border-radius: 5px;
    background: #ffb91d;
    color: #0f0f4c;
    font-size: 12px;
    line-height: 14px;
    font-weight: 700;
    padding: 10px;
    max-width: 116px;
    width: 100%;
    text-transform: uppercase;
    text-align: center;
}

#cartDropdown .outline_btn {
    border: none;
    outline: none;
    border-radius: 5px;
    background: #0f0f4c;
    color: #fff;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    padding: 10px;
    max-width: 116px;
    width: 100%;
    text-transform: uppercase;
    text-align: center;
}

/* ============================================
   5. MOBILE FILTER MENU
   ============================================ */

#MobileFilterMenu {
    position: fixed;
    right: 0;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    background: #fff;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    padding: 30px 0 60px;
    transition: all 0.7s ease 0s;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    transform: translateX(-101%);
    overflow-y: auto;
}

#MobileFilterMenu::-webkit-scrollbar {
    width: 5px;
    height: 8px;
    background-color: #d7d7d7;
}

#MobileFilterMenu::-webkit-scrollbar-thumb {
    background: #a7a7a7;
}

#MobileFilterMenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

#MobileFilterMenu .menu-header {
    margin-bottom: 20px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#MobileFilterMenu .menu-header .lang_wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

#MobileFilterMenu .menu-header .lang_wrapper li {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    background: #e6e6e6;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    line-height: 12px;
    font-weight: 600;
    cursor: pointer;
}

#MobileFilterMenu .menu-header .close_wrapper img {
    cursor: pointer;
    width: 20px;
    height: 20px;
}

#MobileFilterMenu .filter_wrapper {
    padding: 0 20px;
}

#MobileFilterMenu .filter_wrapper .text-sm-fw-medium {
    font-weight: 600;
}

#MobileFilterMenu .filter_wrapper .category_list_wrapper {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#MobileFilterMenu .filter_wrapper .category_list_wrapper .category {
    width: 100%;
    border-radius: 5px;
    background: #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
}

#MobileFilterMenu .filter_wrapper .main_category_wrapper {
    display: block;
}

#MobileFilterMenu .filter_wrapper .main_category_wrapper.not_active {
    display: none;
}

#MobileFilterMenu .filter_wrapper .sub_category_wrapper {
    display: none;
}

#MobileFilterMenu .filter_wrapper .sub_category_wrapper.active {
    display: block;
}

#MobileFilterMenu .filter_wrapper .sub_category_wrapper .prev {
    display: flex;
    align-items: center;
    gap: 6px;
}

#MobileFilterMenu .filter_wrapper .sub_category_wrapper .prev-btn {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #e6e6e6;
    border-radius: 5px;
}

#MobileFilterMenu .filter_wrapper .sub_category_wrapper .prev .category_name {
    font-size: 16px;
    line-height: 18px;
    font-weight: 600;
}

/* ============================================
   6. MOBILE NAVIGATION
   ============================================ */

/* ============================================
   6. MOBILE NAVIGATION
   Moved to main.css for better organization
   ============================================ */

/* ============================================
   7. BREADCRUMB
   ============================================ */

.breadcrumb_wrapper {
    display: flex;
    align-items: items;
    gap: 10px;
    margin-bottom: 30px;
}

.breadcrumb_wrapper li {
    font-size: 12px;
    line-height: 8px;
    font-weight: 400;
    color: #0f0f4c;
}

.breadcrumb_wrapper li a {
    color: #0f0f4c;
}

.breadcrumb_wrapper li:last-child {
    font-weight: 600;
}

/* ============================================
   8. SIDEBAR (User Profile, Page Lists)
   ============================================ */

#Sidebar {
    border: 1px solid #0f0f4c;
    border-radius: 5px;
}

#Sidebar .user_wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

#Sidebar .user_wrapper .user_name_wrapper {
    display: flex;
    flex-direction: column;
}

#Sidebar .user_wrapper .user_name_wrapper p {
    color: #0f0f4c;
}

#Sidebar .user_wrapper .profile_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0f0f4c;
    width: 55px;
    height: 55px;
    border-radius: 5px;
}

#Sidebar .page_list_wrapper .page_name {
    padding: 12px 20px;
    border-bottom: 1px solid #d0d0d0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#Sidebar .page_list_wrapper .page_name:last-child {
    border-bottom: 0;
}

#Sidebar .page_list_wrapper .page_name .not_active_image {
    display: block;
}

#Sidebar .page_list_wrapper .page_name .active_image {
    display: none;
}

#Sidebar .page_list_wrapper .page_name a.active .not_active_image {
    display: none;
}

#Sidebar .page_list_wrapper .page_name a.active .active_image {
    display: block;
}

#Sidebar .page_list_wrapper .page_name a {
    font-size: 16px;
    line-height: 14px;
    font-weight: 400;
    color: #8a8a8a;
    display: flex;
    align-items: center;
    gap: 10px;
}

#Sidebar .page_list_wrapper .page_name a.active {
    font-weight: 600;
    color: #0f0f4c;
}

#Sidebar .page_list_wrapper .page_name .count {
    width: 25px;
    height: 25px;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    line-height: 12px;
    font-weight: 700;
    margin-right: 10px;
    color: #a3a3a3;
}

/* Sidebar Mobile */
#sidebar-mobile {
    display: none;
}

#sidebar-mobile .wrapper {
    background-color: #0f0f4c;
    border-radius: 8px;
    position: relative;
    transition: 0.3s ease;
}

#sidebar-mobile .wrapper.active-sidebar {
    background: #d0d0d0;
}

#sidebar-mobile .wrapper.active-sidebar .active_page_name {
    color: #0f0f4c;
}

#sidebar-mobile .wrapper .active_page_name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 94%;
    color: white;
    margin: 0 auto;
    padding: 12px 0;
}

#sidebar-mobile .wrapper .active_page_name .arrow-btn {
    cursor: pointer;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

#sidebar-mobile .wrapper .active_page_name .rotated {
    transform: rotate(270deg);
}

/* Sidebar Responsive */
@media (max-width: 992px) {
    .text-sm-fw-medium {
        font-size: 14px;
        line-height: 12px;
    }

    .text-sm-fw-normal {
        font-size: 19px !important;
    }
}

@media (max-width: 768px) {
    .sidebar-col-3 {
        width: 100% !important;
    }

    .sidebar-col-3.col-md-3 {
        padding: 0 12px !important;
    }

    #Sidebar {
        border: none;
        position: relative;
    }

    #Sidebar .user_wrapper {
        display: none !important;
    }

    #Sidebar .page_list_wrapper {
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
        display: none;
    }

    #Sidebar .page_list_wrapper.active {
        display: block;
        padding: 12px 0 0;
        position: absolute;
        z-index: 9;
        background: #fff;
        width: 100%;
        border: 1px solid #d0d0d0;
        border-radius: 5px;
    }

    #sidebar-mobile {
        display: block !important;
    }
}

/* ============================================
   END OF STYLESHEET
   ============================================ */

