/* --- ОБЩИЕ СТИЛИ ШАПКИ, МЕНЮ И УВЕДОМЛЕНИЙ --- */

/* Стили по умолчанию (для ПК) */
.mobile-menu-toggle { display: none; }
.header-actions .action-link img { display: none; } /* Скрываем PNG иконки на ПК */

/* Стили для выпадающего меню каталога (ПК) */
.main-nav .dropdown {
    position: relative;
    display: inline-block;
}
.main-nav .dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 700px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 25px;
    border-radius: 0 0 8px 8px;
    left: 0;
    top: 100%;
    border-top: 3px solid #fd7e14;
}
.main-nav .dropdown:hover .dropdown-content {
    display: block;
}
.main-nav .dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.main-nav .dropdown-column h4 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 10px;
}
.main-nav .dropdown-column h4 a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}
.main-nav .dropdown-column h4 a:hover {
    color: #fd7e14;
}
.main-nav .dropdown-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.main-nav .dropdown-column ul li a {
    display: block;
    padding: 6px 0;
    color: #555;
    text-decoration: none;
    font-size: 14px;
}
.main-nav .dropdown-column ul li a:hover {
    color: #fd7e14;
}

/* Стили для счетчика корзины */
.action-link {
    position: relative;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #fd7e14;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* --- АДАПТИВНЫЕ СТИЛИ ДЛЯ ШАПКИ --- */
@media (max-width: 768px) {
    #main-header .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
    }
    #main-header .main-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    #main-header .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-height: 40px;
    }
    #main-header .logo img {
        height: 100%;
        width: auto;
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 18px;
    }
    .header-actions .action-link span:not(.cart-count) {
        display: none;
    }
    .mobile-menu-toggle img,
    .header-actions .action-link img {
        display: block;
        height: 28px;
        width: auto;
    }
    .cart-link .cart-count {
        top: -8px;
        right: -8px;
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

/* Стили для выпадающего мобильного меню */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}
.mobile-nav-panel.active {
    transform: translateX(0);
}
.mobile-nav-panel h4 {
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.mobile-nav-panel h4 a {
    color: #333;
    text-decoration: none;
}
.mobile-nav-panel ul {
    list-style: none;
    padding: 0 0 0 15px;
    margin: 0 0 20px 0;
}
.mobile-nav-panel ul li a {
    display: block;
    padding: 8px 0;
    color: #555;
    text-decoration: none;
    font-size: 16px;
}
.mobile-nav-panel ul li a:hover {
    color: #fd7e14;
}
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Стили для уведомления --- */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}
.toast-notification.show {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}
.toast-icon {
    width: 30px;
    height: 30px;
}
.toast-message {
    font-size: 16px;
    font-weight: 500;
}
/* Анимация галочки */
.checkmark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
}
.toast-notification.show .checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.toast-notification.show .checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}
@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}
