/**
 * ThemeForge Pro Fashion — Premium Header Styles
 *
 * @package ThemeForge_Pro_Fashion
 * @version 1.0.0
 */

/* ============================================================
   1. HEADER BASE
   ============================================================ */

.tf-header--premium {
    position: relative;
    z-index: 999;
    background: var(--tf-header-bg, #FFFFFF);
}

/* ============================================================
   2. ANNOUNCEMENT BAR — GRADIENT
   ============================================================ */

.tf-announcement--premium {
    background: linear-gradient(90deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.tf-announcement__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245, 87, 108, 0.4) 25%,
        rgba(102, 126, 234, 0.4) 50%,
        rgba(79, 172, 254, 0.4) 75%,
        transparent 100%
    );
    animation: tf-ann-glow 6s linear infinite;
    pointer-events: none;
}

@keyframes tf-ann-glow {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tf-announcement--premium .tf-announcement__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
    min-height: 38px;
}

.tf-announcement__icon {
    display: inline-flex;
    align-items: center;
    color: #fee140;
    animation: tf-star-pulse 2s ease infinite;
}

@keyframes tf-star-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50%      { transform: scale(1.15); opacity: 1; }
}

.tf-announcement--premium .tf-announcement__message {
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
}

.tf-announcement--premium .tf-announcement__message a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tf-announcement--premium .tf-announcement__close,
.tf-announcement--premium .tf-announcement__pause {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease, transform 0.2s ease;
}

.tf-announcement--premium .tf-announcement__close:hover,
.tf-announcement--premium .tf-announcement__pause:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.tf-announcement--premium.is-dismissed {
    display: none;
}

/* ============================================================
   3. MAIN HEADER
   ============================================================ */

.tf-main-header--premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--tf-header-border, #EAEAEA);
    transition: all 0.3s ease;
}

/* Sticky header */
body.tf-has-sticky-header .tf-header--premium {
    position: sticky;
    top: 0;
    z-index: 999;
}

body.tf-sticky-full .tf-header--premium,
body.tf-sticky-compact .tf-header--premium {
    position: sticky;
    top: 0;
}

body.tf-sticky-nav .tf-primary-nav--premium {
    position: sticky;
    top: 0;
    z-index: 998;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
}

body.tf-sticky-compact .tf-header--premium.is-compact .tf-main-header--premium {
    padding: 8px 0;
}

body.tf-sticky-compact .tf-header--premium.is-compact .tf-announcement--premium {
    display: none;
}

body.tf-sticky-compact .tf-header--premium.is-compact .tf-main-header__inner {
    min-height: 60px;
    padding: 10px 0;
}

/* Admin bar offset */
.admin-bar body.tf-has-sticky-header .tf-header--premium {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar body.tf-has-sticky-header .tf-header--premium {
        top: 46px;
    }
}

/* ============================================================
   4. MAIN HEADER INNER
   ============================================================ */

.tf-main-header--premium .tf-main-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    min-height: 82px;
}

/* ============================================================
   5. MOBILE TOGGLE — Animated Hamburger
   ============================================================ */

.tf-menu-toggle--premium {
    display: none;
    background: transparent;
    border: 0;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: relative;
}

.tf-menu-toggle__line {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s var(--tf-ease-out, ease);
    transform-origin: center;
}

.tf-menu-toggle--premium:hover .tf-menu-toggle__line:nth-child(1) {
    transform: translateY(-1px);
    width: 26px;
}

.tf-menu-toggle--premium:hover .tf-menu-toggle__line:nth-child(3) {
    transform: translateY(1px);
    width: 26px;
}

/* ============================================================
   6. HEADER ACTIONS — Colorful Hover
   ============================================================ */

.tf-header-action {
    transition: all 0.3s var(--tf-ease-out, ease);
    position: relative;
}

.tf-header-action::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.2), transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
    z-index: -1;
}

