.header {
    position: relative;
    z-index: 100;
}

/* Верхний блок */
.header__top {
    background-color: var(--belyy);
    padding: 10px 0;
    font-size: 14px;
    position: relative;
    z-index: 100;
    height: 53px;
    display: flex;
    align-items: center;
}

.header__top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__nav {
    display: flex;
}

.header__nav-list {
    display: flex;
    list-style: none;
    font-weight: 400;
    font-size: 13px;
}

.header__nav-item {
    margin-right: 40px;
    position: relative;
}

.header__nav-link {
    text-decoration: none;
    fill: currentColor;
    transition: color 0.3s;
}

.header__nav-link:hover,
.header__nav-link:focus {
    color: var(--siniy);
}

.header__contacts {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 13px;
}

.header__city {
    margin-right: 40px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.header__city-icon {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.header__city-caret {
    margin-left: 5px;
    width: 16px;
    height: 18px;
    fill: currentColor;
}

.header__contact-info {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-right: 28px;
}

.header__contact-info a {
    color: currentColor;
}

.header__contact-info a:hover {
    color: var(--siniy);
}

.header__email,
.header__phone {
    display: flex;
    align-items: center;
}

.header__contact-icon {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    color: var(--siniy);
}

.header__callback {
    color: var(--siniy);
    text-decoration: none;
    font-weight: 500;
    transition: border-bottom-color 0.3s;
    border-bottom: 1px solid;
}

.header__callback:hover,
.header__callback:focus {
    color: var(--siniy);
    border-color: transparent;
}

/* Средний блок */
.header__middle {
    padding: 19px 0;
    border-top: 1px solid var(--svetloseryy);
    background-color: var(--belyy);
    position: relative;
    z-index: 100;
}

.header__middle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--siniy);
    text-decoration: none;
}

.header__logo-icon {
    margin-right: 10px;
    max-height: 50px;
    fill: var(--color-secondary);
}

.header__search {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 938px;
    margin: 0 20px;
}

.header__catalog-btn {
    height: 48px;
    padding: 12px 22px 12px 16px;
    border-radius: 8px;
    margin-right: 20px;
    font-weight: 500;
    font-size: 16px;
    gap: 12px;
}

.header__catalog-btn:hover {
    transform: none;
}

.header__catalog-btn-icon {
    width: 24px;
    height: 24px;
    fill: var(--belyy);
}

.header__search-form {
    display: flex;
    flex-grow: 1;
    background: var(--ochen-svetlyy-seryy);
    border-radius: 8px;
    height: 48px;
}

.header__search-input {
    flex-grow: 1;
    height: 48px;
    padding: 8px 32px;
    border: 1px solid transparent;
    border-left: none;
    border-right: none;
    outline: none;
    font-family: inherit;
}

.header__search-input:focus {
    border-color: var(--siniy);
}

.header__search-btn {
    background-color: transparent;
    border: none;
    padding: 0 25px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    height: 48px;
}

.header__search-btn-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s;
    text-align: center;
    min-width: 60px;
    text-decoration: none;
    color: inherit;
}

.header__action:hover,
.header__action:focus {
    color: var(--siniy);
}

.header__action-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    stroke: currentColor;
}

.header__action-text {
    font-size: 13px;
}

.header__cart-count {
    position: absolute;
    top: -11px;
    right: 11px;
    background-color: var(--siniy);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__action--cart {
    position: relative;
}

/* Нижний блок */
.header__bottom {
    background-color: var(--siniy);
    position: relative;
    z-index: 100;
}

.header__bottom-container {
    display: flex;
    justify-content: center;
}

.header__menu {
    display: flex;
    list-style: none;
    width: 100%;
    justify-content: space-around;
    gap: 40px;
}

.header__menu-item {
}

.header__menu-link {
    display: flex;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 17px 24px;
    transition: all 0.3s;
    white-space: nowrap;
}

.header__menu-link:hover {
    background-color: var(--belyy);
    color: var(--siniy);
}

/* Стили для меню каталога */
.catalog-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    display: none;
    z-index: 99;
}

.header.active .catalog-menu {
    display: block;
}

.catalog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--temnyy-seryy);
    opacity: 0.4;
    z-index: -1;
    display: none;
}

.header.active .catalog-overlay {
    display: block;
}

.catalog-container {
    margin: 0 auto;
    position: relative;
    z-index: 100;
    background-color: var(--belyy);
    padding: 32px 60px;
    border-radius: 0 0 16px 16px;
}

.catalog-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.catalog-column {
    display: flex;
    flex-direction: column;
}

.catalog-category {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: currentColor;
    padding-bottom: 5px;
}

.catalog-subcategories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-subcategory {
    margin-bottom: 8px;
}

.catalog-subcategory-link {
    text-decoration: none;
    color: #555;
    transition: color 0.2s;
    display: block;
    padding: 5px 0;
}

.catalog-subcategory-link:hover {
    color: #ff6b6b;
}