/**
 * Header CSS
 */

.xtech-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

.xtech-header.scrolled {
    background: var(--xtech-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.xtech-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xtech-header__logo img {
    height: 40px;
    width: auto;
}

.xtech-header__logo-text {
    font-family: var(--xtech-font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
}

.xtech-header__logo-text span {
    color: var(--xtech-primary);
}

/* Nav */
.xtech-nav {
    display: none;
}

@media (min-width: 1024px) {
    .xtech-nav {
        display: block;
    }
}

.xtech-nav__list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.xtech-nav__list a {
    color: var(--xtech-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.xtech-nav__list a:hover,
.xtech-nav__list .current-menu-item > a {
    color: #fff;
}

.xtech-nav__list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--xtech-gradient);
    transition: width 0.3s ease;
}

.xtech-nav__list a:hover::after,
.xtech-nav__list .current-menu-item > a::after {
    width: 100%;
}

/* Header Actions */
.xtech-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.xtech-header__action-btn {
    background: none;
    border: none;
    color: var(--xtech-text-secondary);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.xtech-header__action-btn:hover {
    color: var(--xtech-primary);
}

.xtech-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--xtech-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger */
.xtech-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
    width: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

@media (min-width: 1024px) {
    .xtech-hamburger {
        display: none;
    }
}

.xtech-hamburger__line {
    width: 100%;
    height: 2px;
    background-color: var(--xtech-text-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.xtech-hamburger.active .xtech-hamburger__line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.xtech-hamburger.active .xtech-hamburger__line:nth-child(2) {
    opacity: 0;
}

.xtech-hamburger.active .xtech-hamburger__line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.xtech-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: var(--xtech-bg-elevated);
    z-index: 99;
    padding: 80px 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
    overflow-y: auto;
}

.xtech-mobile-menu.active {
    right: 0;
}

.xtech-mobile-menu__list {
    list-style: none;
}

.xtech-mobile-menu__list li {
    margin-bottom: 1.5rem;
}

.xtech-mobile-menu__list a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--xtech-text-main);
    font-family: var(--xtech-font-heading);
}

.xtech-mobile-menu__list a:hover {
    color: var(--xtech-primary);
}

/* Search Overlay */
.xtech-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.xtech-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.xtech-search-overlay__form {
    width: 100%;
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
}

.xtech-search-overlay__input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--xtech-border);
    color: #fff;
    font-size: 2.5rem;
    font-family: var(--xtech-font-heading);
    font-weight: 700;
    padding: 1rem 0;
    outline: none;
    transition: border-color 0.3s ease;
}

.xtech-search-overlay__input:focus {
    border-color: var(--xtech-primary);
}

.xtech-search-overlay__close {
    position: absolute;
    top: -50px;
    right: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.xtech-search-overlay__close:hover {
    opacity: 1;
}
