/* Cart visibility for mobile/desktop */
.header-cart--mobile { display: none; }
.header-cart--desktop { display: block; }

@media (max-width: 600px) {
    .header-cart--mobile { display: block !important; }
    .header-cart--desktop { display: none !important; }
}
@media (max-width: 600px) {
    .header-search {
        position: relative !important;
    }
    #search-results-container {
        position: absolute !important;
        top: 100% !important;
				left: -20vw !important;
				right: 0vw !important;
        max-width: 95vw !important;
				width: 90vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
				padding-left: 0 !important;
				padding-right: 0 !important;
				max-height: 75vh !important;
        border-radius: 0 0 12px 12px;
        z-index: 2000 !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    }
    .site-header {
        padding: 0 !important;
    }
    .site-header-content {
        padding: 0 !important;
    }
}


/* Match header width to body/footer on WooCommerce single product pages */
.single-product .site-header-content {
    max-width: 1200px;
}


.site-header, .site-header-content, .header-top-row, .header-bottom-row {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem;
    padding-right: 1rem;
}
.site, .site-header, .site-main, .site-content, .site-footer, .woocommerce, .woocommerce-page, header, main, footer, .wp-site-blocks, .wp-block-group {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

header {
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

/* Site header specific */
header,
.site-header,
.site-header-content,
.header-top-row,
.header-bottom-row {
  padding-left: 1rem;
  padding-right: 1rem;
	max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* ==========================================================================
   HEADER BASE & LAYOUT
   ========================================================================== */

.site-header {
    background-color: #fff;
    border-bottom: 2px solid #eaeaea;
    padding: 0.25rem 0;
}

.site-header-content {
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.header-top-row,
.header-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-top-row {
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.header-bottom-row {
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   HEADER TOP ROW: Logo, Main Menu, Login
   ========================================================================== */

.site-logo {
    flex: 0 1 auto; /* Don't grow, allow shrinking */
}

.site-logo .custom-logo {
    max-height: 50px; /* Adjust as needed */
    width: auto;
}

/* ==========================================================================
   SECONDARY MENU (Header Top)
   ========================================================================== */

.secondary-menu-wrapper {
    flex: 1 1 auto; /* Grow to take available space */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 1rem;
}

.secondary-navigation {
    display: block;
}

.secondary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.secondary-menu li {
    margin: 0;
    padding: 0;
}

.secondary-menu a {
    color: #06283d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.secondary-menu a:hover,
.secondary-menu a:focus {
    color: #1363df;
    border-bottom-color: #1363df;
}

.secondary-menu .current-menu-item a,
.secondary-menu .current-page-parent a {
    color: #1363df;
    border-bottom-color: #1363df;
}

/* Hide secondary menu on mobile and small screens */
@media (max-width: 768px) {
    .secondary-menu-wrapper {
        display: none;
    }
    
    .header-top-row {
        justify-content: space-between;
    }
    
    .site-logo {
        flex: 1 1 auto;
    }
}

/* Responsive adjustments for smaller secondary menu text */
@media (max-width: 1024px) {
    .secondary-menu {
        gap: 1.5rem;
    }
    
    .secondary-menu a {
        font-size: 0.9rem;
    }
}

@media (max-width: 900px) {
    .secondary-menu {
        gap: 1rem;
    }
    
    .secondary-menu a {
        font-size: 0.85rem;
    }
}



.header-login {
    flex: 0 1 auto; /* Don't grow, allow shrinking */
    white-space: nowrap;
    padding-left: 1rem;
}

.header-login .login-link {
    color: #06283d;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.header-login .login-link:hover {
    color: #1363df;
}

.header-login .login-link i {
    font-size: 1.2rem;
}

/* ==========================================================================
   HEADER BOTTOM ROW: Burger, Search, Cart
   ========================================================================== */

.burger-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.site-header__burger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
}

.site-header__burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #06283d;
    border-radius: 2px;
}

.burger-menu-text {
    font-weight: 700;
    color: #06283d;
    font-size: 1rem;
}

.header-search {
    flex: 1 1 auto; /* Grow to take available space */
    padding: 0 1.5rem;
    position: relative;
}

#search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    /*border: 10px solid #eee;
    border-top: none;
    border-radius: 0 0 8px 8px;*/
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 900px;
    overflow-y: auto;
}

#search-results-container a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

#search-results-container a img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
}

#search-results-container a span {
    font-size: 0.9rem;
    line-height: 1.3;
}

#search-results-container a:last-child {
    border-bottom: none;
}

#search-results-container a:hover {
    background-color: #f8f9fa;
}

