@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&display=swap');

/* Стили для хедера и других элементов остаются без изменений */
header {
    width: 100%;
    color: #000000;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #fff;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0;
}

img {
    max-width: 100%;
}

.header-logo img {
    padding: 10px;
}

header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.catalog-content li {
    margin: 0px;
}

.header-nav ul li {
    position: relative;
}

.header-nav ul li a {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 0.9em;
    color: black;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.header-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #000;
}

.header-nav ul li a:hover::after {
    width: 100%;
}

.header-nav ul li a.active::after {
    width: 100%;
}

.profile-btn a.profile {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 0.9em;
    color: black;
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
    margin-top: 8px;
}

.profile-btn a.profile::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #000;
    transform: scaleX(0);
    transition: transform 0s ease;
}

.profile-btn a.profile:hover::after {
    transform: scaleX(1);
    transition-duration: 0s;
}

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.cart-link:hover {
    background: #f5f5f5;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background: #e72630;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
    position: relative;
    pointer-events: none;
}

.cart-count.hidden {
    display: none;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown-content {
    top: calc(100% - -10px);
    padding-top: 10px;
    margin-top: -10px;
    display: none;
    position: absolute;
    right: -160px;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 1px 1px 10px 0px rgba(0, 0, 0, 0.4);
    z-index: 1;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    list-style-type: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
    z-index: 1001;
}

.profile-dropdown-content li a {
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    display: block;
    transition: all 0.0s ease;
}

.profile-dropdown-content li:hover {
    background-color: #e72630;
}

.profile-dropdown-content li:hover a {
    color: white;
}

.profile-dropdown:hover .profile-dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

.profile-dropdown .header-nav-link {
    padding: 10px;
}

.profile-dropdown .header-nav-link::after {
    display: none;
}

.profile-dropdown:hover .header-nav-link {
    background-color: #f5f5f5;
    border-radius: 50%;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: #f4f4f4;
    margin: 0px;
}

.main {
    margin: auto;
    padding: 30px 20px;
    width: 100%;
    max-width: 1280px;
    box-sizing: border-box;
}

.welcome {
    padding: 0;
    margin: auto;
    margin-top: 20px;
}

.welcome__img {
    border-radius: 15px;
    width: 100%;
    height: auto;
}

.main-categories {
    color: #000000;
    padding: 40px 0;
}

.main-categories h3 {
    /* font-family: 'Roboto Slab', serif; */
    font-size: 1.2rem;
    text-align: left;
    margin-bottom: 30px;
}

.main-category-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0;
    width: calc(100% -5px);
    overflow-x: visible;
    padding: 0px;
}

.main-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.main-category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.main-category-item img {
    width: 100%;
    height: 200px; /* Оставляем для единообразия, но можно сделать гибче */
    object-fit: contain; /* Изображение масштабируется с сохранением пропорций */
    border-bottom: 2px solid #e72630;
    display: block; /* Убирает лишние отступы */
    background-color: #f4f4f4; /* Цвет фона для пустых областей, если object-fit: contain */
}

.main-category-item h4 {
    /* font-family: 'Roboto Slab', serif; */
    font-size: 1rem;
    margin: 15px 0;
    padding: 0 15px;
    text-align: center;
    color: #333;
}

.category-list__img {
    transition: opacity 0.3s ease;
}

.main-category-item:hover .category-list__img {
    opacity: 0.9;
}

.catalog-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 270px;
    box-shadow: 1px 1px 10px 0px rgba(0, 0, 0, 0.4);
    z-index: 1;
    padding: 0px;
    border-radius: 16px;
    overflow: visible;
}

.catalog-content ul {
    position: absolute;
}

.catalog-content li {
    display: block;
}

.catalog-content li a {
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
}

.catalog-content li a::after {
    display: none;
}

.catalog-content li:hover {
    background-color: #e72630;
}

.catalog-content li a:hover {
    color: white;
}

