/* ===================================
   HEADER COMPONENT - FULL WIDTH MENU
   =================================== */

header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1040;
    transition: box-shadow 0.3s ease;
    width: 100%;
    border-bottom: 1px solid var(--active-link);
}

header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Header Container - Full Width Layout */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Left Column - Logo/Branding */
.header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    padding-right: 25px;
}

.logo .custom-logo-link img {
    max-width: 180px;
    height: auto;
    width: auto;
}

/* Center Column - Navigation */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-navigation {
    width: 100%;
}

.main-navigation .navbar-collapse {
    justify-content: center !important;
    display: flex !important;
}

.main-navigation .navbar-collapse.show {
    display: flex !important;
}

.main-navigation .navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.main-navigation .navbar-nav .nav-item {
    margin: 0;
}

.main-navigation .navbar-nav .nav-link {
    color: var(--text-color, #3A3A3C);
    font-weight: 500;
    font-size: 16px;
    padding: 10px 16px;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    white-space: nowrap;
}

.main-navigation .navbar-nav .nav-link:hover,
.main-navigation .navbar-nav .nav-link.active {
    color: var(--primary-color, #175f53);
    background-color: rgba(23, 95, 83, 0.08);
}

.main-navigation .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color, #175f53);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation .navbar-nav .nav-link:hover::after,
.main-navigation .navbar-nav .nav-link.active::after {
    width: 70%;
}

/* Dropdown Menus */
.main-navigation .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.main-navigation .dropdown-menu .nav-link {
    padding: 8px 20px;
    color: var(--text-color, #3A3A3C);
    font-weight: 400;
}

.main-navigation .dropdown-menu .nav-link:hover {
    background-color: var(--primary-color, #104239);
    color: white;
}

/* Right Column - Icons */
.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Header Icons - 100% Height with Primary Color Separators */
.header-icons {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    height: 100%;
    gap: 0;
}

.header-icons button,
.header-icons a {
    background: none;
    border: none;
    border-right: 1px solid var(--active-link);
    padding: 0;
    margin: 0;
    height: 75px;
    width: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.header-icons button:first-child,
.header-icons a:first-child {
    border-left: none;
}

.header-icons button:hover,
.header-icons a:hover {
    background-color: rgba(23, 95, 83, 0.08);
}

.header-icons button:active,
.header-icons a:active {
    background-color: rgba(23, 95, 83, 0.15);
}

.header-icons img {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    transition: all 0.3s ease;
    object-fit: contain;
    display: block;
}

/* Cart Badge */
.luckylaktheme-cart-icon {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Search Bar */
#search-bar {
    background: white;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-bar-content {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-bar-content .form-control {
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.search-bar-content .form-control:focus {
    border-color: var(--primary-color, #104239);
    box-shadow: 0 0 0 0.25rem rgba(16, 66, 57, 0.25);
}

.search-bar-content .search-btn {
    background: var(--primary-color, #104239);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-bar-content .search-btn:hover {
    background: #0d5d52;
    transform: translateY(-1px);
}

.btn-close {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hide on desktop */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Bootstrap Offcanvas Customization for Mobile Menu */
#mobileMenuOffcanvas {
    width: max(70%, 280px);
}

#mobileMenuOffcanvas .offcanvas-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

#mobileMenuOffcanvas .offcanvas-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color, #3A3A3C);
}

#mobileMenuOffcanvas .btn-close {
    margin: 0;
}

#mobileMenuOffcanvas .offcanvas-body {
    padding: 0;
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    width: 100%;
}

.mobile-menu-nav .navbar-nav {
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-menu-nav .nav-item {
    margin: 0;
    width: 100%;
}

.mobile-menu-nav .nav-link {
    display: block;
    color: var(--text-color, #3A3A3C);
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.mobile-menu-nav .nav-link:hover,
.mobile-menu-nav .nav-link.active {
    color: var(--primary-color, #104239);
    background-color: rgba(23, 95, 83, 0.05);
    padding-right: 30px;
}

.mobile-menu-nav .nav-item:last-child .nav-link {
    border-bottom: none;
}


/* Breadcrumbs */
.web-breadcrumbs {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.web-breadcrumbs .woocommerce-breadcrumb {
    margin: 0;
    font-size: 0.875rem;
}

.web-breadcrumbs .woocommerce-breadcrumb a {
    color: var(--text-color, #3A3A3C);
    text-decoration: none;
    transition: color 0.3s ease;
}

.web-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: var(--primary-color, #104239);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Desktop - Ensure menu is visible */
@media (min-width: 992px) {
    .header-center {
        display: flex;
    }
}

/* Tablets and Small Desktops */
@media (max-width: 1200px) {
    .header-container {
        padding: 15px 30px;
    }

    .main-navigation .navbar-nav {
        gap: 4px;
    }

    .main-navigation .navbar-nav .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Large Tablets */
@media (max-width: 991px) {
    .header-container {
        padding: 10px 20px;
    }

    .logo .custom-logo-link img {
        max-height: 100px;
        height: 100px;
    }

    .header-center {
        display: none;
    }

    .header-icons {
        height: 55px;
        gap: 8px;
    }

    .header-icons button,
    .header-icons a {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 15px;
    }

    .logo .custom-logo-link img {
        max-width: 140px;
        height: auto;
    }

    .header-icons {
        height: 50px;
        gap: 6px;
    }

    .header-icons button,
    .header-icons a {
        width: 45px;
        height: 45px;
    }

    .header-icons img {
        width: 22px;
        height: 22px;
        min-width: 22px;
        min-height: 22px;
    }
}

@media (max-width: 576px) {
    .header-container {
        padding: 10px 15px;
    }

    .logo .custom-logo-link img {
        max-width: 140px;
        height: auto;
    }

    .header-icons {
        height: 45px;
        gap: 5px;
    }

    .header-icons button,
    .header-icons a {
        width: 42px;
        height: 42px;
        border-radius: 6px;
    }

    .header-icons img {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .header-container {
        padding: 8px 10px;
    }

    .logo .custom-logo-link img {
        max-width: 90px;
    }

    .header-icons {
        gap: 4px;
    }

    .header-icons button,
    .header-icons a {
        width: 38px;
        height: 38px;
    }

    .header-icons img {
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
    }
}

/* RTL Support */
[dir="rtl"] .header-icons {
    flex-direction: row-reverse;
}

[dir="rtl"] .m-menu .nav-link:hover {
    padding-right: 0;
    padding-left: 10px;
}
