/* ===== HEADER STYLES ===== */
/* Using Navy Blue & Gold Bar & Lounge Color Palette */

:root {
    /* Navy Blue & Gold Gradient Colors - Perfect for Bar & Lounge */
    --primary-gradient-start: #0a1928;
    --primary-gradient-end: #1a3e5c;
    --secondary-gradient-start: #c4a052;
    --secondary-gradient-end: #e4c580;
    
    /* UI Colors - Luxury Bar Theme */
    --primary-color: #c4a052;
    --primary-hover: #b48c3a;
    --secondary-color: #8a6e45;
    --secondary-hover: #7a5e35;
    --accent-color: #f3e9c0;
    
    /* Neutral Colors - Refined */
    --white: #ffffff;
    --light-bg: #f8f7f4;
    --border-color: #d4cfc4;
    --text-dark: #1e2a36;
    --text-medium: #3a4a5a;
    --text-light: #5f6b7a;
    --text-muted: #7c8a99;
    
    /* Status Colors - Refined */
    --success-color: #2e7d5e;
    --error-color: #b4433c;
    --warning-color: #e6b422;
    --info-color: #4a7a9c;
    
    /* Shadows - Warmer & Sophisticated */
    --shadow-light: 0 4px 12px rgba(10, 25, 40, 0.15);
    --shadow-medium: 0 7px 14px rgba(196, 160, 82, 0.25);
    --shadow-heavy: 0 15px 30px rgba(10, 25, 40, 0.25);
    
    /* Border Radius */
    --radius-small: 5px;
    --radius-medium: 8px;
    --radius-large: 10px;
    --radius-xl: 20px;
    --radius-circle: 50%;
    
    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 30px;
    --space-xl: 40px;
    --space-xxl: 50px;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.9rem;
    --text-base: 1rem;
    --text-md: 1.1rem;
    --text-lg: 1.2rem;
    --text-xl: 1.3rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.8rem;
    --text-4xl: 2.2rem;
    --text-5xl: 2.8rem;
    
    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-alert: 1000;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
}

.main-header {
    background: linear-gradient(135deg, #0a1928 0%, #1a3e5c 100%);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    border-bottom: 2px solid var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-heavy);
}

.logo img {
    height: 40px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid rgba(196, 160, 82, 0.3);
}

.logo:hover img {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* Search Bar */
.search {
    position: relative;
    flex: 1;
    max-width: 350px;
}

.search input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.search input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(196, 160, 82, 0.25);
}

.search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 16px;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.search button:hover {
    color: var(--primary-hover);
    background: rgba(196, 160, 82, 0.1);
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.top-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
    background-color: rgba(10, 25, 40, 0.3);
    border: 1px solid rgba(196, 160, 82, 0.3);
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
}

.top-link:hover {
    background-color: rgba(196, 160, 82, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(196, 160, 82, 0.2);
    border-color: var(--primary-color);
}

.top-link i {
    font-size: 16px;
    color: var(--primary-color);
}

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

#screen-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background-color: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--radius);
    color: var(--text-medium);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

#screen-content a {
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
}

#screen-content a:last-child {
    border-bottom: none;
}

#screen-content a:hover {
    background-color: rgba(196, 160, 82, 0.08);
    color: var(--primary-color);
}

#screen-content a i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: var(--shadow-heavy);
    z-index: 1001;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(196, 160, 82, 0.08);
    color: var(--primary-color);
}

.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content a i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

/* Product Overlay */
.product-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(10, 25, 40, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.product-overlay.active {
    display: flex;
}

.product-modal {
    background: var(--white);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--primary-color);
}

.product-details-container {
    padding-top: 10px;
    font-size: 16px;
    color: var(--text-dark);
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 160, 82, 0.1);
}

.close-btn:hover {
    background-color: var(--primary-color);
    color: #0a1928;
    transform: rotate(90deg);
}

/* Suggestions */
.suggestions {
    display: none;
    position: absolute;
    color: var(--text-medium);
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--text-dark);
}

.suggestions li:hover {
    background-color: rgba(196, 160, 82, 0.08);
    color: var(--primary-color);
}

.suggestions li:last-child {
    border-bottom: none;
}

/* Small screen search */
.searchsmallScreen {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 15px;
    z-index: 1000;
    box-shadow: var(--shadow-heavy);
    border-bottom: 1px solid var(--primary-color);
}

.search-icon-sm {
    display: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
    background: rgba(10, 25, 40, 0.3);
    border: 1px solid rgba(196, 160, 82, 0.3);
}

