/* ======================================
   MOBILE MENU STYLES
   Стили только для мобильного меню
   ====================================== */

/* Mobile Header Layout */
.d-lg-none.bg-white.border-bottom {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-bottom: 1px solid rgba(37, 73, 216, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.d-lg-none .d-flex.align-items-center.justify-content-between {
    display: grid !important;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
}

.d-lg-none .navbar-brand {
    justify-self: center;
    margin: 0 !important;
    transition: transform 0.3s ease;
}

.d-lg-none .navbar-brand:active {
    transform: scale(0.95);
}

.d-lg-none .navbar-brand img {
    height: 60px !important;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.d-lg-none .mobile-cart-icon {
    justify-self: end;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2549d8, #1a3ba8);
    border-radius: 12px;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 73, 216, 0.3);
}

.d-lg-none .mobile-cart-icon:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(37, 73, 216, 0.3);
}

.d-lg-none .mobile-cart-icon i {
    font-size: 1.1rem;
}

.d-lg-none .mobile-cart-icon .badge {
    font-size: 0.7rem;
    padding: 3px 6px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

.d-lg-none .mobile-menu-toggle {
    justify-self: start;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 73, 216, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.d-lg-none .mobile-menu-toggle:active {
    transform: scale(0.95);
    background: #f8f9fa;
}

/* Animated Burger Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
    background: linear-gradient(135deg, #2549d8, #1a3ba8);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: relative;
    transform-origin: center;
}

.mobile-menu-toggle:hover span {
    background: linear-gradient(135deg, #1a3ba8, #0d2360);
}

/* Animated state when menu is open */
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Cart Icon */
.mobile-cart-icon {
    transition: transform 0.3s ease;
}

.mobile-cart-icon:active {
    transform: scale(0.9);
}

/* Mobile Search */
.d-lg-none .px-3.pb-2 {
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 16px !important;
    padding-top: 8px !important;
}

.d-lg-none .search-box {
    margin: 0;
    position: relative;
}

.d-lg-none .search-box .position-relative {
    position: relative;
}

.d-lg-none .search-box .form-control {
    background: white;
    border: 2px solid rgba(37, 73, 216, 0.15);
    border-radius: 14px;
    padding: 14px 16px 14px 52px !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #2b2b2e;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.d-lg-none .search-box .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.d-lg-none .search-box .form-control:focus {
    background: white;
    border-color: #2549d8;
    box-shadow: 0 4px 20px rgba(37, 73, 216, 0.15);
    outline: none;
}

.d-lg-none .search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #2549d8;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}

/* ======================================
   CATALOG BUTTON IN MENU
   ====================================== */

.mobile-catalog-btn {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2549d8, #1a3ba8);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 73, 216, 0.3);
}

.mobile-catalog-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 73, 216, 0.4);
}

.mobile-catalog-btn:active {
    transform: translateY(0);
}

.mobile-catalog-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.mobile-catalog-btn[aria-expanded="true"] .mobile-catalog-icon {
    transform: rotate(180deg);
}

.mobile-categories-full {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-category-full-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #2b2b2e;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.mobile-category-full-item:last-child {
    border-bottom: none;
}

.mobile-category-full-item:hover {
    background: linear-gradient(135deg, rgba(37, 73, 216, 0.05), rgba(26, 59, 168, 0.05));
    padding-left: 20px;
}

.mobile-category-full-item i {
    font-size: 0.9rem;
    margin-right: 12px;
    color: #2549d8;
    width: 20px;
}

.mobile-category-full-item span {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.category-count-badge {
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
}

/* ======================================
   OFFCANVAS CUSTOM STYLES
   ====================================== */

.mobile-menu-offcanvas {
    width: 90vw !important;
    max-width: 400px;
    border: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

/* Header */
.mobile-menu-header {
    background: linear-gradient(135deg, #2549d8 0%, #1a3ba8 100%);
    color: white;
    padding: 24px 20px;
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(37, 73, 216, 0.15);
}

.mobile-menu-header .offcanvas-title {
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}

/* Логотип в мобильном меню - обычный цветной */
.mobile-menu-header img[alt="ТРОН"] {
    filter: none;
}

.mobile-menu-header .mobile-close-btn i {
    color: white;
}

.mobile-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.mobile-close-btn:active {
    transform: scale(0.95);
}

/* Body */
.mobile-menu-body {
    padding: 20px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100%;
}

/* ======================================
   QUICK ACTIONS
   ====================================== */

.mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mobile-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: #2b2b2e;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 73, 216, 0.15);
    color: #2549d8;
}

.quick-action-icon {
    position: relative;
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #2549d8;
}

.quick-action-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #dc3545;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.quick-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* ======================================
   MAIN NAVIGATION
   ====================================== */

.mobile-main-nav {
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    color: #2b2b2e;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.mobile-nav-item:last-child {
    margin-bottom: 0;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background: linear-gradient(135deg, rgba(37, 73, 216, 0.1), rgba(26, 59, 168, 0.1));
    color: #2549d8;
}

.mobile-nav-item i:first-child {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 12px;
    color: #2549d8;
}

.mobile-nav-item span {
    flex: 1;
    font-weight: 500;
}

.mobile-nav-item i:last-child {
    font-size: 0.8rem;
    opacity: 0.4;
}

/* ======================================
   ACCORDION (Categories)
   ====================================== */

.mobile-accordion {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-accordion-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    background: white;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
    color: #2b2b2e;
}

.mobile-accordion-header:hover {
    background: #f8f9fa;
}

.mobile-accordion-header i:first-child {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 12px;
    color: #2549d8;
}

.mobile-accordion-header span {
    flex: 1;
    font-weight: 600;
}

.mobile-accordion-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.mobile-accordion-header[aria-expanded="true"] .mobile-accordion-icon {
    transform: rotate(180deg);
}

.mobile-accordion-body {
    padding: 0;
    background: #f8f9fa;
}

.mobile-category-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #2b2b2e;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-category-item:hover {
    background: white;
    border-left-color: #2549d8;
    color: #2549d8;
}

.mobile-category-item i {
    font-size: 0.9rem;
    margin-right: 12px;
    opacity: 0.6;
}

/* ======================================
   USER SECTION
   ====================================== */

.mobile-user-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-user-info {
    display: flex;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2549d8, #1a3ba8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.mobile-user-details {
    flex: 1;
    overflow: hidden;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: #2b2b2e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-email {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-nav {
    padding-top: 8px;
}

/* User nav items now use .mobile-nav-item for consistency */

.mobile-logout-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Auth Buttons */
.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth-btn {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-auth-btn-outline {
    background: white;
    color: #2549d8;
    border: 2px solid #2549d8;
}

.mobile-auth-btn-outline:hover {
    background: #2549d8;
    color: white;
}

.mobile-auth-btn-primary {
    background: linear-gradient(135deg, #2549d8, #1a3ba8);
    color: white;
    border: none;
}

.mobile-auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 73, 216, 0.3);
}

/* ======================================
   CONTACT INFO
   ====================================== */

.mobile-contact-info {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    margin-bottom: 8px;
}

.mobile-contact-item:last-child {
    margin-bottom: 0;
}

.mobile-contact-item i {
    font-size: 1rem;
    width: 24px;
    margin-right: 10px;
    color: #2549d8;
}

.mobile-contact-item a {
    color: #2b2b2e;
    text-decoration: none;
    font-size: 0.9rem;
}

.mobile-contact-item a:hover {
    color: #2549d8;
}

.mobile-contact-item span {
    font-size: 0.9rem;
    color: #6c757d;
}

/* ======================================
   RESPONSIVE STYLES FOR HOME PAGE
   ====================================== */

@media (max-width: 991.98px) {
    /* Hide desktop navigation on mobile */
    .navbar-expand-lg .navbar-nav {
        display: none !important;
    }
    
    .category-dropdown {
        display: none !important;
    }
    
    /* Home page adaptations */
    .promo-slider-container {
        padding: 0 15px;
    }
    
    .promo-card {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .promo-content-wrapper {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .promo-title {
        font-size: 1.5rem !important;
    }
    
    .promo-description {
        font-size: 0.9rem;
    }
    
    .promo-image {
        max-width: 200px;
        margin: 0 auto;
    }
    
    /* B2B Card */
    .b2b-card {
        text-align: center;
        padding: 30px 20px;
    }
    
    .b2b-illustration {
        position: relative;
        transform: none;
        margin-top: 20px;
    }
    
    /* Product Cards */
    .product-card {
        margin-bottom: 20px;
    }
    
    .carousel-product-card {
        min-width: 280px !important;
    }
    
    /* News Cards */
    .news-card {
        margin-bottom: 20px;
    }
    
    /* Stores Section */
    #stores .row {
        flex-direction: column-reverse;
    }
    
    .map-container {
        height: 300px;
        margin-bottom: 20px;
    }
    
    /* Actions Section */
    .actions-first {
        flex-direction: column;
        text-align: center;
    }
    
    .capsules {
        justify-content: center;
        margin-top: 20px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Benefits */
    .benefit-card {
        margin-bottom: 15px;
    }
    
    .business-benefits {
        margin-top: 20px;
    }
}

@media (max-width: 575.98px) {
    /* Extra small devices */
    .mobile-menu-offcanvas {
        width: 90vw !important;
        max-width: 360px;
    }
    
    .promo-title {
        font-size: 1.25rem !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    .display-6 {
        font-size: 2rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Quick actions grid for very small screens */
    .mobile-quick-actions {
        gap: 8px;
    }
    
    .mobile-quick-action {
        padding: 12px 8px;
    }
    
    .quick-action-label {
        font-size: 0.7rem;
    }
}

/* ======================================
   ANIMATIONS
   ====================================== */

/* Убрана кастомная анимация slideIn - используем встроенную Bootstrap Offcanvas анимацию */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Плавное появление пунктов меню */
.mobile-nav-item,
.mobile-quick-action {
    animation: fadeIn 0.4s ease-out backwards;
}

.mobile-nav-item:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav-item:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav-item:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav-item:nth-child(4) { animation-delay: 0.2s; }
.mobile-nav-item:nth-child(5) { animation-delay: 0.25s; }
.mobile-nav-item:nth-child(6) { animation-delay: 0.3s; }
.mobile-nav-item:nth-child(7) { animation-delay: 0.35s; }

/* ======================================
   ACCESSIBILITY
   ====================================== */

.mobile-menu-toggle:focus,
.mobile-close-btn:focus,
.mobile-nav-item:focus,
.mobile-category-item:focus {
    outline: 2px solid #2549d8;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu-toggle span,
    .mobile-nav-item,
    .mobile-quick-action,
    .mobile-accordion-icon,
    .mobile-close-btn,
    .mobile-auth-btn {
        transition: none;
    }
    
    .mobile-menu-offcanvas.show {
        animation: none;
    }
}

