/* Header Styles */
#header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 12px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-img {
    display: inline-block;
    vertical-align: middle;
    width: 126px;
    height: auto;
}

.header-nav {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credits-display {
    display: none;
    align-items: center;
    background-color: #f3e8ff;
    border-radius: 0.5rem;
    padding: 6px 8px;
}

.credits-icon {
    width: 24px;
    height: 24px;
    background-color: #facc15;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.credits-icon span {
    color: #9333ea;
    font-weight: 700;
    font-size: 0.75rem;
}

.credits-text {
    font-size: 0.75rem;
}

.credits-text span {
    color: #9333ea;
    font-weight: 500;
}

.user-avatar-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease-in-out;
}

.user-avatar-btn:hover {
    opacity: 0.9;
}

.user-avatar-btn span {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.user-dropdown {
    position: absolute;
    right: 0;
    margin-top: 8px;
    width: 192px;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: none;
    z-index: 50;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

.user-dropdown a:hover {
    background-color: #f3f4f6;
}

.user-dropdown a.logout {
    color: #dc2626;
}

.header-btn {
    padding: 6px 12px;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity 0.15s ease-in-out;
}

.header-btn:hover {
    opacity: 0.9;
}

.header-btn-login {
    color: #374151;
    border: 1px solid #d1d5db;
    background-color: white;
}

.header-btn-login:hover {
    background-color: #f9fafb;
}

.header-btn-primary {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    color: white;
}

.header-btn-icon {
    margin-right: 4px;
    display: none;
}

.header-btn-text-full {
    display: none;
}

.header-btn-text-short {
    display: inline;
}

.header-btn-text-now {
    display: none;
}

/* Try On Menu Dropdown Styles */
.tryon-menu-wrapper {
    position: relative;
}

.tryon-menu-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tryon-menu-arrow {
    transition: transform 0.2s ease;
}

.tryon-menu-item:hover .tryon-menu-arrow,
.tryon-menu-item.active .tryon-menu-arrow {
    transform: rotate(180deg);
}

/* Ensure sub-menu is positioned relative to the menu item */
.tryon-menu-item {
    position: relative;
}

/* Mega Menu Style - Card-like container with gradient background */
.tryon-menu-item .sub-menu,
.tryon-menu-item .tryon-dropdown,
.sub-menu.tryon-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    min-width: 320px;
    background: linear-gradient(to bottom, rgba(243, 232, 255, 0.95), rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(147, 51, 234, 0.1);
    display: none;
    z-index: 50;
    overflow: hidden;
    list-style: none;
    margin: 12px 0 0 0;
    padding: 8px;
    gap: 4px;
}

.tryon-menu-item:hover .sub-menu,
.tryon-menu-item:hover .tryon-dropdown,
.tryon-menu-item.active .sub-menu,
.tryon-menu-item.active .tryon-dropdown,
.tryon-menu-item:hover .sub-menu.tryon-dropdown,
.tryon-menu-item.active .sub-menu.tryon-dropdown {
    display: block;
}

.tryon-menu-item .sub-menu li,
.tryon-menu-item .tryon-dropdown li,
.sub-menu.tryon-dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.tryon-menu-item .sub-menu li:first-child,
.tryon-menu-item .tryon-dropdown li:first-child,
.sub-menu.tryon-dropdown li:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Mega Menu Item Styling */
.tryon-menu-item .sub-menu a,
.tryon-menu-item .tryon-dropdown a,
.sub-menu.tryon-dropdown a,
.tryon-dropdown-item {
    display: block;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(147, 51, 234, 0.1);
    margin: 0 0 4px 0;
    text-align: left;
}

.tryon-menu-item .sub-menu li:last-child a,
.tryon-menu-item .tryon-dropdown li:last-child a,
.sub-menu.tryon-dropdown li:last-child a,
.tryon-dropdown li:last-child .tryon-dropdown-item {
    margin-bottom: 0;
}

.tryon-menu-item .sub-menu a:hover,
.tryon-menu-item .tryon-dropdown a:hover,
.sub-menu.tryon-dropdown a:hover,
.tryon-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(147, 51, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Title and Subtitle Styling for Mega Menu */
.tryon-menu-item .sub-menu a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    text-align: left;
}

.tryon-dropdown-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.tryon-dropdown-subtitle {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
    font-weight: 400;
}

/* If link doesn't have tryon-dropdown-title structure, style it directly */
.tryon-menu-item .sub-menu a:not(:has(.tryon-dropdown-title)) {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
    padding: 20px;
}

/* Add subtitle support for WordPress menu descriptions */
.tryon-menu-item .sub-menu a::after {
    content: attr(data-subtitle);
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 4px;
    font-weight: 400;
}

.tryon-menu-item .sub-menu a:not([data-subtitle])::after {
    display: none;
}

/* Tablet and up (640px+) */
@media (min-width: 640px) {
    .header-container {
        padding: 0 16px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .credits-display {
        display: flex;
    }
    
    .credits-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .credits-icon span {
        font-size: 0.875rem;
    }
    
    .credits-text {
        font-size: 0.875rem;
    }
    
    .user-avatar-btn {
        width: 40px;
        height: 40px;
    }
    
    .user-avatar-btn span {
        font-size: 0.875rem;
    }
    
    .header-btn {
        padding: 8px 20px;
        font-size: 0.875rem;
    }
    
    .header-btn-icon {
        display: inline-block;
    }
    
    .header-btn-text-full {
        display: inline;
    }
    
    .header-btn-text-short {
        display: none;
    }
}

/* Medium screens and up (768px+) */
@media (min-width: 768px) {
    .header-container {
        padding: 0 24px;
    }
    
    .header-inner {
        height: 80px;
    }
    
    .logo-img {
        width: 160px;
    }
    
    .header-nav {
        display: flex;
        align-items: center;
        gap: 32px;
    }
    
    .header-actions {
        gap: 16px;
    }
    
    .credits-display {
        padding: 8px 12px;
    }
    
    .header-btn {
        padding: 8px 24px;
        font-size: 0.875rem;
    }
    
    .header-btn-text-now {
        display: inline;
    }
}

/* Large screens and up (1024px+) */
@media (min-width: 1024px) {
    .header-container {
        padding: 0 32px;
    }
    
    .header-inner {
        height: 96px;
    }
    
    .logo-img {
        width: 192px;
    }
    
    .header-btn {
        padding: 8px 24px;
        font-size: 1rem;
    }
    
    .tryon-dropdown {
        min-width: 320px;
    }
}