.search-icon-sm:hover {
    background-color: rgba(196, 160, 82, 0.15);
    transform: scale(1.1);
    border-color: var(--primary-color);
}

/* Mobile Search Styles */
.mobilesearch {
    position: relative;
}

.mobilesearch input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-dark);
}

.mobilesearch input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(196, 160, 82, 0.25);
}

.mobilesuggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.mobileproduct-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(10, 25, 40, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.mobileproduct-modal {
    background: var(--white);
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--primary-color);
}

.mobileclose-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a1928;
    font-weight: bold;
}

.mobileclose-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Product Detail Styles */
.product-details-container {
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.product-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.detail-item {
    background-color: var(--light-bg);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-left-color: var(--primary-hover);
}

.detail-label {
    font-weight: bold;
    color: var(--text-medium);
    display: block;
    margin-bottom: 5px;
    font-size: 0.875rem;
}

.detail-value {
    color: var(--text-dark);
    font-size: 14px;
}

/* Status Styles */
.detail-value.in-stock {
    color: var(--success-color);
    font-weight: bold;
}

.detail-value.low-stock {
    color: var(--warning-color);
    font-weight: bold;
}

.detail-value.expired {
    color: var(--error-color);
    font-weight: bold;
}

.detail-value.expiring-soon {
    color: var(--warning-color);
    font-weight: bold;
}

.detail-value.not-available {
    color: var(--text-medium);
    font-style: italic;
}

/* Search Small Screen Visibility */
.searchss {
    display: none !important;
}

/* Notification Styles */
.notification-badge {
    background: var(--primary-color);
    color: #0a1928;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    display: none;
    transition: var(--transition);
    min-width: 18px;
    text-align: center;
}

.notification-badge.new-notification {
    animation: pulse 0.5s ease-in-out 3;
    box-shadow: 0 0 10px rgba(196, 160, 82, 0.7);
}

.notification-badge:not(:empty) {
    display: inline-block;
}

.notif-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-heavy);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notif-item:hover {
    background: rgba(196, 160, 82, 0.08);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.new {
    background-color: rgba(196, 160, 82, 0.08);
    border-left: 3px solid var(--primary-color);
}

.notif-item strong {
    color: var(--text-dark);
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.notif-item small {
    color: var(--text-medium);
    font-size: 12px;
}

/* Notification dropdown container */
.notification-dropdown {
    position: relative;
    display: inline-block;
}

#orders-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    position: relative;
}

#orders-link:hover {
    background-color: rgba(196, 160, 82, 0.15);
}

.notification-dropdown:hover .notif-list {
    display: block;
}