.catalog:hover .catalog-content {
    display: block;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #cacaca;
    border-radius: 10px;
    padding: 0px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input {
    border: none;
    outline: none;
    padding: 10px;
    font-size: 15px;
    width: 150px;
}

.search-button {
    background-color: #7f7f7f;
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 0px 10px 10px 0px;
    margin-left: 10px;
    transition: 0.3s;
}

.search-button:hover {
    background-color: #e72630;
}

.notifications-wrapper {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.notification-message {
    max-width: 450px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: notificationSlideIn 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    background-color: white;
    border-left: 4px solid;
    white-space: nowrap;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    color: #2a8015;
    background-color: rgba(42, 128, 21, 0.1);
    border-left-color: #2a8015;
}

.notification-error {
    color: #e72630;
    background-color: rgba(231, 38, 48, 0.1);
    border-left-color: #e72630;
}

.notification-warning {
    color: #b37400;
    background-color: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.notification-info {
    color: #0c5460;
    background-color: rgba(23, 162, 184, 0.1);
    border-left-color: #17a2b8;
}

.notification-close-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 15px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close-btn:hover {
    opacity: 1;
}

.notification-content {
    flex-grow: 1;
}

.fade {
    transition: opacity 0.15s linear;
}

/* Футер */
.footer {
    background-color: #f8f9fa;
    color: #333;
    padding: 40px 0 20px;
    width: 100%;
    border-top: 1px solid #e9ecef;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e72630;
    display: inline-block;
}

.footer-contacts {
    margin-bottom: 20px;
}

.contact-item {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.contact-link {
    color: #e72630;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #c41e3a;
}

.contact-text {
    color: #666;
    font-size: 0.9rem;
}

.footer-social {
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #0088cc;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.social-link:hover {
    background-color: #006699;
    color: white;
    transform: scale(1.1);
}

.social-link img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.social-link:hover img {
    filter: brightness(0) invert(1);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a:hover {
    color: #e72630;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #e72630;
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.callback-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.callback-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus {
    outline: none;
    border-color: #e72630;
    box-shadow: 0 0 0 2px rgba(231, 38, 48, 0.1);
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.checkbox-group.error .checkbox-label::before {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.checkbox-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}


/* Стили для ошибок checkbox (аналогично orders-alert) */
.checkbox-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid transparent;
}

.checkbox-alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    position: relative;
    padding-left: 25px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный чекбокс */
.checkbox-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 15px;
    height: 15px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: white;
    transition: all 0.3s;
}

/* Галочка (скрыта по умолчанию) */
.checkbox-label::after {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 1px;
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: all 0.3s;
}

/* Стиль при выборе */
.checkbox-label input:checked ~ .checkbox-label::before,
.checkbox-label input:checked + .checkbox-label::before,
.checkbox-label:has(input:checked)::before,
input:checked + .checkbox-label::before {
    background-color: #999;
    border-color: #999;
}

.checkbox-label input:checked ~ .checkbox-label::after,
.checkbox-label input:checked + .checkbox-label::after,
.checkbox-label:has(input:checked)::after,
input:checked + .checkbox-label::after {
    opacity: 1;
}

.checkbox-label:hover::before {
    border-color: #999;
}

.terms-link {
    color: #e72630;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}

.callback-btn {
    background-color: #e72630;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.callback-btn:hover {
    background-color: #c41e3a;
}

.footer-bottom {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 1024px) {
    header {
        width: 100vw;
        margin: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        background: #fff;
        padding: 0;
    }
    .header-container {
        max-width: 100vw;
        width: 100vw;
        padding: 0;
        margin: 0;
    }
    .main {
        width: 100%;
        max-width: 100vw;
        padding: 30px 15px;
    }
    .welcome {
        margin-top: 15px;
        width: 100%;
        max-width: 100%;
    }
    .main-category-list {
        grid-template-columns: repeat(3, 1fr);
        padding: 10px;
        gap: 20px;
    }
    
    .main-category-item {
        box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    }
    
    .main-category-item:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .header-logo img {
        width: 80px !important;
    }
    /* Скрываем всплывающее окно профиля до разрешения 1024px */
    .profile-dropdown-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    .profile-dropdown:hover .profile-dropdown-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
        position: relative;
    }
    
    /* Предотвращение автоматического масштабирования при фокусе на input */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"] {
        font-size: 16px !important; /* Минимальный размер для предотвращения зума */
        transform: none !important;
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Позиционирование уведомлений для мобильной версии */
    .notifications-wrapper {
        top: 140px !important;
        right: 10px !important;
    }
    
    .cart-notification {
        top: 140px !important;
        right: 10px !important;
        max-width: 320px !important;
        padding: 10px 15px !important;
        font-size: 12px !important;
    }
    
    .cart-notification-close {
        font-size: 16px !important;
        padding: 0 0 0 10px !important;
    }
    
    .notification-message {
        max-width: 320px !important;
        padding: 10px 15px !important;
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }
    
    .notification-close-btn {
        font-size: 16px !important;
        padding: 0 0 0 10px !important;
    }
    
    /* Фиксированная ширина для контейнеров */
    .header-container,
    .main,
    .footer-container {
        max-width: 100vw;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Исправление для поиска */
    .search-container {
        display: none !important;
        width: calc(100% - 30px);
        max-width: calc(100vw - 30px);
        position: absolute;
        top: 70px;
        left: 15px;
        right: 15px;
        margin: 0;
        background: none;
        box-shadow: none;
        border: none;
        box-sizing: border-box;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .search-container.active {
        display: flex !important;
        opacity: 1;
        transform: translateY(0);
    }
    

    
    /* Дополнительные исправления для предотвращения горизонтальной прокрутки */
    * {
        box-sizing: border-box;
    }
    
    /* Исправление для хедера */
    header {
        position: fixed;
        top: 0;
        width: 100vw;
        margin: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        background: #fff;
        overflow-x: hidden;
        z-index: 1000;
    }
    
    .header-container {
        max-width: 100vw;
        width: 100vw;
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }
    
    .header-main {
        display: flex;
        flex-wrap: wrap;
        position: relative;
        padding-bottom: 0;
        min-height: 80px;
        background: #fff;
        z-index: 1;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        transition: min-height 0.3s ease;
    }
    
    .header-main.search-active {
        min-height: 120px;
    }
    
    /* Бургер меню */
    .burger-menu {
        display: block !important;
        position: absolute;
        top: 20px;
        left: 10px;
        z-index: 2;
        padding: 10px 5px 10px 10px;
    }
    
    /* Мобильная кнопка поиска */
    .mobile-search-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        cursor: pointer;
        border-radius: 8px;
        z-index: 2;
        position: absolute;
        top: 20px;
        left: 60px;
    }
    
    .mobile-search-btn img {
        width: 20px;
        height: 20px;
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }
    
    .mobile-search-btn:hover img {
        opacity: 1;
    }
    
    /* Логотип */
    .header-logo {
        position: absolute;
        left: 47%;
        top: 20px;
        transform: translateX(-50%);
        width: auto;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        text-align: center;
        pointer-events: auto;
        z-index: 1;
    }
    .header-logo img {
        height: 40px !important;
        width: auto !important;
        padding: 0;
        pointer-events: auto;
    }
    
    /* Иконки профиля и корзины */
    .profile-btn, .cart-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        height: 40px;
        gap: 0;
        margin: 0;
        padding: 0;
        position: absolute;
        top: 20px;
    }
    .profile-btn {
        right: 60px;
        padding-left: 10px;
        top: 15px;
    }
    .cart-btn {
        right: 10px;
    }
    .profile-btn a, .cart-btn a {
        display: flex;
        align-items: center !important;
        justify-content: center;
        height: 40px;
        padding: 0;
    }
    .profile-btn img, .cart-btn img, .profile-btn svg, .cart-btn svg {
        display: inline-block !important;
        vertical-align: middle !important;
        height: 24px !important;
        width: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: content-box !important;
    }
    
    /* Скрываем десктопную навигацию */
    .header-nav {
        display: none;
    }
    
    /* Скрываем всплывающее окно профиля в мобильной версии */
    .profile-dropdown-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    .profile-dropdown:hover .profile-dropdown-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    /* Отключаем подчеркивание для кнопки профиля в мобильной версии */
    .profile-btn a.profile::after {
        display: none !important;
    }
    
    .profile-btn a.profile:hover::after {
        display: none !important;
    }

    .search-input {
        width: 100%;
        border-radius: 8px 0 0 8px;
        border: 1px solid #ddd;
        font-size: 16px !important;
        padding: 8px 12px;
        height: 40px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        max-width: 100%;
        box-sizing: border-box;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }
    
    .search-button {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        border-radius: 0 8px 8px 0;
        background: #fff url('/static/images/icons/search-2903.svg') center center no-repeat;
        background-size: 18px 18px;
        border: 1px solid #ddd;
        margin-left: -1px;
        padding: 0;
        cursor: pointer;
        transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.2s;
        color: transparent;
        font-size: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-input:focus {
        outline: none;
        border-color: #e72630;
        border-right-color: #ddd;
        box-shadow: -2px 0 0 0 rgba(231, 38, 48, 0.1), 0 -2px 0 0 rgba(231, 38, 48, 0.1), 0 2px 0 0 rgba(231, 38, 48, 0.1);
    }
    
    .search-input:focus + .search-button {
        border-color: #e72630;
        border-left-color: #ddd;
        box-shadow: 2px 0 0 0 rgba(231, 38, 48, 0.1), 0 -2px 0 0 rgba(231, 38, 48, 0.1), 0 2px 0 0 rgba(231, 38, 48, 0.1);
    }
    .search-button:hover {
        background-color: #f5f5f5;
    }
    
    /* Основной контент */
    .main {
        margin-top: 90px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 30px 10px;
        box-sizing: border-box;
        transition: margin-top 0.3s ease;
    }
    
    .main.search-active {
        margin-top: 130px;
    }
    .welcome {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-category-list {
        grid-template-columns: repeat(3, 1fr);
        padding: 10px;
        gap: 20px;
    }

    .main-category-item {
        height: auto;
        width: 100%;
        max-width: 100%;
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
    }
    
    .main-category-item:hover {
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    }

    .main-category-item img {
        height: 150px;
        width: 100%;
        max-width: 100%;
    }

    .main-categories h3 {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        align-items: start;
    }
    .footer-section h4 {
        padding-top: 12px;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .welcome {
        margin-top: 0;
    }

    .main-category-list {
        grid-template-columns: repeat(2, 1fr);
        padding: 8px;
        gap: 18px;
    }

    .main-category-item {
        width: 100%;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
    }
    
    .main-category-item:hover {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .main-category-item img {
        height: 120px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        align-items: start;
    }
    .footer-section h4 {
        padding-top: 12px;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }
    
    /* Дополнительные стили для очень маленьких экранов */
    .cart-notification {
        max-width: 280px !important;
        right: 5px !important;
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
    
    .cart-notification-close {
        font-size: 14px !important;
        padding: 0 0 0 8px !important;
    }
    
    .notification-message {
        max-width: 280px !important;
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 405px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 426px) {
    .footer-section:last-child h4 {
        margin-top: 45px; /* подбери нужное значение для выравнивания */
    }
}

/* Стили для уведомлений корзины */
.cart-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 450px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: notificationSlideIn 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    background-color: rgba(42, 128, 21, 0.1);
    border-left: 4px solid #2a8015;
    color: #2a8015;
    z-index: 10000;
    white-space: nowrap;
}

.cart-notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 15px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cart-notification-close:hover {
    opacity: 1;
}

.has-subcategories {
    position: relative;
}

.subcategory-content {
    display: none;
    position: absolute;
    left: 270px;
    top: 0;
    min-width: 270px;
    box-shadow: 1px 1px 10px 0px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    padding: 0px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.has-subcategories:hover .subcategory-content {
    display: block;
}

.catalog {
    position: relative;
}

.subcategory-content {
    display: none;
    position: absolute;
    left: 270px;
    top: 0;
    min-width: 270px;
    box-shadow: 1px 1px 10px 0px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    padding: 0px;
    border-radius: 16px;
    overflow: hidden;
    background: white;
}

.subcategory-trigger {
    padding-right: 10px;
}

.category-with-subcategories {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.category-with-subcategories a {
    flex-grow: 1;
}

.has-subcategories:hover {
    background-color: #e72630;
}

.has-subcategories:hover a {
    color: white;
}

.has-subcategories:hover .subcategory-content {
    display: block;
}

.has-subcategories .subcategory-content:hover {
    display: block;
}

.has-subcategories .subcategory-content:hover ~ a,
.has-subcategories .subcategory-content:hover ~ .category-with-subcategories a {
    color: white;
}

.subcategory-content li a {
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none;
    display: block;
    width: 100%;
}

.subcategory-content li:hover {
    background-color: #e72630;
}

.subcategory-content li:hover a {
    color: white !important;
}

.has-subcategories:hover .subcategory-trigger {
    color: white;
}

.has-subcategories .subcategory-content:hover ~ .category-with-subcategories .subcategory-trigger {
    color: white;
}

/* Мобильное меню */
.burger-menu {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.mobile-search-btn {
    display: none;
}

.burger-icon {
    width: 25px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #000;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-menu {
    position: fixed;
    top: 0;
    left: -75%;
    width: 75%;
    height: 100%;
    background-color: #fff;
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-close {
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.mobile-menu-close span {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #000;
    transform: rotate(45deg);
}

.mobile-menu-close span:last-child {
    transform: rotate(-45deg);
}

.mobile-nav {
    padding: 20px 0;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav ul li {
    border-bottom: 1px solid #eee;
}

.mobile-nav ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
    background-color: #f5f5f5;
}

.mobile-catalog {
    position: relative;
}



.mobile-catalog-toggle {
    cursor: pointer;
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.mobile-catalog-content {
    display: none;
    background-color: #f9f9f9;
}

.mobile-catalog-content.active {
    display: block;
    padding-left: 0;
    border-left: none;
}

.mobile-catalog-border {
    border-left: 2px solid #998a8a8d;
    padding-left: 0px; /* расстояние между полосой и текстом */
    margin-left: 30px;  /* расстояние от левого края меню до полосы */
}

.mobile-catalog-border li,
.mobile-catalog-border li a {
    padding-left: 5px !important;
    margin-left: 0 !important;
}

.mobile-catalog-border li {
    border-bottom: 1px solid #e0e0e0;
    padding-left: 0;
}

.mobile-catalog-border li a {
    padding-left: 0;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: block;
}

.mobile-category-with-subcategories {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.mobile-category-with-subcategories a {
    flex-grow: 0;
    padding: 15px 20px;
    border: none;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    pointer-events: none;
}

.mobile-subcategory-trigger {
    cursor: pointer;
    font-size: 12px;
    color: #666;
    margin-left: 0px;
    transition: transform 0.3s ease;
}

/* Поворот стрелок при активации */
.mobile-catalog-toggle.active {
    transform: rotate(90deg);
}

.mobile-subcategory-content.active ~ .mobile-category-with-subcategories .mobile-subcategory-trigger {
    transform: rotate(90deg);
}

.mobile-subcategory-content.active + .mobile-category-with-subcategories .mobile-subcategory-trigger {
    transform: rotate(90deg);
}

.mobile-subcategory-trigger.active {
    transform: rotate(90deg);
}


.mobile-subcategory-content {
    display: none;
    background-color: #f0f0f0;
}

.mobile-subcategory-content.active {
    display: block;
}

.mobile-subcategory-content li a {
    padding-left: 40px;
    font-size: 13px;
}

.mobile-search {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-search form {
    display: flex;
    gap: 10px;
}

.mobile-search input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.mobile-search button {
    padding: 10px 15px;
    background-color: #e72630;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.mobile-search button:hover {
    background-color: #c41e26;
}

.mobile-profile {
    padding: 20px;
}

.mobile-profile-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e72630;
}

.mobile-profile a {
    display: block;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.mobile-profile a:last-child {
    border-bottom: none;
}

.mobile-profile a:hover {
    color: #e72630;
}

@media (max-width: 768px) {
    .mobile-menu .mobile-catalog-content li a {
        font-size: 15px !important;
        line-height: 1.1 !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        min-height: 24px !important;
    }
    
    .mobile-menu .mobile-subcategory-content li a {
        padding-left: 20px !important;
        font-size: 13px !important;
        line-height: 1.1 !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        min-height: 24px !important;
    }
}