/**
 * Clean Header Design - All Menu Items in One Row
 * Professional, modern, responsive
 */

/* ===================================
   HEADER CONTAINER
   =================================== */

.header2 {
    background: linear-gradient(135deg, #c8906b 0%, #3A4532 100%) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999999;
    border-bottom: 2px solid rgba(139, 115, 85, 0.3);
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.header2.scrolled {
    background: linear-gradient(135deg, #3A4532 0%, #c8906b 100%) !important;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Add padding to body for fixed header */
body {
    padding-top: 45px !important;
}

/* ===================================
   HEADER MAIN
   =================================== */

.header-main {
    padding: 5px;
    margin: 0;
}

.header-main-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
}

/* ===================================
   LEFT SIDE: LOGO + NAVIGATION
   =================================== */

.header-main-left {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
}

/* Logo Styling */
.header-logo {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(244, 208, 63, 0.3);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.header-logo img {
    max-height: 50px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

.header-logo:hover {
    box-shadow: 0 4px 20px rgba(244, 208, 63, 0.4);
    transform: translateY(-2px);
    border-color: rgba(244, 208, 63, 0.6);
}

/* Navigation Menu */
.main-menu {
    flex: 1;
}

.primary-menu {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.25rem !important;
    flex-wrap: nowrap !important;
}

.primary-menu>li {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    position: relative;
}

.primary-menu>li>a {
    color: white !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 0.75rem 1.25rem !important;
    display: block !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    border-radius: 8px;
}

.primary-menu>li>a:hover,
.primary-menu>li.active>a {
    color: #f4d03f !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Mega Menu Toggle Specific */
.kemet-mega-menu>.mega-menu-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}

/* ===================================
   RIGHT SIDE: CURRENCY + CART + ACCOUNT
   =================================== */

.header-main-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Add spacing between cart and admin buttons */
.action-item {
    margin-right: 1rem;
}

.user-btn {
    margin-left: 0.5rem;
}

/* Unified Button Style for Currency, Cart, Account */
.currency-selector-wrapper,
.action-list,
.user-btn {
    display: inline-flex;
}

.currency-toggle,
.action-item a,
.user-btn a {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(244, 208, 63, 0.4) !important;
    border-radius: 12px !important;
    padding: 0.65rem 1rem !important;
    color: #3a4532 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
    white-space: nowrap;
    height: 46px;
}

.currency-toggle:hover,
.action-item a:hover,
.user-btn a:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f9e79f 100%) !important;
    color: #3a4532 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.5) !important;
    border-color: #f4d03f !important;
}

.currency-toggle .currency-flag {
    font-size: 1.3rem;
}

/* Cart Badge */
.action-item-number {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: -0.25rem;
}

.cart-items-price {
    background: linear-gradient(135deg, #f4d03f 0%, #f9e79f 100%);
    color: #3a4532;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 0.25rem;
    border: 2px solid rgba(58, 69, 50, 0.2);
}

/* ===================================
   RESPONSIVE - DESKTOP FIRST
   =================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .primary-menu {
        gap: 0.5rem !important;
    }

    .primary-menu>li>a {
        padding: 0.75rem 1.5rem !important;
        font-size: 1.05rem !important;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .header-main-left {
        gap: 2rem;
    }

    .primary-menu {
        gap: 0.25rem !important;
    }

    .primary-menu>li>a {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }

    .header-main-right {
        gap: 0.5rem;
    }

    .currency-toggle,
    .action-item a,
    .user-btn a {
        padding: 0.6rem 0.85rem !important;
        font-size: 0.85rem !important;
    }
}

.currency-symbol {
    display: none !important;
}

/* Tablet (768px - 991px) - Hide menu, show mobile toggle */
@media (max-width: 991px) {
    .main-menu {
        display: none !important;
    }

    .header-main-left {
        gap: 1rem;
    }

    .header-main-right {
        gap: 0.5rem;
    }

    /* Keep currency and minimal icons */
    .currency-toggle {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem !important;
        min-width: auto;
    }

    .currency-text {
        display: none;
        /* Hide text on small screens */
    }

    .currency-symbol {
        display: inline !important;
    }

    .action-item a,
    .user-btn a {
        padding: 0.6rem !important;
        min-width: auto;
    }

    .cart-text,
    .account-text {
        display: none;
        /* Show icons only */
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    body {
        padding-top: 35px !important;
    }

    .header-main {
        padding: 5px;
        margin: 0;
    }

    .header-logo {
        padding: 0.5rem 0.8rem;
    }

    .header-logo img {
        max-height: 50px !important;
    }

    .header-main-content-wrapper {
        gap: 0.75rem;
    }

    .header-main-right {
        gap: 0.4rem;
    }

    .currency-toggle,
    .action-item a,
    .user-btn a {
        padding: 0.5rem 0.7rem !important;
        font-size: 0.8rem !important;
        height: 40px;
    }

    .currency-flag {
        font-size: 1.1rem !important;
    }
}

/* Extra Small (< 480px) */
@media (max-width: 479px) {
    .header-main-content-wrapper {
        gap: 0.5rem;
    }

    .header-main-right {
        gap: 0.3rem;
    }

    .currency-toggle,
    .action-item a,
    .user-btn a {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
        height: 38px;
    }

    .action-item-number {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .cart-items-price {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ===================================
   CLEAN VISUAL ENHANCEMENTS
   =================================== */

/* Smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container adjustments */
.header-main .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Ensure header height fits content exactly */
.header2 {
    height: auto;
    min-height: auto;
}

.header-main {
    height: auto;
    min-height: auto;
}

/* Remove Bootstrap row/col spacing issues */
.header-main .row {
    margin: 0;
}

.header-main [class*="col-"] {
    padding: 0;
}

/* Clean alignments */
.header-main-content-wrapper {
    width: 100%;
}

/* Ensure everything stays in one line on desktop */
@media (min-width: 992px) {
    .header-main-content-wrapper {
        display: flex;
        flex-wrap: nowrap !important;
        align-items: center;
    }

    .header-main-left,
    .header-main-right {
        display: flex;
        flex-wrap: nowrap !important;
        align-items: center;
    }

    .primary-menu {
        flex-wrap: nowrap !important;
    }

    .action-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
    }
}

/* ===================================
   REMOVE WHITE SPACE BELOW HEADER
   =================================== */

/* Force all main content areas to have no top margin */
.site-main,
#main {
    margin-top: 0px !important;
}


/* ===================================
   MOBILE HAMBURGER MENU
   =================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.hamburger-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(244, 208, 63, 0.4);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #f9e79f 100%);
    border-color: #f4d03f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.4);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #3a4532;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Hamburger animation when active */
.mobile-menu-open .hamburger-btn .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open .hamburger-btn .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .hamburger-btn .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 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: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, #3A4532 0%, #5a6547 100%);
    z-index: 1000;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 80px 0 20px 0;
    max-height: 100vh;
    overflow-y: auto;
}

.mobile-menu-open .mobile-menu {
    transform: translateY(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.mobile-menu-logo img {
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(244, 208, 63, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.mobile-menu-close:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: #f4d03f;
    color: #f4d03f;
    transform: rotate(90deg);
}

.mobile-menu .primary-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu .primary-menu li {
    width: 100%;
    max-width: 400px;
}

.mobile-menu .primary-menu a {
    display: block;
    padding: 1.2rem 2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 0 1rem;
    text-align: center;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu .primary-menu a:hover {
    background: rgba(244, 208, 63, 0.2);
    border-color: #f4d03f;
    color: #f4d03f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.3);
}

/* Mobile Menu Mega Menu Toggle */
.mobile-menu .mega-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu .mega-menu-toggle i {
    transition: transform 0.3s ease;
}

.mobile-menu .mega-menu-toggle.active i {
    transform: rotate(180deg);
}

/* Mobile Account Section */
.mobile-account-section {
    border-top: 2px solid rgba(244, 208, 63, 0.3);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.mobile-account-item a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.2rem 2rem !important;
    background: linear-gradient(135deg, rgba(244, 208, 63, 0.2) 0%, rgba(244, 208, 63, 0.1) 100%);
    border-radius: 12px;
    margin: 0 1rem;
    border: 2px solid rgba(244, 208, 63, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
}

.mobile-account-item a:hover {
    background: linear-gradient(135deg, rgba(244, 208, 63, 0.3) 0%, rgba(244, 208, 63, 0.2) 100%);
    border-color: #f4d03f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.4);
}

.mobile-account-item i {
    font-size: 1.3rem;
    color: #f4d03f;
}

.mobile-account-item span {
    font-weight: 600;
    color: white;
}

/* ===================================
   MOBILE MEGA MENU
   =================================== */

/* Mobile Mega Menu Toggle - Mobile Only */
@media (max-width: 991px) {
    .mobile-mega-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        cursor: pointer;
    }

    .mobile-mega-arrow {
        transition: transform 0.3s ease;
        font-size: 0.9rem;
    }

    .mobile-mega-menu.active .mobile-mega-arrow {
        transform: rotate(180deg);
    }

    .mobile-mega-menu.active .mobile-mega-content {
        transform: translateX(0) !important;
        display: block !important;
    }
}

/* Hide mobile mega menu on desktop */
@media (min-width: 992px) {
    .mobile-mega-menu .mobile-mega-content {
        display: none !important;
    }

    .mobile-mega-menu .mobile-mega-toggle {
        pointer-events: none;
    }
}

/* Ensure desktop mega menu works normally */
@media (min-width: 992px) {
    .desktop-mega-menu .mega-menu-toggle {
        pointer-events: auto;
    }
}

/* Hide desktop mega menu on mobile */
@media (max-width: 991px) {
    .desktop-mega-menu {
        display: none !important;
    }
}

/* Mobile Mega Menu Content */
.mobile-mega-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #3A4532 0%, #5a6547 100%);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 80px 0 20px 0;
    display: none;
}

.mobile-mega-menu.active .mobile-mega-content {
    transform: translateX(0);
    display: block;
}

/* Debug: Make sure mobile mega menu is visible on mobile */
@media (max-width: 991px) {
    .mobile-mega-content {
        display: block;
    }

    /* Add visual feedback for debugging */
    .mobile-mega-toggle {
        background: rgba(244, 208, 63, 0.1) !important;
        border: 2px solid rgba(244, 208, 63, 0.3) !important;
    }

    .mobile-mega-menu.active .mobile-mega-toggle {
        background: rgba(244, 208, 63, 0.2) !important;
        border-color: #f4d03f !important;
    }
}

/* Mobile Mega Header */
.mobile-mega-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(244, 208, 63, 0.3);
    margin-bottom: 2rem;
}

.mobile-mega-header h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.mobile-mega-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(244, 208, 63, 0.2);
    border: 2px solid rgba(244, 208, 63, 0.4);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-mega-back:hover {
    background: rgba(244, 208, 63, 0.3);
    border-color: #f4d03f;
    transform: translateX(-3px);
}

/* Mobile Category Grid */
.mobile-category-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.mobile-category-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(244, 208, 63, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-category-item:hover {
    background: rgba(244, 208, 63, 0.15);
    border-color: #f4d03f;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f4d03f 0%, #f39c12 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon i {
    font-size: 1.5rem;
    color: #3A4532;
}

.category-info {
    flex: 1;
}

.category-info h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.category-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.category-count {
    color: #f4d03f;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(244, 208, 63, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

/* Mobile Mega Actions */
.mobile-mega-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 2rem;
}

.mobile-mega-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #f4d03f 0%, #f39c12 100%);
    color: #3A4532;
    padding: 1.2rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mobile-mega-action-btn:hover {
    background: linear-gradient(135deg, #f39c12 0%, #f4d03f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.4);
    color: #3A4532;
}

.mobile-mega-action-btn i {
    font-size: 1.2rem;
}

/* ===================================
   RESPONSIVE MOBILE MENU
   =================================== */

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 992px) {

    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile menu styles for smaller screens */
@media (max-width: 991px) {
    .desktop-menu {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Responsive mobile menu improvements */
@media (max-width: 480px) {
    .mobile-menu {
        padding: 70px 0 15px 0;
    }

    .mobile-menu-header {
        padding: 1rem 1.5rem;
    }

    .mobile-menu .primary-menu a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        margin: 0 0.5rem;
    }

    .mobile-account-item a {
        padding: 1rem 1.5rem !important;
        font-size: 1rem;
        margin: 0 0.5rem;
    }

    /* Mobile Mega Menu Responsive */
    .mobile-mega-header {
        padding: 1rem 1.5rem;
    }

    .mobile-mega-header h3 {
        font-size: 1.3rem;
    }

    .mobile-category-grid {
        padding: 0 1.5rem;
    }

    .mobile-category-item {
        padding: 1rem;
    }

    .category-icon {
        width: 50px;
        height: 50px;
    }

    .category-icon i {
        font-size: 1.2rem;
    }

    .category-info h4 {
        font-size: 1.1rem;
    }

    .mobile-mega-actions {
        padding: 0 1.5rem;
    }

    .mobile-mega-action-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

iframe {
    z-index: 999999999 !important;
}