/* Header & Navigation */
header {
    background-color: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 60px;
}

/* Left: Links (Desktop) / Hamburger (Mobile) */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 400;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-red);
    /* Subtle hover effect */
}

/* Center: Logo */
.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    width: 65px;
    /* Standard H&M size approximation */
    height: auto;
}

/* Right: Icons */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 25px;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.icon-item img {
    width: 24px;
    height: 24px;
}

.icon-text {
    display: block;
}

/* Category Sub-Nav */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.category-nav a {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Search Bar (Integrated into sub-nav or separate) */
.search-bar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-left: 20px;
}

.search-bar input {
    border: none;
    outline: none;
    padding: 5px;
    width: 150px;
}

/* Sticky Header Shadow */
header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Cart Icon Wrapper needed for positioning badge */
.nav-icons .icon-item:last-child {
    position: relative;
}

/* Cart Badge */
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.cart-count.bump {
    transform: scale(1.3);
}

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: white;
    z-index: 2000;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.menu-close {
    align-self: flex-end;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-content {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    font-size: 18px;
}

.mobile-category-content {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.mobile-category-content .search-bar {
    display: none;
    /* Hide search in this specific clone view if desired, or style it */
}

/* Mobile Specifics overrides */
@media (max-width: 1024px) {

    .nav-links,
    .icon-text,
    .search-section {
        display: none;
    }

    .category-nav {
        display: none;
        /* Hide categories on mobile main view, typically in hamburger */
    }

    .nav-icons {
        gap: 15px;
    }

    .hamburger {
        display: block;
        width: 24px;
        height: 24px;
        cursor: pointer;
    }
}