/* Мобильная версия сайта */

/* Мобильный хедер */
.mobile-header {
    display: none;
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: auto;
}

/* Гамбургер-кнопка */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 17px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 4px;
    background-color: red;
    border-radius: 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Убрана анимация превращения в крестик - иконка остается неизменной */

/* Поиск в мобильном хедере */
.mobile-search-form {
    flex: 1;
    margin: 0 15px;
    position: relative;
    width: 100%;
    max-width: 250px;
    flex-shrink: 5;
    min-width: 100px;
    display: flex;
    align-items: center;
    height: 24px;
}

.mobile-search {
    width: 100%;
    height: 20px;
    padding: 0 18px 0 12px;
    border: 2px solid #423730;
    background: white;
    outline: none;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
    font-family: 'Akrobat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #423730;
    box-sizing: border-box;
    line-height: 20px;
}

.mobile-search-form::before {
    content: '';
    position: absolute;
    right: -3px;
    top: 2.5px;
    width: 18px;
    height: 80%;
    background:
        linear-gradient(to bottom left, transparent 43%, #423730 47%, #423730 53%, transparent 57%) top,
        linear-gradient(to top left, transparent 43%, #423730 47%, #423730 53%, transparent 57%) bottom;
    background-size: 100% 50%;
    background-repeat: no-repeat;
    z-index: 5;
    pointer-events: none;
}

/* Правая часть хедера */
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-eng {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #423730;
    height: 24px;
    line-height: 24px;
    display: flex;
    align-items: center;
}

.mobile-icons-group {
    display: flex;
    gap: 10px;
    align-items: center;
    height: 24px;
}

.mobile-icons-group span {
    display: flex;
    align-items: center;
    height: 24px;
}

.mobile-icons-group img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Выпадающее меню */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    left: 0;
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    padding: 4px 26px;
    box-sizing: border-box;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.25);
    clip-path: polygon(0 0, calc(100% - 60px) 0, 100% 80px, 100% 100%, 0 100%);
    border: 2px solid #000000;
    z-index: 1003;
    overflow: hidden;
    pointer-events: auto;
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: calc(10% + 10px);
    right: -3.8vw;
    width: 110px;
    height: 2px;
    background: #000000;
    transform-origin: center;
    transform: translateY(-50%) rotate(53deg);
    pointer-events: none;
    z-index: 1004;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-item {
    display: block;
    padding: 6px 0;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #423730;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    line-height: 1.1;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    color: #a39794;
}

/* Нижнее мобильное меню */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 2px solid #000000;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    z-index: 1100;
    letter-spacing: 0.08em;
}

.bottom-nav-item {
    flex: 1;
    text-transform: uppercase;
    background: transparent;
    border: none;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #423730;
    letter-spacing: 0.01em;
    cursor: pointer;
}

.bottom-nav-item.active {
    color: #a41a1a;
}

.bottom-nav-item.active-dropdown {
    background: #a41a1a;
    color: #ffffff;
    padding-top: 22px;
    padding-bottom: 22px;
    margin-top: -16px;
    margin-bottom: -16px;
    border-radius: 0;
}

.mobile-catalog-dropdown {
    position: fixed;
    transform-origin: left bottom;
    top: auto;
    bottom: 70px;
    left: 20px;
    width: 50vw;
    min-width: 220px;
    background: #ffffff;
    border-top: 2px solid #000000;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.15);
    clip-path: polygon(0 0, calc(100% - 80px) 0, 100% 80px, 100% 100%, 0 100%);
    transform: translate3d(0, 120%, 0);
    transition: transform 0.25s ease;
    z-index: 1099;
    padding: 14px 24px 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-catalog-dropdown button {
    background: transparent;
    border: none;
    text-align: left;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #423730;
    padding: 0;
    cursor: pointer;
    width: 100%;
}

.mobile-catalog-dropdown button:hover {
    color: #a41a1a;
}

.mobile-catalog-dropdown.active {
    transform: translate3d(0, 0, 0);
}

.mobile-catalog-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1098;
}

.mobile-catalog-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Адаптивность - показываем мобильный хедер только на мобильных устройствах */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    /* Скрываем десктопный хедер и меню на мобильных */
    .header-row,
    .menu-wrapper {
        display: none;
    }

    /* Скрываем иконки соцсетей на мобильных */
    #social-icons {
        display: none;
    }

    body {
        padding-bottom: 70px;
    }

    .mobile-bottom-nav {
        display: flex;
        gap: 4px;
    }

    .mobile-catalog-dropdown {
        left: 20px;
        bottom: 56px;
        width: 50vw;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .mobile-header {
        padding: 12px 15px;
    }

    .mobile-search-form {
        max-width: 150px;
        margin: 0 10px;
    }

    .mobile-search {
        font-size: 12px;
        padding: 6px 10px;
    }

    .mobile-header-right {
        gap: 10px;
    }

    .mobile-eng {
        font-size: 14px;
    }

    .mobile-icons-group {
        gap: 8px;
    }

    .mobile-icons-group img {
        width: 20px !important;
        height: 20px !important;
    }

    .mobile-menu {
        width: 260px;
        padding: 6px 20px;
    }

    .mobile-menu::before {
        right: -28px;
        width: 110px;
    }

    .mobile-menu-item {
        font-size: 16px;
        padding: 12px 0;
    }

    .mobile-bottom-nav {
        padding: 0 6px;
    }

    .bottom-nav-item {
        font-size: 9px;
    }

    .mobile-catalog-dropdown {
        left: 10px;
    }
}

