/* UI/UX Pro Max - Premium Header Styles (Restored & Cleaned) */

:root {
    --theme-color: #ff6f00;
    /* RX Lifestyle Orange */
    --header-bg: #ffffff;
    --text-primary: #232323;
    --text-secondary: #6d6d6d;
    --border-subtle: #f0f0f0;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --bg-gentle-orange: #fffbf7;
}

/* --- Global Header Improvements --- */
header {
    background-color: var(--header-bg);
    box-shadow: none;
    position: relative;
    z-index: 1000;
}

/* --- Top Row (Logo, Search, Utilities) --- */
.pro-header-top {
    padding: 20px 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.pro-header-top .brand-logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.pro-header-top .brand-logo:hover img {
    transform: scale(1.02);
}

/* Category Button Styled */
.category-menu .btn-solid-default {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    transition: all 0.3s ease;
}

.category-menu .btn-solid-default:hover {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
}

/* Search Box Refined */
.search-box1 .input-group {
    background: #f8f9fa;
    border-radius: 30px;
    /* Pill shape */
    border: 1px solid transparent;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.search-box1 .input-group:focus-within {
    background: #fff;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1);
}

.search-box1 .form-control {
    background: transparent;
    border: none;
    font-size: 14px;
    padding: 12px 20px;
    color: var(--text-primary);
}

.search-box1 .input-group-text {
    background: var(--theme-color);
    /* Orange Background */
    border: none;
    color: #fff;
    /* White Icon */
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box1 .input-group-text:hover {
    background-color: #e56400;
    /* Darker orange on hover */
    color: #fff;
}


/* Right Icons (Wishlist, Cart, Login) */
.menu-right .icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-left: 25px;
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.menu-right .icon-btn:hover {
    color: var(--theme-color);
}

.menu-right .icon-btn i {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.menu-right .icon-btn span.label {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--theme-color);
    color: #fff;
    font-size: 10px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}


/* --- Bottom Row (Navigation) --- */
.pro-header-bottom {
    background-color: #fff;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-menu-pro {
    display: flex;
    justify-content: flex-start;
    /* Left align navigation */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-pro>li {
    margin: 0 40px 0 0;
    /* Right margin only for spacing */
    position: relative;
    padding: 15px 0;
}

.nav-menu-pro>li>a {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
}

.nav-menu-pro>li>a:hover,
.nav-menu-pro>li.active>a {
    color: var(--theme-color);
}

/* Underline Effect */
.nav-menu-pro>li>a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--theme-color);
    transition: width 0.3s ease;
}

.nav-menu-pro>li>a:hover::after {
    width: 100%;
}

/* Special Deal Link */
.nav-menu-pro>li.deal-link>a {
    color: #dc2626;
    /* Red for deals */
}

.nav-menu-pro>li.deal-link>a:hover {
    color: #b91c1c;
}

/* Sticky Header Logic */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Stronger shadow when sticky */
    animation: slideDown 0.3s ease forwards;
    padding: 10px 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Icon Animations */
.menu-right .icon-btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-right .icon-btn:hover {
    transform: scale(1.15) translateY(-2px);
    color: var(--theme-color);
}

/* Search Focus Expansion */
.search-box1 .input-group {
    transition: all 0.4s ease;
}

.search-box1 .input-group:focus-within {
    background: #fff;
    border-color: var(--theme-color);
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.15);
    transform: scale(1.02);
}

/* --- Promo Banner --- */
.promo-banner {
    background: linear-gradient(90deg, #ff6f00 0%, #ff4f00 100%);
    color: #ffffff;
    padding: 12px 0;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.promo-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-white-pulse {
    background: #ffffff;
    color: #ff6f00;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 0 !important;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: pulse-orange 2s infinite;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-white-pulse:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    color: #ff4f00;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* --- Profile Dropdown Styling (Modern Enhanced UI) --- */
.onhover-div.profile-dropdown {
    width: 300px;
    padding: 0;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    z-index: 1001;
    overflow: hidden;
}

/* Explicit Visibility Logic for Dropdown */
.onhover-dropdown {
    position: relative;
}

.onhover-div.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block !important;
}

/* Hover effect for desktop */
@media (min-width: 577px) {
    .onhover-dropdown:hover .onhover-div.profile-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* But not if mobile-mode class is present */
    .onhover-dropdown.mobile-mode:hover .onhover-div.profile-dropdown {
        opacity: 0;
        visibility: hidden;
    }
    
    .onhover-dropdown.mobile-mode:hover .onhover-div.profile-dropdown.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Active class for mobile/click toggle (works on all screen sizes) */
.onhover-div.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header - Modern Glassmorphism */
.dropdown-header {
    background: linear-gradient(135deg, rgba(255, 111, 0, 0.95) 0%, rgba(255, 143, 60, 0.95) 100%);
    padding: 20px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.dropdown-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.dropdown-header h6 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.dropdown-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Enhanced List Styling */
.profile-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 20px;
    list-style: none;
}

.profile-dropdown-list li {
    display: block;
    width: 100%;
}

.profile-dropdown-list li a {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 0;
    font-weight: 600;
    font-size: 15px;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Icon Wrapper - Circular Badge */
.icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.icon-wrapper i,
.icon-wrapper svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5px;
    position: relative;
    z-index: 1;
}

/* Member Option - Purple Theme */
.member-option {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

.member-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.member-icon i,
.member-icon svg {
    color: #fff;
}

.member-option .option-title {
    color: #6d28d9;
}

.member-option .option-subtitle {
    color: #9333ea;
}

.member-option:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(167, 139, 250, 0.15) 100%);
    border-color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.member-option:hover .member-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

/* Customer Option - Teal Theme */
.customer-option {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(45, 212, 191, 0.08) 100%);
    border-color: rgba(20, 184, 166, 0.2);
}

.customer-icon {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
}

.customer-icon i,
.customer-icon svg {
    color: #fff;
}

.customer-option .option-title {
    color: #0f766e;
}

.customer-option .option-subtitle {
    color: #14b8a6;
}

.customer-option:hover {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(45, 212, 191, 0.15) 100%);
    border-color: #14b8a6;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.25);
}

.customer-option:hover .customer-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

/* Option Content - Text Layout */
.option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.option-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.option-subtitle {
    display: block;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Mobile Specific Dropdown Positioning & Optimization --- */
@media (max-width: 768px) {
    /* Responsive Floating Centered Mobile Modal */
    .onhover-div.profile-dropdown {
        position: fixed !important;
        top: 90px !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        width: calc(100vw - 32px) !important;
        max-width: 320px !important;
        border-radius: 20px !important;
        transform: translate(-50%, 15px) !important;
        z-index: 1001 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 0 0 100vmax rgba(0,0,0,0) !important;
        transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.3s ease, opacity 0.3s ease !important;
    }

    /* Ensure hover doesn't work on mobile unless .show is present */
    .onhover-dropdown:hover .onhover-div.profile-dropdown:not(.show) {
        opacity: 0;
        visibility: hidden;
    }

    /* Active state - Dropdown Visible */
    .onhover-dropdown.mobile-mode:hover .onhover-div.profile-dropdown.show,
    .onhover-dropdown:hover .onhover-div.profile-dropdown.show,
    .onhover-div.profile-dropdown.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate(-50%, 0) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 0 0 100vmax rgba(0,0,0,0.5) !important;
    }

    /* Mobile Header - Compact Design */
    .dropdown-header {
        padding: 16px 20px 12px;
        border-radius: 16px 16px 0 0;
        text-align: center;
    }

    .dropdown-header h6 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .dropdown-header p {
        font-size: 12px;
        opacity: 0.9;
    }

    /* Mobile List - Compact yet tappable */
    .profile-dropdown-list {
        gap: 10px;
        padding: 16px 20px; 
    }

    .profile-dropdown-list li a {
        padding: 14px 16px;
        gap: 14px;
        border-radius: 10px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    }

    /* Mobile Icon - Optimized sizing */
    .icon-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .icon-wrapper i,
    .icon-wrapper svg {
        width: 20px;
        height: 20px;
    }

    /* Mobile Text - Optimized sizing */
    .option-title {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .option-subtitle {
        font-size: 11px;
        opacity: 0.8;
    }

    /* Active button state on mobile */
    .icon-btn.active {
        color: var(--theme-color);
        transform: scale(0.95);
    }

    /* Touch feedback for dropdown items */
    .profile-dropdown-list li a:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
        background: #f1f5f9;
    }

    /* --- Hamburger Mobile Sidebar Integration --- */
    /* Ensure the parent block doesn't completely kill the DOM layout, just collapse it */
    .pro-header-bottom.d-none.d-lg-block {
        display: block !important;
        height: 0 !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    
    .pro-header-bottom .container-fluid-lg,
    .pro-header-bottom .row,
    .pro-header-bottom .col-lg-12,
    .pro-header-bottom .main-menu,
    .pro-header-bottom nav,
    .pro-header-bottom .main-navbar,
    .pro-header-bottom #mainnav {
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Reconstruct the sidebar menu from the new header list */
    .nav-menu-pro {
        position: fixed !important;
        top: 0 !important;
        /* Start hidden at the right. NO !important so JS can toggle inline styles */
        right: -410px; 
        width: 320px !important;
        height: 100vh !important;
        background-color: #fff !important;
        z-index: 100000 !important;
        flex-direction: column !important;
        padding: 30px 20px !important;
        transition: right 0.4s ease, opacity 0.4s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15) !important;
        display: block !important;
        overflow-y: auto !important;
    }
    
    .nav-menu-pro > li {
        margin: 0 !important;
        width: 100% !important;
        border-bottom: 1px solid #f1f5f9;
        padding: 0 !important;
    }
    
    .nav-menu-pro > li > a {
        padding: 16px 12px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        display: block !important;
        width: 100% !important;
        text-transform: uppercase !important;
    }
    
    /* Back Button Formatting */
    .nav-menu-pro .back-btn {
        display: block !important;
        padding-bottom: 20px !important;
        border-bottom: 2px solid #e2e8f0 !important;
        margin-bottom: 10px !important;
    }

    .nav-menu-pro .back-btn .close-btn {
        font-size: 18px;
        font-weight: 800;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--text-primary);
        text-transform: uppercase;
    }
}

/* Active State for Mobile Press (Visual Feedback) */
.icon-btn:active,
.cart-media:active {
    transform: scale(0.92);
    opacity: 0.8;
    transition: transform 0.1s ease;
}

/* --- Squared Button Override (User Request) --- */
/* Targeting all button types to enforce squared corners */
.btn,
.btn-solid-default,
.btn-solid-white,
.btn-solid-dark,
.btn-solid-light,
.btn-outline,
button.btn {
    border-radius: 0 !important;
}

/* Ensure pseudo-elements are also squared if they affect shape */
.btn::before,
.btn::after {
    border-radius: 0 !important;
}

/* Also square specific functional buttons if they have rounding */
.cart-btn .btn,
.search-button,
.subscribe-btn {
    border-radius: 0 !important;
}

/* --- Squared Form Fields Override (User Request) --- */
/* Targeting all input types to enforce squared corners */
input,
select,
textarea,
.form-control,
.form-select,
.input-group,
.input-group-text {
    border-radius: 0 !important;
}

/* Specific Fix for Search Input Groups if they use separate radii */
.search-box1 .input-group {
    border-radius: 0 !important;
}