/* assets/css/header.css */

:root {
    --header-height: 60px;
    --header-height-mobile: 50px;
    --primary-color: #0d6efd;
    --text-color: #333;
    --background-color: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.05);
}

.main-header {
    background-color: var(--background-color);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0;
    height: var(--header-height-mobile);
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: all 0.3s ease;
    animation: slide-down 0.5s ease-out;
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .main-header {
        height: var(--header-height);
    }
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
}

.header-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-btn {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* For ripple effect */
}

.header-icon-btn i {
    font-size: 22px;
}

.cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    line-height: 1;
    min-width: 16px;
    text-align: center;
    animation: pop-in 0.3s ease;
}

@keyframes pop-in {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* User dropdown */
.header-user-dropdown .dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 8px 0;
}

.header-user-dropdown .dropdown-item {
    font-size: 15px;
    padding: 10px 20px;
    color: var(--text-color);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-user-dropdown .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-brand {
        font-size: 18px;
    }

    .header-icon-btn {
        width: 36px;
        height: 36px;
    }

    .header-icon-btn i {
        font-size: 20px;
    }

    .header-user-link span {
        display: none;
    }
}