/* =========================================================================
   DKSHAPE Header
   ========================================================================= */

.dk-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dk-gray-100);
    height: var(--header-height);
    transition: box-shadow var(--duration) var(--ease);
}

.dk-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.dk-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ─── Logo ─── */

.dk-header__logo a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

.dk-header__logo img {
    height: 36px;
    width: auto;
}

.dk-header__logo-text {
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    font-size: var(--fs-xl);
    color: var(--dk-black);
    letter-spacing: 0.5px;
}

.dk-header__logo-text span {
    color: var(--dk-accent);
}

/* ─── Navigation ─── */

.dk-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.dk-header__nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    margin: 0;
    padding: 0;
}

.dk-header__nav-link {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--dk-gray-700);
    text-decoration: none;
    padding: var(--space-2) 0;
    position: relative;
    transition: color var(--duration) var(--ease);
}

.dk-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--dk-accent);
    transition: width var(--duration-slow) var(--ease);
}

.dk-header__nav-link:hover,
.dk-header__nav-link.active {
    color: var(--dk-accent);
}

.dk-header__nav-link:hover::after,
.dk-header__nav-link.active::after {
    width: 100%;
}

/* ─── Actions (Search, Account, Cart) ─── */

.dk-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.dk-header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--dk-gray-700);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
}

.dk-header__action-btn:hover {
    background-color: var(--dk-gray-50);
    color: var(--dk-accent);
}

.dk-header__action-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

/* Cart badge */
.dk-header__cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--dk-accent);
    color: var(--dk-white);
    font-size: 10px;
    font-weight: var(--fw-bold);
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ─── Mobile Menu Toggle ─── */

.dk-header__menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.dk-header__menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--dk-black);
    border-radius: 2px;
    transition: all var(--duration) var(--ease);
}

/* ─── Mobile Nav Drawer ─── */

.dk-header__mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dk-white);
    z-index: var(--z-overlay);
    padding: var(--space-8) var(--container-pad);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease);
}

.dk-header__mobile-nav.open {
    transform: translateX(0);
}

.dk-header__mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dk-header__mobile-nav-list li {
    border-bottom: 1px solid var(--dk-gray-100);
}

.dk-header__mobile-nav-list a {
    display: block;
    padding: var(--space-4) 0;
    font-size: var(--fs-lg);
    font-weight: var(--fw-medium);
    color: var(--dk-gray-900);
    text-decoration: none;
}

.dk-header__mobile-nav-list a:hover {
    color: var(--dk-accent);
}

/* ─── Search Overlay ─── */

.dk-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--space-24);
}

.dk-search-overlay.open {
    display: flex;
}

.dk-search-box {
    background: var(--dk-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
}

.dk-search-box input {
    width: 100%;
    border: 1px solid var(--dk-gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: var(--fs-lg);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--duration) var(--ease);
}

.dk-search-box input:focus {
    border-color: var(--dk-accent);
}

/* ─── Responsive ─── */

@media (max-width: 1023px) {
    .dk-header__nav {
        display: none;
    }

    .dk-header__menu-toggle {
        display: flex;
    }

    .dk-header__mobile-nav {
        display: block;
    }
}