.search-redirect-link {
    font-style: italic;
    background-color: #f0f8ff;
}

.search-redirect-link strong {
    font-style: normal;
}

.header-search .search-form {
    display: flex;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 40px;
    overflow: hidden;
}

.header-search .search-form label {
    flex-grow: 1;
    display: flex;
}

.header-search .search-field {
    border: none;
    padding: 0.5rem 1rem;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.header-search .search-submit {
    background-color: #06283d;
    color: #fff;
    border: none;
    padding: 0 1.25rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.header-search .search-submit:hover {
    background-color: #1363df;
}

.header-cart {
    flex: 0 1 auto; /* Don't grow, allow shrinking */
}

.header-cart .cart-link {
    color: #06283d;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-cart .cart-link i {
    font-size: 1.5rem;
}

.header-cart .cart-contents-count {
    font-weight: 700;
    font-size: 1rem;
    background-color: #1363df;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==========================================================================
   MOBILE (Off-canvas) MENU
   ========================================================================== */

.mobile-menu {
    display: block;
    position: fixed;
    left: -100%;
    z-index: 100;
    width: 300px;
    max-width: 100%;
    height: calc(100% - 100px); /* Fallback height */
    background-color: #fff;
    transition: left 0.3s ease;
    padding: 2rem 0;
    overflow-y: auto;
    border-right: 1px solid #eaeaea;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-inner {
    padding: 0 1.5rem 50px 1.5rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    position: absolute;
    top: 10px;
    right: 15px;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
}

.mobile-menu-list a {
    color: #06283d;
    font-weight: 600;
    display: block;
    padding: 0.5rem 0;
    font-size: 1.1rem;
    text-decoration: none;
}

.mobile-menu-list .sub-menu {
    list-style: none;
    padding-left: 1rem;
    display: none; /* Hide submenus by default */
    transition: all 0.3s ease;
}

.mobile-menu-list .sub-menu a {
    font-size: 1rem;
    font-weight: 400;
}

/* Style for menu items with children */
.mobile-menu-list .menu-item-has-children > a {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer; /* Make it clear it's clickable */
}

/* Arrow indicator for expandable menu items */
.mobile-menu-list .menu-item-has-children > a::after {
    content: '\f107'; /* FontAwesome down arrow */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: #06283d;
    transition: transform 0.3s ease;
    margin-left: auto;
    flex-shrink: 0; /* Prevent arrow from shrinking */
    width: 16px; /* Fixed width for consistent alignment */
    text-align: center;
}

/* Rotate arrow when submenu is open */
.mobile-menu-list .menu-item-has-children.open > a::after {
    transform: rotate(180deg);
}

/* Show submenu when parent has 'open' class */
.mobile-menu-list .menu-item-has-children.open > .sub-menu {
    display: block;
    animation: slideDown 0.3s ease-out;
}

/* Animation for smooth dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* Style for submenu items */
.mobile-menu-list .sub-menu .menu-item {
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
    background-color: #f9f9f9; /* Light background for submenu items */
}

.mobile-menu-list .sub-menu .menu-item a {
    padding: 0.4rem 0 0.4rem 0.8rem;
    color: #555;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 2px 4px;
    display: block;
}

.mobile-menu-list .sub-menu .menu-item a:hover {
    color: #1363df;
    background-color: rgba(19, 99, 223, 0.1);
    transform: translateX(4px); /* Slight indent on hover */
}

/* Style for third-level submenu items if they exist */
.mobile-menu-list .sub-menu .sub-menu .menu-item {
    border-left: 2px solid #ccc;
    margin-left: 1rem;
    background-color: #f5f5f5;
}

.mobile-menu-list .sub-menu .sub-menu .menu-item a {
    padding: 0.3rem 0 0.3rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

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

/* Desktop/Tablet: Align mobile menu with content max-width */
@media (min-width: 769px) {
    .mobile-menu {
        left: -300px; /* Keep menu hidden off-screen by default */
        max-width: 300px;
    }
    
    .mobile-menu.active {
        left: calc((100vw - 1200px) / 2); /* Slide to content area edge when open */
    }
}

/* For very wide screens, ensure menu doesn't go off-screen */
@media (min-width: 1500px) {
    .mobile-menu {
        left: -300px; /* Keep hidden off-screen */
    }
    
    .mobile-menu.active {
        left: calc((100vw - 1200px) / 2);
    }
}