/* Header Layout Improvements */

/* Adjust search bar width and position */
.de-flex-col .de-quick-search {
    max-width: 180px !important;
    margin-left: 0 !important;
    margin-right: 15px !important;
}

/* Better spacing for header icons */
.de-flex-col {
    gap: 10px;
    align-items: center;
}

/* Fix icon sizes - prevent shrinking */
.wishlist-icon,
#btn-cart {
    flex-shrink: 0 !important;
    min-width: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wishlist-icon .de-icon-counter,
#btn-cart .de-icon-counter {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
}

.wishlist-icon .de-icon-counter i,
#btn-cart .de-icon-counter i {
    font-size: 20px !important;
    line-height: 1 !important;
}

/* Counter badges */
.wishlist-icon .counter,
#btn-cart .counter {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    min-width: 20px !important;
    height: 20px !important;
    font-size: 11px !important;
}

/* Reduce spacing between wishlist and cart */
.wishlist-icon {
    margin-right: 10px !important;
}

#btn-cart {
    margin-right: 0 !important;
}

/* Account area spacing */
.user-account-dropdown {
    margin-left: 20px !important;
    margin-right: 15px !important;
    flex-shrink: 1;
    max-width: 200px;
}

/* Ensure account toggle has enough space */
.account-toggle {
    min-width: fit-content;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-toggle .user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.account-toggle .fa-chevron-down {
    flex-shrink: 0;
    font-size: 12px;
}

/* Better alignment for all header elements */
header .de-flex {
    justify-content: space-between;
}

header .de-flex-col:last-child {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Adjust menu button spacing */
#menu-btn {
    margin-left: 10px;
}

/* Responsive adjustments */
@media (min-width: 992px) and (max-width: 1400px) {
    .de-flex-col .de-quick-search {
        max-width: 150px !important;
    }
    
    .account-toggle .user-name {
        max-width: 100px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .de-flex-col .de-quick-search {
        max-width: 120px !important;
    }
    
    .wishlist-icon,
    #btn-cart {
        margin: 0 5px !important;
    }
    
    .user-account-dropdown {
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
}

@media (max-width: 767px) {
    .de-flex-col .de-quick-search {
        display: none;
    }
    
    header .de-flex-col:last-child {
        gap: 8px;
    }
}

/* Fix icon alignment */
.de-icon-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}