@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Хедер — симбиоз нашего и Typology */
.custom-header {
    position: absolute;
    max-width: 2560px;
    width: 100%;
    top: 40px;
    z-index: 50;
    border: 0;
    background: transparent;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 24px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    text-align: center;
    flex: 0 0 auto;
}
.logo img {
    width: 72px;
    height: 72px;
    border: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-link {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #333333;
    font-family: 'Roboto', sans-serif;
}

.header-link:hover {
    color: #000000;
}

.header-cart-count {
    margin-left: 4px;
    font-weight: 700;
}

.menu-cart-wrapper {
    display: none;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
}
.menu-image {
    display: none; /* Скрываем изображение в десктопе */
}
.main-nav {
    flex-grow: 0;
}
.nav-menu {
    display: flex;
    gap: 15px;
}
.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.nav-menu li {
    position: relative;
}
.nav-menu a {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    color: #333;
}
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    min-width: 150px;
    z-index: 1000;
}
.nav-menu li:hover > .sub-menu {
    display: block;
}
.cart a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
}

/* Иконка сердца */
.heart-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 14px;
    margin-right: 8px;
    text-decoration: none;
    color: #333333;
    transition: color 0.3s ease;
}
.heart-icon-link:hover {
    color: #000000;
}
.heart-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    stroke: currentColor;
}
.heart-icon-item {
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

/* Кнопка гамбургер-меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    color: #333;
}

/* Мобильная адаптация */
@media (max-width: 767px) {
    .custom-header {
        height: auto;
        padding: 0;
        position: fixed;
        top: 0;
        background-color: white;
    }
    .header-inner {
        padding: 10px 15px;
        box-sizing: border-box;
        gap: 10px;
        justify-content: center; /* логотип по центру */
    }
    .header-left {
        flex: 0 0 auto; /* не растягиваем левый блок на всю ширину */
    }
    .logo {
        margin: 0 auto; /* центрируем логотип */
    }
    /* В мобилке в шапке оставляем только бургер + логотип,
       все ссылки уезжают в off-canvas */
    .header-left .header-link,
    .header-right {
        display: none;
    }
    .main-nav-desktop {
        display: none;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        top: 50%;
        left: 15px;
        transform: translateY(-50%);
    }
    .menu-cart-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: none;
        height: 100vh;
        background: #f9f9f9;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        margin: 0;
        box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        transition: left 0.3s ease-in-out;
        z-index: 1000;
    }
    .menu-cart-wrapper.active {
        display: block;
        left: 0;
    }
    .menu-image {
        display: block; /* Показываем изображение в мобильной версии */
        width: 100%;
        height: 150px;
        object-fit: cover;
        margin: 0;
    }

    .mobile-menu-close {
        position: absolute;
        top: 10px;
        right: 15px;
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        padding: 8px;
        line-height: 1;
    }
    .main-nav {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
        margin: 0;
    }
    /* Мобильное меню внутри off-canvas */
    .menu-cart-wrapper .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        background: none;
        padding: 0;
        margin: 0;
        list-style: none;
        border-top: 1px solid #e0e0e0;
        gap: 0;
    }

    .menu-cart-wrapper .nav-menu li {
        width: 100%;
        text-align: left;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #e0e0e0;
    }

    .menu-cart-wrapper .nav-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 0;
        font-size: 14px;
        color: #333;
        text-decoration: none;
    }

    .menu-cart-wrapper .nav-menu a::after {
        content: '›';
        font-size: 16px;
        margin-left: 8px;
    }
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        background: #fff;
        padding-left: 20px;
        display: none;
    }
    .nav-menu li:hover > .sub-menu {
        display: none;
    }
    .nav-menu .sub-menu.active {
        display: block;
    }
    .cart {
        margin-top: 0;
    }
    .heart-icon-item {
        padding: 10px 0;
        margin: 0;
    }
    .mobile-menu-hero-bg {
        margin-bottom: 30px;
    }
    .logo img {
        margin-top: 20px;
    width: 35px;
    height: 35px;
    border: none;
}
}

@media (max-width: 480px) {
    .custom-header {
        padding: 0;
        position: fixed;
        top: 0;
        background-color: white;
    }
    .header-inner {
        gap: 10px;
        padding: 0 10px;
    }
    .menu-toggle {
        font-size: 20px;
    }
    .menu-cart-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    .mobile-menu-hero-bg {
        margin-bottom: 30px;
        max-width: 480px;
        height: 128px;
    }
}

