/* Основные настройки сайта */

body {
    font-family: Arial, sans-serif;
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.site-header {
    background-image: url('../img/background.png'); /* Тот же фон что и у сайта */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

.site-branding .site-logo {
    max-height: 40px;
}

.main-navigation {
    flex-grow: 1;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-navigation ul li a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 8px 15px 8px 40px; /* Увеличил padding-left для иконок */
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: transparent !important; /* Убираем фон */
}

/* Подсветка активной страницы */
.main-navigation ul li.current-menu-item a,
.main-navigation ul li.current-page-item a {
    color: #e8732e !important; /* Новый цвет подсветки */
}

.main-navigation ul li.current-menu-item a::before,
.main-navigation ul li.current-page-item a::before {
    filter: brightness(0) saturate(100%) invert(60%) sepia(90%) saturate(500%) hue-rotate(345deg);
}

/* Убираем фон при наведении на пункты меню */
.main-navigation ul li a:hover {
    background-color: transparent !important;
    transform: translateY(-2px);
    color: #e8732e; /* Новый цвет подсветки */
}

/* Убираем CSS иконки - используем Font Awesome */

/* Убираем CSS иконки для Главной - используем Font Awesome */

/* Убираем CSS иконку для Магазина - используем Font Awesome */

/* Убираем все CSS иконки - используем только Font Awesome */

/* Подсветка только текста и иконок */
.main-navigation ul li a:hover .menu-item-text {
    color: #e8732e; /* Новый цвет подсветки */
}

/* Стили для SVG иконки корзины в меню */
.menu-icon-cart {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
    color: #fff;
}

.main-navigation ul li a:hover .menu-icon-cart {
    color: #e8732e;
}

/* Убираем скрытие Font Awesome иконок */

/* Убираем CSS иконку для магазина */

.social-icons, .login-button {
    margin-left: 20px;
    height: 48px; /* Фиксированная высота */
    display: flex;
    align-items: center;
}

.social-icons {
    display: flex;
    gap: 8px; /* Уменьшил отступ между иконками */
}

/* ИКОНКИ СОЦСЕТЕЙ - только цвет при наведении, без фона */
.social-icons a {
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: transparent; /* Прозрачный фон */
}

.social-icons a:hover {
    color: #e8732e; /* Новый цвет подсветки */
    background-color: transparent !important; /* Убираем фон */
    transform: scale(1.2); /* Увеличил масштаб на 20% (было 1.1) */
}

/* КНОПКА ВОЙТИ С ИКОНКОЙ GOOGLE */
.login-button a {
    background-color: #e8732e; /* Новый цвет кнопки */
    color: #fff;
    padding: 10px 20px 10px 40px; /* Уменьшил левый отступ для компактности */
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    height: 36px; /* Фиксированная высота кнопки */
    box-sizing: border-box;
}

.login-button a::before {
    content: '';
    position: absolute;
    left: 12px; /* Ближе к тексту */
    width: 18px; /* Размер как у иконок соцсетей */
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23ffffff" d="M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.login-button a:hover {
    background-color: #d16525; /* Темнее при наведении */
    transform: translateY(-2px);
}

.login-button .google-logout {
    background-color: #ef4444; /* Красный для кнопки выхода */
}

.login-button .google-logout:hover {
    background-color: #dc2626; /* Темнее при наведении */
}

/* Стили для профиля пользователя */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    height: 48px; /* Фиксированная высота как у кнопки входа */
    margin-left: 20px; /* Такой же отступ как у кнопки входа */
}

.user-avatar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    height: 36px; /* Фиксированная высота как у кнопки входа */
    box-sizing: border-box;
}

.user-avatar-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e8732e;
    object-fit: cover;
    flex-shrink: 0; /* Не сжимается */
}

.user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; /* Ограничиваем ширину имени */
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-profile:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.logout-link {
    display: block;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.logout-link:hover {
    background-color: #ef4444;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Добавил отступ между соцсетями и кнопкой входа */
}

/* ИКОНКА КОРЗИНЫ */
.header-cart {
    position: relative;
    margin-left: 5px;
}

/* Иконка избранного */
.header-wishlist {
    position: relative;
    margin-left: 20px;
    margin-right: 0;
}

.header-wishlist .wishlist-icon {
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: transparent;
    position: relative;
}

.header-wishlist .wishlist-icon:hover {
    color: #e8732e;
    background-color: transparent !important;
    transform: scale(1.2);
}

.header-cart .cart-icon {
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: transparent;
    position: relative;
}

.header-cart .cart-icon:hover {
    color: #e8732e;
    background-color: transparent !important;
    transform: scale(1.2);
}

/* Счетчик товаров в корзине */
.header-cart .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e8732e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Анимация при добавлении товара */
.header-cart .cart-count.bounce {
    animation: bounceCart 0.5s ease;
}

@keyframes bounceCart {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* Исправление отступов контента */
.site-content {
    margin-top: 80px;
    padding: 20px 0;
    min-height: calc(100vh - 160px);
}

/* Исправление для мобильных устройств */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .main-navigation ul li a {
        padding: 8px 12px 8px 35px; /* Уменьшаем отступы для мобильных */
    }
    
    .main-navigation ul li a::before {
        left: 10px; /* Сдвигаем иконки для мобильных */
    }
    
    .header-right {
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .site-content {
        margin-top: 140px;
    }
    
    .social-icons {
        gap: 8px;
    }
    
    .social-icons a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .social-icons a:hover {
        transform: scale(1.15); /* Меньшее увеличение для мобильных */
    }
    
    .login-button a {
        padding: 8px 15px 8px 35px; /* Уменьшаем отступы для мобильных */
        font-size: 13px;
        height: 32px; /* Меньшая высота для мобильных */
    }
    
    .login-button a::before {
        left: 10px;
        width: 16px;
        height: 16px;
    }
}

/* Гарантируем, что контент не скрывается под шапкой */
.admin-bar .site-header {
    top: 32px;
}

.admin-bar .site-content {
    margin-top: 112px;
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
    
    .admin-bar .site-content {
        margin-top: 126px;
    }
}