.tf-header-action:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Search hover — blue */
.tf-header-action--search:hover {
    color: var(--tf-color-blue, #4facfe) !important;
    transform: translateY(-2px) scale(1.08);
}

/* Account hover — purple */
.tf-header-action--account:hover {
    color: var(--tf-color-purple, #764ba2) !important;
    transform: translateY(-2px) scale(1.08);
}

/* Wishlist hover — rose */
.tf-header-action--wishlist:hover {
    color: var(--tf-color-rose, #f5576c) !important;
    transform: translateY(-2px) scale(1.08);
    animation: tf-heart-beat 0.4s ease;
}

@keyframes tf-heart-beat {
    0%, 100% { transform: translateY(-2px) scale(1.08); }
    50%      { transform: translateY(-2px) scale(1.25); }
}

/* Cart hover — gradient */
.tf-header-action--cart:hover {
    color: var(--tf-color-rose, #f5576c) !important;
    transform: translateY(-2px);
}

.tf-cart-icon-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.tf-cart-count {
    background: linear-gradient(135deg, var(--tf-color-rose, #f5576c), var(--tf-color-purple, #764ba2)) !important;
    color: #ffffff !important;
    animation: tf-cart-pop 0.4s var(--tf-ease-bounce, ease);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

@keyframes tf-cart-pop {
    0%   { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ============================================================
   7. LOGO — Gradient Hover
   ============================================================ */

.tf-logo-wrap {
    display: inline-block;
    transition: transform 0.4s var(--tf-ease-out, ease);
}

.tf-logo-wrap:hover {
    transform: scale(1.03);
}

.tf-logo-wrap img {
    transition: filter 0.3s ease;
}

.tf-logo-wrap:hover img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(2850%) hue-rotate(324deg) brightness(97%) contrast(93%);
    /* Rose tint on hover */
}

.tf-site-title.tf-gradient-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #667eea, #764ba2, #f5576c);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: tf-gradient-flow 4s ease infinite;
    transition: transform 0.3s ease;
}

.tf-site-title.tf-gradient-text:hover {
    transform: scale(1.05);
}

@keyframes tf-gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ============================================================
   8. PRIMARY NAV — Animated Underline
   ============================================================ */

.tf-primary-nav--premium {
    border-bottom: 1px solid var(--tf-header-border, #EAEAEA);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    position: relative;
}

.tf-primary-nav--premium .tf-nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.tf-primary-nav--premium .tf-nav-link::after {
    background: linear-gradient(90deg, var(--tf-color-rose, #f5576c), var(--tf-color-purple, #764ba2));
    height: 2px;
    bottom: 4px;
    transition: transform 0.4s var(--tf-ease-out, ease);
}

.tf-primary-nav--premium .tf-nav-link:hover {
    color: var(--tf-color-rose, #f5576c);
}

.tf-primary-nav--premium .tf-has-dropdown:hover > .tf-nav-link .tf-chevron,
.tf-primary-nav--premium .tf-has-dropdown.is-open > .tf-nav-link .tf-chevron {
    transform: rotate(180deg);
    color: var(--tf-color-rose, #f5576c);
}

/* ============================================================
   9. SEARCH DRAWER — Premium Blur
   ============================================================ */

.tf-search-drawer--premium .tf-search-drawer__backdrop {
    background: rgba(15, 12, 41, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: tf-fade-in 0.3s ease;
}

.tf-search-drawer--premium .tf-search-drawer__panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.3);
    border-radius: 8px;
}

.tf-search-form--premium {
    border-bottom: 2px solid var(--tf-color-rose, #f5576c);
    padding-bottom: 16px;
}

.tf-search-form--premium .tf-search-form__input {
    font-size: 1.375rem;
    font-weight: 300;
}

.tf-search-form--premium .tf-search-form__input:focus {
    outline: none;
}

.tf-search-form--premium .tf-search-form__icon {
    color: var(--tf-color-rose, #f5576c);
    transform: scale(1.1);
}

/* ============================================================
   10. MOBILE DRAWER — Premium Slide
   ============================================================ */

.tf-mobile-drawer--premium .tf-mobile-drawer__panel {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.3);
}

.tf-mobile-drawer--premium .tf-mobile-drawer__header {
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, var(--tf-color-rose), var(--tf-color-purple)) 1;
    padding: 24px 20px;
}

.tf-mobile-drawer--premium .tf-mobile-drawer__brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tf-mobile-drawer--premium .tf-mobile-nav__list .tf-nav-link {
    transition: all 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.tf-mobile-drawer--premium .tf-mobile-nav__list .tf-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tf-color-rose), var(--tf-color-purple));
    transition: width 0.3s ease;
}

.tf-mobile-drawer--premium .tf-mobile-nav__list .tf-nav-link:hover {
    color: var(--tf-color-rose, #f5576c);
    padding-left: 28px;
}

.tf-mobile-drawer--premium .tf-mobile-nav__list .tf-nav-link:hover::before {
    width: 20px;
}

/* ============================================================
   11. PREMIUM SCROLL PROGRESS
   ============================================================ */

.tf-scroll-progress {
    background: linear-gradient(90deg,
        #f5576c 0%,
        #764ba2 33%,
        #4facfe 66%,
        #fee140 100%
    );
    background-size: 200% 100%;
    animation: tf-gradient-scroll 3s linear infinite;
    height: 3px;
}

@keyframes tf-gradient-scroll {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ============================================================
   12. CURSOR — Enhanced
   ============================================================ */

body.tf-premium .tf-cursor {
    border: 2px solid var(--tf-color-rose, #f5576c);
    box-shadow: 0 0 20px rgba(245, 87, 108, 0.4);
}

body.tf-premium .tf-cursor.is-hovering {
    background: rgba(245, 87, 108, 0.2);
    border-color: var(--tf-color-purple, #764ba2);
    box-shadow: 0 0 30px rgba(245, 87, 108, 0.6);
}

/* ============================================================
   13. RESPONSIVE
   ============================================================ */

@media (max-width: 1023px) {
    .tf-primary-nav--premium {
        display: none;
    }

    .tf-menu-toggle--premium {
        display: flex;
    }

    .tf-secondary-nav {
        display: none;
    }

    .tf-main-header--premium .tf-main-header__inner {
        gap: 12px;
        padding: 14px 0;
        min-height: 66px;
    }

    .tf-main-header__center {
        flex: 1;
    }

    .tf-mobile-logo {
        display: inline-block;
    }

    .tf-site-branding .custom-logo-link {
        display: none;
    }
}

@media (max-width: 767px) {
    .tf-main-header__left,
    .tf-main-header__right {
        gap: 4px;
    }

    .tf-header-action {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .tf-site-title.tf-gradient-text {
        font-size: 1rem;
    }

    .tf-announcement__icon {
        display: none;
    }

    .tf-announcement--premium .tf-announcement__message {
        font-size: 0.625rem;
    }
}

/* ============================================================
   14. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .tf-announcement__gradient,
    .tf-announcement__icon,
    .tf-scroll-progress,
    .tf-site-title.tf-gradient-text,
    .tf-cart-count {
        animation: none !important;
    }

    .tf-header-action:hover,
    .tf-header-action--wishlist:hover,
    .tf-logo-wrap:hover {
        transform: none !important;
    }
}