/* ================================================
   EPIDERMIST — Header Styles
   ================================================ */

.ep-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: var(--ep-header-height);
    transition: height 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid var(--ep-border-light);
}

.ep-header--scrolled {
    height: var(--ep-header-height-scrolled);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .ep-header {
    top: 32px;
}

body.admin-bar .ep-search-overlay {
    top: 32px;
}

body.admin-bar .ep-mobile-nav {
    top: 32px;
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .ep-header {
        top: 46px;
    }
    body.admin-bar .ep-search-overlay {
        top: 46px;
    }
    body.admin-bar .ep-mobile-nav {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

@media screen and (max-width: 600px) {
    body.admin-bar .ep-header {
        top: 0;
    }
    body.admin-bar .ep-search-overlay {
        top: 0;
    }
    body.admin-bar .ep-mobile-nav {
        top: 0;
        height: 100vh;
    }
}

.ep-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
    position: relative;
}

/* Logo (Center) */
.ep-header__logo {
    grid-column: 2;
    justify-self: center;
    text-align: center;
    margin: 0;
    padding: 0;
}

.ep-header__logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ep-header__logo-text {
    font-family: var(--ep-font-body);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ep-text-dark);
    transition: var(--ep-transition);
}

.ep-header__logo-img {
    height: auto;
    max-height: 52px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    display: block;
    transition: max-height 0.3s ease;
}

.ep-header--scrolled .ep-header__logo-img {
    max-height: 44px;
}

/* Navigation (Left) */
.ep-header__nav {
    position: static;
    transform: none;
    grid-column: 1;
    justify-self: start;
}

.ep-nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-nav__list .menu-item a {
    font-family: var(--ep-font-body);
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    color: var(--ep-text-dark);
    padding: 6px 0;
    transition: color 0.2s ease;
}

.ep-nav__list .menu-item a::after {
    display: none;
}

/* Actions (Right) */
.ep-header__actions {
    grid-column: 3;
    justify-self: end;
}

.ep-header__actions .ep-search-toggle {
    display: none;
}

/* Header Actions */
.ep-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ep-header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--ep-text-dark);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--ep-transition);
    position: relative;
    border-radius: 50%;
}

.ep-header__action-btn:hover {
    color: var(--ep-accent);
    background: rgba(201, 169, 110, 0.08);
}

.ep-header__action-btn svg {
    width: 20px;
    height: 20px;
}

/* Cart Count */
.ep-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--ep-accent);
    color: var(--ep-bg-white);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Mobile Toggle */
.ep-header__mobile-toggle {
    display: none;
}

/* Search Overlay */
.ep-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--ep-bg-white);
    z-index: 1002;
    padding: 0;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.ep-search-overlay--active {
    transform: translateY(0);
}

.ep-search-overlay__inner {
    display: flex;
    align-items: center;
    height: 80px;
    gap: 16px;
}

.ep-search-overlay__form {
    display: flex;
    flex: 1;
    align-items: center;
}

.ep-search-overlay__input {
    flex: 1;
    height: 56px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-family: var(--ep-font-body);
    color: var(--ep-text-dark);
    outline: none;
}

.ep-search-overlay__input::placeholder {
    color: var(--ep-text-light);
}

.ep-search-overlay__submit {
    background: none;
    border: none;
    color: var(--ep-text-dark);
    cursor: pointer;
    padding: 8px;
    transition: var(--ep-transition);
}

.ep-search-overlay__submit:hover {
    color: var(--ep-accent);
}

.ep-search-overlay__close {
    background: none;
    border: none;
    color: var(--ep-text-dark);
    cursor: pointer;
    padding: 8px;
    transition: var(--ep-transition);
}

.ep-search-overlay__close:hover {
    color: var(--ep-accent);
}

/* Mobile Navigation */
.ep-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: var(--ep-bg-primary);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ep-mobile-nav--open {
    transform: translateX(0);
}

.ep-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ep-border-light);
}

.ep-mobile-nav__logo {
    font-family: var(--ep-font-heading);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--ep-text-dark);
}

.ep-mobile-nav__close {
    background: none;
    border: none;
    color: var(--ep-text-dark);
    cursor: pointer;
    padding: 4px;
}

.ep-mobile-nav__menu {
    padding: 24px;
    flex: 1;
}

.ep-mobile-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ep-mobile-nav__list .menu-item {
    border-bottom: 1px solid var(--ep-border-light);
}

.ep-mobile-nav__list .menu-item a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ep-text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ep-mobile-nav__list .menu-item a:hover {
    color: var(--ep-accent);
}

.ep-mobile-nav__actions {
    padding: 24px;
    border-top: 1px solid var(--ep-border-light);
}

.ep-mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--ep-text-medium);
}

/* Mobile Backdrop */
.ep-mobile-nav__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ep-mobile-nav__backdrop--visible {
    opacity: 1;
    visibility: visible;
}

/* Body no-scroll */
body.ep-nav-open {
    overflow: hidden;
}
