/* --- Global Header Styles --- */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;    
	font-family: var(--primary-font);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex-shrink: 0; /* Prevent shrinking of logo */
}

.site-branding .site-title,
.site-branding .site-title a {
    font-size: 1rem;
    text-decoration: none;
    margin: 0;
    line-height: 1;
}

.site-branding .site-description {
    font-size: 0.8em;
    color: #777;
    margin-top: 5px;
}

/* --- Desktop Navigation --- */
.main-navigation.desktop-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px; /* Space between menu and extra items */
    position:relative;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
	padding-left:5rem;
    margin: 0;
    display: flex;
    gap: 25px; /* Space between main menu items */
}

.main-navigation ul li {
    margin: 0;
}

.main-navigation ul li a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-orange);
    transition: width 0.3s ease;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a,
.main-navigation ul li.current_page_item a {
    color: var(--color-orange);
}

.main-navigation ul li a:hover::after,
.main-navigation ul li.current-menu-item a::after,
.main-navigation ul li.current_page_item a::after {
    width: 100%;
}

/* --- Desktop Extra Items (e.g., Cart Button) --- */
.header-extra-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.header-extra-items .custom-cart-menu-item {
    margin-left: 0; /* Override default margin from previous CSS */
}

/* Cart Button Base Styles (re-using from custom-shop.css but adjusting for header) */
.header-extra-items .cart-button {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 12px; /* Slightly smaller for header */
    background-color: var(--color-orange);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95em; /* Slightly smaller for header */
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.header-extra-items .cart-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.header-extra-items .cart-button i { /* Cart icon */
    margin-right: 5px;
    font-size: 1.1em;
}

.header-extra-items .cart-count-badge {
    background-color: #28a745;
    color: #fff;
    font-size: 0.7em;
    font-weight: 700;
    border-radius: 50%;
    padding: 3px 7px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    position: absolute;
    top: -6px;
    right: -6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    transform: scale(0.8);
    opacity: 1;
}

.header-extra-items .cart-button.has-items .cart-count-badge {
    transform: scale(1);
    opacity: 1;
}


/* --- Mobile Toggle Button --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: #333;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: #007bff;
}


/* --- Mobile Full-Screen Menu --- */
.mobile-fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98); /* Semi-transparent white overlay */
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%); /* Start off-screen to the right */
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.mobile-fullscreen-menu.active {
    transform: translateX(0); /* Slide in */
    opacity: 1;
    visibility: visible;
}

.mobile-fullscreen-menu .menu-close-button {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0;
}

.mobile-fullscreen-menu .menu-close-button:hover {
    color: #dc3545; /* Red for close button hover */
    transform: rotate(90deg);
}

.mobile-navigation {
    text-align: center;
    width: 80%; /* Constrain width for better readability */
}

.mobile-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between mobile menu items */
}

.mobile-navigation ul li a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: #222;
    font-size: 1.8em;
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-navigation ul li a:hover,
.mobile-navigation ul li.current-menu-item a,
.mobile-navigation ul li.current_page_item a {
    color: #007bff;
    transform: translateX(10px); /* Slide on hover */
}

/* Mobile Extra Items (e.g., Cart Button) */
.mobile-extra-items {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.mobile-extra-items .cart-button {
    padding: 12px 20px;
    font-size: 1.1em;
}

.mobile-extra-items .cart-count-badge {
    font-size: 0.9em;
    padding: 4px 8px;
    min-width: 20px;
    top: -10px;
    right: -10px;
}
/* Container for the search bar */
        .search-container {
            display: flex;
            align-items: center;
            background-color: #fff;
            border-radius: 50px;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            max-width: 50px;
        }

        /* Active state for the container when expanded */
        .search-container.active {
            max-width: 500px;
			position:absolute;
			right:10%;
        }
        
        /* The search icon button */
        .search-icon {
            background: none;
            border: none;
            cursor: pointer;
            padding: 15px;
            font-size: 1.2rem;
            color: #555;
            transition: color 0.3s ease;
        }

        .search-icon:hover {
            color: #007bff;
        }
        
        /* The search input field */
        .search-input {
            border: none;
            outline: none;
            flex-grow: 1;
            padding: 10px 0;
            font-size: 1rem;
            color: #333;
            background-color: transparent;
            width: 0;
            opacity: 0;
            transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .search-input::placeholder {
            color: #aaa;
        }
        
        /* Show the search input when the container is active */
        .search-container.active .search-input {
            width: calc(100% - 70px); /* Adjust width to make room for icon */
            opacity: 1;
            padding: 10px 15px;
        }

        /* Optional: Hide the icon when the search bar is active */
        .search-container.active .search-icon {
            color: #999;
            cursor: default;
        }

        /* The clear button for the search bar */
        .search-clear-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            color: #aaa;
            padding: 0 15px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .search-container.active .search-clear-btn {
            opacity: 1;
            pointer-events: auto;
        }
        
        .search-clear-btn:hover {
            color: #555;
        }

        @media (max-width: 600px) {
            .search-container {
                max-width: 50px;
            }
            .search-container.active {
                max-width: 90%;
                width: 90%;
            }
            .search-input {
                width: 0;
            }
            .search-container.active .search-input {
                width: calc(100% - 50px);
            }
        }


/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .main-navigation.desktop-menu {
        display: none; /* Hide desktop menu on smaller screens */
    }
    .menu-toggle {
        display: block; /* Show mobile toggle button */
    }
    .header-container {
        padding: 0 15px;
    }
    .site-branding .site-title,
    .site-branding .site-title a {
        font-size: 1.5rem;
		text-transform:uppercase;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 10px 0;
    }
    .menu-toggle {
        font-size: 3rem;
    }
    .mobile-fullscreen-menu .menu-close-button {
        top: 5rem;
        right: 15px;
        font-size: 2em;
    }
    .mobile-navigation ul li a {
        font-size: 2.5rem;
        padding: 12px 0;
		text-transform:uppercase;
    }
    .mobile-extra-items .cart-button {
        padding: 10px 15px;
        font-size: 1em;
    }
    .mobile-extra-items .cart-count-badge {
        font-size: 0.8em;
        padding: 3px 6px;
        min-width: 18px;
        top: -8px;
        right: -8px;
    }

}

