/*
 * Header Styles
 * BunnyTagz Theme - Pink Gradient Design
 */

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
    background: linear-gradient(135deg, #e94b8a 0%, #d6357a 100%);
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(233, 75, 138, 0.3);
}

.sticky-header {
    position: sticky;
    top: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Main */
.header-main {
    padding: 25px 0;  
}

.site-branding {
   position: absolute;
   left: 0;
   top: -21px;
   z-index: 10;
}

/* Keep existing .custom-logo-link and other styles */

/* ==========================================================================
   Header Inner Container
   ========================================================================== */

.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Changed from space-between to flex-end */
    gap: 3rem;
    position: relative; /* Added for absolute positioning context */
}



/* ==========================================================================
   Site Branding (Logo)
   ========================================================================== */

.site-branding {
    flex-shrink: 0;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-height: 115px;
    width: auto;
    transition: transform 0.3s ease;
}

.custom-logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    color: #ffffff;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

.site-title-link {
    color: #ffffff;
    text-decoration: none;
}

.site-title-link:hover {
    opacity: 0.9;
}

.site-description {
    display: none;
}

/* ==========================================================================
   Main Navigation
   ========================================================================== */


.main-navigation {
    flex-grow: 0; /* Changed from 1 to 0 */
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #ffffff;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    opacity: 0.85;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

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

/* Dropdown Menus */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    z-index: 100;
    margin-top: 0.5rem;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    border: none;
}

.nav-menu .sub-menu a {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    color: #333333;
}

.nav-menu .sub-menu a::after {
    display: none;
}

.nav-menu .sub-menu a:hover {
    background: #f8f8f8;
    color: #e94b8a;
}

/* Dropdown Arrow */
.nav-menu .menu-item-has-children > a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
}

/* ==========================================================================
   Header Actions
   ========================================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.header-actions button,
.header-actions a:not(.sign-in-btn) {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    position: relative;
}

.header-actions button:hover,
.header-actions a:not(.sign-in-btn):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Wishlist Link */
.wishlist-link svg {
    transition: all 0.3s ease;
}

.wishlist-link:hover svg {
    fill: #ffffff;
}

/* Cart Icon */
.header-cart {
    position: relative;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ffeb3b;
    color: #333333;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Sign In Button */
.sign-in-btn {
    background: #ffeb3b;
    color: #333333;
    padding: 0.625rem 1.75rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}

.sign-in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: #fff59d;
}

.sign-in-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Mobile Menu Toggle
   ========================================================================== */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 0;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 26px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle:hover .hamburger span {
    background: #ffeb3b;
}

.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================================================
   Search Modal
   ========================================================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.search-modal-inner {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideInDown 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999999;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.search-close:hover {
    color: #333333;
    background: #f5f5f5;
}

.search-form-wrapper .search-field {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid #e5e5e5;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.search-form-wrapper .search-field:focus {
    outline: none;
    border-color: #e94b8a;
    box-shadow: 0 0 0 3px rgba(233, 75, 138, 0.1);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

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

.mobile-menu-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    background: linear-gradient(135deg, #e94b8a 0%, #d6357a 100%);
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-navigation {
    padding: 1rem 0;
}

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

.mobile-menu-list li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: #333333;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list .current-menu-item > a {
    background: #f8f8f8;
    color: #e94b8a;
    padding-left: 2rem;
}

.mobile-menu-list .sub-menu {
    list-style: none;
    padding-left: 0;
    background: #f8f8f8;
}

.mobile-menu-list .sub-menu a {
    padding-left: 2.5rem;
    font-size: 0.9375rem;
}

.mobile-menu-widgets {
    padding: 1.5rem;
    border-top: 1px solid #e5e5e5;
    background: #f8f8f8;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 992px) {
    .main-navigation {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .header-inner {
        gap: 1.5rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-main {
        padding: 1rem 0;
    }

    .header-inner {
        gap: 1rem;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .custom-logo {
        max-height: 50px;
    }

    .header-actions {
        gap: 0.75rem;
    }

    .wishlist-link {
        display: none;
    }

    .sign-in-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }

    .search-modal-inner {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 0.875rem 0;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .custom-logo {
        max-height: 45px;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .header-actions button,
    .header-actions a:not(.sign-in-btn) {
        padding: 0.375rem;
    }

    .sign-in-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .search-modal-inner {
        padding: 1.5rem;
        width: 95%;
    }

    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #e94b8a;
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles */
.header-actions button:focus,
.header-actions a:focus,
.menu-toggle:focus,
.mobile-menu-close:focus,
.search-close:focus {
    outline: 2px solid #ffeb3b;
    outline-offset: 2px;
}