/* Animation for new notifications */
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .quick-links span {
        display: none;
    }
    
    .top-link {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .main-header {
        padding: 10px;
        flex-wrap: nowrap;
        gap: 5px;
    }
    
    .logo img {
        max-height: 30px;
    }
    
    .search {
        display: none;
    }
    
    .search-icon-sm {
        display: block;
    }
    
    .quick-links {
        display: none;
    }
    
    .dropdown-content {
        right: auto;
        left: 0;
        width: 200px;
    }
    
    /* Show only icons on mobile */
    .banking-dropdown span,
    .payroll-dropdown span,
    .help-menu span,
    .account-menu span {
        display: none !important;
    }
    
    /* Keep account dropdown compact and under button on mobile */
    .dropdown.account-menu .dropdown-content {
        position: absolute !important;
        width: 200px !important;
        left: auto !important;
        right: 0 !important;
        top: 100% !important;
        color: white;
        box-shadow: var(--shadow-heavy);
        border-radius: var(--radius);
        z-index: 1001;
        background: var(--white);
    }
    
    .menu-dropdown-wrapper.active .dropdown-content {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Other dropdowns appear below the button */
    .dropdown.active .dropdown-content {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 200px;
        z-index: 1000;
    }
    
    .dropdown.account-menu .top-link {
        background-color: rgba(196, 160, 82, 0.2) !important;
        color: white !important;
        border-color: var(--primary-color);
    }
    
    .dropdown.account-menu .top-link i {
        color: var(--primary-color) !important;
    }
    
    .dropdown.account-menu .top-link:hover {
        background-color: rgba(196, 160, 82, 0.3) !important;
    }
    
    /* Show search small screen */
    .searchss {
        display: inline-block !important;
    }
    
    .searchsmallScreen {
        top: 50px;
    }
    
    .notif-list {
        width: 280px;
        max-height: 350px;
    }
}

@media screen and (max-width: 480px) {
    .main-header {
        padding: 8px 5px;
    }
    
    .top-link {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .dropdown-content,
    #screen-content {
        width: 180px;
    }
    
    .product-modal,
    .mobileproduct-modal {
        width: 98%;
        padding: 15px;
    }
    
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .notif-list {
        width: 250px;
        max-height: 300px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: 0 0 0 1px #000000;
    }
    
    .search input[type="text"]:focus,
    .mobilesearch input[type="text"]:focus {
        border-width: 2px;
    }
    
    .top-link {
        border: 2px solid white;
    }
    
    .notification-badge {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .top-link:hover,
    .detail-item:hover,
    .close-btn:hover,
    .mobileclose-btn:hover,
    .search button:hover,
    .search-icon-sm:hover {
        transform: none;
    }
    
    .notification-badge.new-notification {
        animation: none;
    }
}

/* Focus indicators for accessibility */
.search input[type="text"]:focus-visible,
.mobilesearch input[type="text"]:focus-visible,
.top-link:focus-visible,
.close-btn:focus-visible,
.mobileclose-btn:focus-visible,
.search button:focus-visible,
.search-icon-sm:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .main-header {
        background: linear-gradient(135deg, #0a1928, #1a3e5c);
    }
    
    .product-modal,
    .mobileproduct-modal,
    .dropdown-content,
    #screen-content,
    .suggestions,
    .mobilesuggestions,
    .notif-list {
        background: #0f1f2f;
        border-color: var(--primary-color);
    }
    
    .dropdown-content a,
    #screen-content a,
    .suggestions li,
    .notif-item {
        color: var(--light-bg);
        border-color: rgba(196, 160, 82, 0.2);
    }
    
    .dropdown-content a:hover,
    #screen-content a:hover,
    .suggestions li:hover,
    .notif-item:hover {
        background-color: rgba(196, 160, 82, 0.15);
        color: var(--primary-light);
    }
    
    .search input[type="text"],
    .mobilesearch input[type="text"] {
        background: #1e2a36;
        border-color: var(--primary-color);
        color: white;
    }
    
    .search input[type="text"]::placeholder,
    .mobilesearch input[type="text"]::placeholder {
        color: var(--text-light);
    }
    
    .search button {
        color: var(--primary-color);
    }
    
    .search button:hover {
        color: var(--primary-light);
        background: rgba(196, 160, 82, 0.2);
    }
    
    .product-details-container,
    .detail-value {
        color: var(--light-bg);
    }
    
    .detail-label {
        color: var(--text-light);
    }
    
    .detail-item {
        background: #1e2a36;
        border-left-color: var(--primary-color);
    }
    
    .notif-item strong {
        color: var(--light-bg);
    }
    
    .notif-item small {
        color: var(--text-light);
    }
    
    .notif-item.new {
        background-color: rgba(196, 160, 82, 0.1);
        border-left-color: var(--primary-light);
    }
    
    .notification-badge {
        background: var(--primary-color);
        color: #0a1928;
    }
}

/* Print Styles */
@media print {
    .main-header {
        display: none !important;
    }
    
    .searchsmallScreen {
        display: none !important;
    }
}

/* Custom scrollbar for suggestions and notifications */
.suggestions::-webkit-scrollbar,
.mobilesuggestions::-webkit-scrollbar,
.notif-list::-webkit-scrollbar,
#chat-box::-webkit-scrollbar {
    width: 6px;
}

.suggestions::-webkit-scrollbar-track,
.mobilesuggestions::-webkit-scrollbar-track,
.notif-list::-webkit-scrollbar-track,
#chat-box::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.suggestions::-webkit-scrollbar-thumb,
.mobilesuggestions::-webkit-scrollbar-thumb,
.notif-list::-webkit-scrollbar-thumb,
#chat-box::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.suggestions::-webkit-scrollbar-thumb:hover,
.mobilesuggestions::-webkit-scrollbar-thumb:hover,
.notif-list::-webkit-scrollbar-thumb:hover,
#chat-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Dark mode scrollbars */
@media (prefers-color-scheme: dark) {
    .suggestions::-webkit-scrollbar-track,
    .mobilesuggestions::-webkit-scrollbar-track,
    .notif-list::-webkit-scrollbar-track,
    #chat-box::-webkit-scrollbar-track {
        background: #1e2a36;
    }
    
    .suggestions::-webkit-scrollbar-thumb,
    .mobilesuggestions::-webkit-scrollbar-thumb,
    .notif-list::-webkit-scrollbar-thumb,
    #chat-box::-webkit-scrollbar-thumb {
        background: var(--primary-color);
    }
}