@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

@media (max-width: 480px) {
    
    /* ================================
        TYPOGRAPHY MOBILE
        ================================ */
    h1 { font-size: 40px; }
    h2 { font-size: 24px; }
    h3 { font-size: 22px; }
    h4 { font-size: 20px; }
    h5 { font-size: 18px; }
    .body1 { font-size: 16px; }
    .body2 { font-size: 14px; }
    .body3 { font-size: 12px; }
    .body4 { font-size: 10px; }

    /* ================================
        BUTTONS MOBILE
        ================================ */
    .button-black,
    .button-white {
        border-radius: 6px;
        padding: 10px 20px;
        gap: 6px;
    }
    
    .button-black p,
    .button-white p {
        font-size: 14px;
        font-weight: 500;
        line-height: 135%;
    }
    
    .button-black img,
    .button-white img {
        width: 18px;
        height: 18px;
    }

    .button-clear {
        border-radius: 6px;
        padding: 0px 0px;
        gap: 0px;
    }

    .button-clear p {
        font-size: 14px;
        font-weight: 500;
        line-height: 135%;
    }
    
    .button-clear img {
        width: 18px;
        height: 18px;
    }

    .button-border {
        border-radius: 6px;
        padding: 9px 19px;
        gap: 6px;
    }
    
    .button-border p {
        font-size: 14px;
        font-weight: 500;
        line-height: 135%;
    }
    
    .button-border img {
        width: 18px;
        height: 18px;
    }

    .favorite-button img {
        width: 18px;
        height: 18px;
    }

    .favorite-button {
        padding: 8px;
        width: 34px;
        height: 34px;
        border-radius: 8px;
        box-sizing: border-box;
    }


    /* ================================
        HEADER & NAVIGATION MOBILE
        ================================ */
    .desktop-nav {
        display: none;
    }
    
    .burger-btn {
        display: block;
    }
    
    .top-bar {
        display: none;
    }
    
    .contact-top-bar {
        display: none;
    }

    .contact-top-bar-text {
        display: none;
    }

    .order-info {
        display: none;
    }

    .header-icons-and-burger {
        display: flex;
        justify-content: space-between;
    }

    .mobile-menu {
       
    }

    .main-header img {
        margin: 0;
        height: 24px;
    }

    .main-header .logo {
        flex-shrink: 0;
    }

    .header-icons {
        gap: 8px;
        padding-right: 20px;
    }


    .mobile-nav ul {
        gap: 0;
    }

    .mobile-nav a {
        font-size: 16px;
        padding: 16px 0;
    }

    .header-icons img {
        width: 20px;
        height: 20px;
    }

    .header-icons a {
        margin-left: 12px;
    }

    .burger-btn img {
        width: 20px;
        height: 20px;
    }

    .search-container {
        padding: 16px;
    }
    .search-bar {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-input {
        padding: 12px 14px;
        font-size: 16px; /* Предотвращает зум */
        transform: scale(0.875); /* Уменьшает визуально до 14px (14/16 = 0.875) */
        transform-origin: left center;
    }
    
    .search-submit-btn {
        padding: 12px 14px;
    }
    
    .search-submit-btn img {
        width: 18px;
        height: 18px;
    }
    
    .search-close-btn {
        width: 40px;
        height: 40px;
    }
    
    .search-close-btn img {
        width: 18px;
        height: 18px;
    }

    /* ================================
        HOME PAGE MOBILE
        ================================ */
        
        .product-filters p {
            font-size: 14px;
        }
        
        .product-filters .filter-pill {
            padding: 8px 12px;
            font-size: 14px;
        }
        
        .empty-products {
            font-size: 14px;
            padding: 30px 15px;
        }
        
    
    /* Стили для спиннера загрузки */
    .loading-spinner {
        text-align: center;
        padding: 40px 20px;
        color: #808080;
        font-size: 16px;
        font-weight: 500;
    } 
    .breadcrumbs-margin {
        margin: 100px 0 32px 0;
    }

      .main-screen {
        /* Правильный порядок fallback для всех браузеров */
        height: calc(100vh - 100px); /* Старые браузеры */
        height: calc(100dvh - 100px); /* Dynamic viewport height - именно то что нужно! */
        height: calc(100svh - 100px); /* Fallback для браузеров, не поддерживающих dvh */
        margin: 80px 0 0 0;
        background-position: center;
    }

    .content-main-screen {
        padding: 40px 24px;
        align-items: flex-start;
        text-align: left;
        gap: 24px;
    }

    .content-main-screen h4 {
        font-size: 16px;
    }

    .content-main-screen .button-black {
        align-self: flex-start;
    }

    .content-main-screen-services h1 {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .content-main-screen-services h4 {
        margin-bottom: 24px;
        font-size: 18px;
    }

    .popular-categories h2 {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .advantages {
        gap: 24px;
        flex-direction: column;
    }

    .categories-container {
        gap: 24px;
        display: flex;
        flex-direction: column;
    }

    .category-item {
        width: 100%;
        height: 200px;
    }

    .category-overlay {
        padding: 16px;
    }

    .divider {
        margin: 50px 0;
    }

    /* ================================
        SERVICE BANNERS MOBILE
        ================================ */
    .service-banner1 {
        padding: 32px 24px;
        margin: 50px 0;
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
        height: 100%;
        box-sizing: border-box;
    }

    .service-content1 {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .service-content1 h2 {
        font-size: 24px;
        color: #FFFFFF;
    }

    .service-image1 {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    .service-banner2 {
        padding: 32px 24px;
        margin: 50px 0;
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
        height: 100%;
        box-sizing: border-box;
    }

    .service-content2 {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .service-banner2 .service-image2 {
        width: 100%;
        height: 200px;
    }

    .service-banner3 {
        display: flex;
        flex-direction: column;
        padding: 32px 24px;
        margin: 50px 0;
        gap: 24px;
        align-items: flex-start;
        height: 100%;
        box-sizing: border-box;
    }

    .service-content3 {
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .service-image3 {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        
    }

    /* ================================
        PRODUCTS & BLOG MOBILE
        ================================ */

    .products-header {
        margin-bottom: 32px;
    }
    .products-header h2{
        width: 50%;
    }
    .products {
        margin: auto
    }

    .product-filters {
        display: flex;
        margin-top: 8px;
        margin-bottom: 24px;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto; /* Добавлено: включаем горизонтальную прокрутку */
        overflow-y: visible; /* Добавлено: позволяем элементам выходить вниз */
        scroll-behavior: smooth; /* Добавлено: плавная прокрутка */
        scrollbar-width: none; /* Добавлено: скрываем скроллбар в Firefox */
        -ms-overflow-style: none; /* Добавлено: скрываем скроллбар в IE/Edge */
        width: 100%; /* Добавлено: ограничиваем ширину */
        max-width: 100%; /* Добавлено: предотвращаем расширение страницы */
        box-sizing: border-box;
    }

    .product-filters::-webkit-scrollbar {
        display: none;
    }

    .product-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-list .product-item {
        width: 100%;
    }

    .product-info-favorite-button {
        width: 100%;
        box-sizing: border-box;
    }

    .product-item {
        display: flex;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .product-info button img {
        width: 18px;
        height: 18px;
    }

    .button-black.add-to-cart-btn {
        width: 100%;
        box-sizing: border-box;
        border-radius: 8px;
    }

    .product-info-price-button {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .product-info-price-button h4{
        font-size: 16px;
        white-space: nowrap;
    }

    .product-info button {
        padding: 8px 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .blog-item {
        width: 100%;
        max-width: none;
        margin-bottom: 16px;
    }

    .blog-item img {
        height: 160px; /* Увеличил с 140px до 160px */
    }

    .blog-info a {
        text-decoration: none;
    }

    .popular-goods-header {
        margin-bottom: 32px;
    }

    .popular-goods {
    
    }

    .blog {
        margin-bottom: auto;
    }

    .blog-header {
        margin-bottom: 32px;
    }

    .blog-list {
        gap: 16px;
        grid-template-columns: repeat(2, 1fr);
        flex-direction: column;
    }

    .blog-item .button-black {
        padding: 8px 16px;
        font-size: 14px;
    }

/* ================================
    BLOG ARTICLE MOBILE
    ================================ */
    .blog-article-hero {
        height: 200px;
        margin-bottom: 24px;
        border-radius: 0;
        border-radius: 8px;
    }

    .blog-article-meta {
    
        align-items: flex-start;
        gap: 12px;
        margin-top: 12px;
    }
    
    .blog-article-header {
        margin-bottom: 32px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-article-main {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 32px;
        margin-bottom: 100px;
    }
    
    .blog-article-sidebar {
        flex-direction: column;
        gap: 16px;
    }
    
    .sidebar-banner {
        padding: 16px;
    }
    
    .specialist-banner img {
        height: 100px;
    }
    
    .other-articles {
        margin-bottom: 50px;
    }
    
    .other-articles-header {
        margin-bottom: 24px;
    }
    
    .other-articles-header h2 {
        font-size: 24px;
    }

    .blog-article-content p {
        margin-bottom: 16px;
    }
    
    .other-articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-card {
        border-radius: 0;
    }
    
    .article-card img {
        height: 140px;
        border-radius: 8px;
    }

    .article-card-content a {
        margin-top: 12px;
        text-decoration: none;
    }
    
    .article-card-content {
        margin-top: 12px;
        padding: 0;
    }

    /* ================================
        CATALOG MOBILE
        ================================ */

    
    .catalog-header h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .show-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Показываем catalog-controls на мобильных как на планшетах */
    .catalog-controls {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        margin-bottom: 16px;
    }
    
    .sort-dropdown {
        width: 200px;
    }
    
    .sort-btn {
        padding: 8px 12px;
        justify-content: space-between;
        width: 200px; /* Увеличиваем ширину */
        white-space: nowrap; /* Предотвращаем перенос текста */
        overflow: hidden;
    }

    .sort-btn p {
        font-size: 12px;
        font-weight: 500;
        margin: 0;
        white-space: nowrap; /* Предотвращаем перенос в тексте */
        overflow: hidden; /* Скрываем переполнение */
        text-overflow: ellipsis; /* Добавляем ... если текст не помещается */
        flex: 1; 
    }
    
    .sort-option {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .catalog-filter-pills {
        display: flex !important; /* ИЗМЕНЯЕМ: flex вместо block */
        gap: 8px; /* ДОБАВЛЯЕМ: отступы между кнопками */
        margin-left: -20px;
        margin-right: -20px;
        overflow-x: auto !important;
        overflow-y: visible !important;
        width: calc(100% + 40px);
        box-sizing: border-box;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        flex-wrap: nowrap; /* ДОБАВЛЯЕМ: запрещаем перенос */
        padding: 0 20px;
    }
    
    .catalog-filter-pills::-webkit-scrollbar {
        display: none;
    }
    
    .catalog-filter-pills .filter-pill {
        padding: 6px 12px;
        border: 1px solid #D6D6D6;
        border-radius: 50px;
        background: transparent;
        color: #808080;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        flex-shrink: 0; /* Запрещаем сжатие */
        min-width: max-content; 
    }

    
    .adaptive-filters {
        display: block !important;
        margin-bottom: 16px;
        margin-left: -20px;
        margin-right: -20px;
        overflow-x: auto !important; /* СКРОЛЛ НА РОДИТЕЛЕ */
        overflow-y: visible !important;
        width: calc(100% + 40px);
        box-sizing: border-box;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
    }

    .catalog-main {
        overflow: visible !important; /* ИСПРАВЛЯЕМ: убираем все overflow ограничения */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .adaptive-filters-scroll {
        display: flex;
        gap: 8px;
        overflow: visible !important; /* ДОЧЕРНИЙ БЕЗ ОГРАНИЧЕНИЙ */
        padding: 0 20px;
        flex-wrap: nowrap;
        min-width: max-content; /* РАСТЯГИВАЕМ ДЛЯ СКРОЛЛА */
        width: auto;
        box-sizing: border-box;
    }
    
    .adaptive-filters-scroll::-webkit-scrollbar {
        display: none;
    }
    
    .adaptive-filter-group {
        position: relative;
        flex-shrink: 0;
    }
    
    .adaptive-filter-pill {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: white;
        border: 1px solid #D6D6D6;
        border-radius: 50px;
        color: #808080;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        min-width: max-content;
    }

    .catalog-filter-pills .filter-pill {
        font-size: 14px;
    }
    
    .adaptive-filter-pill:hover {
        border-color: #CDA769;
        color: #CDA769;
        background-color: rgba(205, 167, 105, 0.1);
    }
    
    .adaptive-filter-pill.active {
        background: #CDA769;
        color: #FFFFFF;
        border-color: #CDA769;
    }
    
    .adaptive-filter-pill svg {
        transition: transform 0.3s ease;
    }
    
    .adaptive-filter-pill.active svg {
        transform: rotate(180deg);
    }
    
    /* Увеличиваем z-index для всех выпадающих фильтров */
    .adaptive-filter-dropdown {
        position: fixed !important;
        top: auto; 
        left: auto; 
        background: white;
        border: 1px solid #D6D6D6;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 9999999 !important;
        min-width: 180px;
        max-width: calc(100vw - 32px);
        overflow-y: auto;
        display: none;
        margin-top: 4px;
        /* Safari-специфичные свойства */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
        isolation: isolate;
        pointer-events: auto !important;
    }

    .adaptive-filter-dropdown.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 9999999 !important; 
    }
    
    /* Специальные стили для фильтра цены с высоким z-index */
    .adaptive-price-filter {
        position: fixed;
        top: auto;
        left: auto;
        min-width: 200px;
        padding: 12px;
        z-index: 99999 !important; /* Увеличиваем для Safari */
        background: white;
        border: 1px solid #D6D6D6;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
        margin-top: 8px;
        /* Safari-специфичные свойства */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
        isolation: isolate;
    }
    
    /* Также для sort-options */
    .sort-options {
        z-index: 99998 !important;
        /* Safari-специфичные свойства */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
        isolation: isolate;
    }


    
    .adaptive-filter-option {
        display: flex;
        align-items: center;
        padding: 10px 14px;
        cursor: pointer;
        border-bottom: 1px solid #F0F0F0;
        transition: background-color 0.2s ease;
    }
    
    .adaptive-filter-option:last-child {
        border-bottom: none;
    }
    
    .adaptive-filter-option:hover {
        background-color: #F9F9F9;
    }
    
    .adaptive-filter-option input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 10px;
        cursor: pointer;
        accent-color: #CDA769;
    }
    
    .adaptive-filter-option span {
        font-size: 13px;
        color: #333;
        cursor: pointer;
    }
    
    .adaptive-filter-option input[type="checkbox"]:checked + span {
        color: #CDA769;
        font-weight: 500;
    }
    
    /* Специальные стили для фильтра цены */
    .adaptive-price-inputs {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 12px;
    }

        /* ================================
        PRODUCT GRID MOBILE (для каталога)
        ================================ */
    .product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
        height: auto;
    }
    
    .product-grid .product-item {
        width: calc(50% - 6px);
        flex-shrink: 0;
    }

    .product-item img {
        width: 100%;
        height: auto;
    }


    /* ================================
        ADAPTIVE PRICE INPUTS MOBILE
        ================================ */
    .adaptive-price-inputs {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .adaptive-price-inputs input {
        flex: 1;
        padding: 6px 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
        text-align: center;
    }
    
    .adaptive-price-separator {
        color: #666;
        font-size: 13px;
    }
    
    .adaptive-price-range {
        display: flex;
        gap: 6px;
        align-items: center;
    }
    
    .adaptive-price-range input[type="range"] {
        flex: 1;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        outline: none;
        appearance: none;
    }
    
    .adaptive-price-range input[type="range"]::-webkit-slider-thumb {
        appearance: none;
        width: 14px;
        height: 14px;
        background: #CDA769;
        border-radius: 50%;
        cursor: pointer;
    }
    
    .adaptive-price-range input[type="range"]::-moz-range-thumb {
        width: 14px;
        height: 14px;
        background: #CDA769;
        border-radius: 50%;
        cursor: pointer;
        border: none;
    }

    /* ================================
        PRODUCT PAGE MOBILE
        ================================ */
    .product-page {
        flex-direction: column;
        gap: 24px;
        margin-top: 24px;
        margin-bottom: 50px;
    }

    .product-gallery {
        max-width: 100%;
    }

    .product-info-detailed {
        max-width: 100%;
    }

    .action-buttons .quantity-controls .quantity-btn {
        width: 38.91px;
        height: 38.9px;
        border-radius: 8px;
        border: 1px solid #D6D6D6;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-actions {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 50px;
    }

    .gallery-image-container img {
        height: 350px;
    }

    .product-full-description {
        padding: 0 0;
        margin-bottom: 50px;
    }

    .product-full-description p {
        font-size: 14px;
        column-count: 1;
    }

    .product-full-description h4 {
        font-size: 20px;
    }

    .product-price #current-price {
        font-size: 24px;
    }

    .recommended-products h2 {
        font-size: 24px;
    }

    /* ================================
        DELIVERY PAGE MOBILE
        ================================ */
    .delivery-content-header {
        margin-bottom: 32px;
    }

    .delivery-content {
        flex-direction: column;
        gap: 50px;
    }

    .delivery-content-item1,
    .delivery-content-item2 {
        width: 100%;
    }

    .payment-option {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .payment-intro {
        margin-bottom: 24px;
    }

    .payment-content h4 {
        font-size: 18px;
    }

    .payment-content p {
        font-size: 14px;
    }

    .payment-icon svg {
        width: 40px;
        height: 40px;
    }

    /* ================================
        SERVICES PAGE MOBILE
        ================================ */
    .opt-content-header {
        margin-bottom: 32px;
    }

    .opt-about {
        flex-direction: column;
        gap: 32px;
    }

    .opt-about-item1,
    .opt-about-item2 {
        width: 100%;
    }

    .opt-about-item1 h5 {
        margin-bottom: 8px;
    }

    .checkbox-group label {
        font-size: 12px;
    }

    .opt-about-item2-header {
        margin-bottom: 24px;
    }

    .main-screen-services {
        height: auto;
        margin: 80px 0 32px 0;
    }

    .services-about-header {
        margin-bottom: 32px;
        width: 100%;
    }

    .about-item-left {
        width: 100%;
        text-align: left;
    }

    .services-masters {
        margin: 50px 0;
    }

    .services-about-content {
        flex-direction: column;
        gap: 32px;
    }

    .services-about-content-item2 img {
        width: 100%;
    }

    .services-about-content-item3,
    .services-about-content-item2 {
        width: 100%;
    }

    .services-masters-card1,
    .services-masters-card2 {
        width: calc(100% - 50px);
    }

    .services-masters-price {  
        flex-direction: column;
        gap: 20px;
        box-sizing: border-box;
    }

    .services-masters-card-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .services-masters-card-buttons button {
        width: 100%;
    }

    .services-steps-header {
        margin-bottom: 32px;
    }

    .services-steps-content h3 {
        margin-bottom: 16px;
    }




    .services-steps-content {
        flex-direction: column;
        gap: 12px;
    }

    .content-main-screen-services{ 
        padding: 32px 24px 32px 24px;
    }

    .services-about-content-item2 {
        width: 100%;
    }

    .services-masters-cards {
        flex-direction: column;
        gap: 24px;
    }

    .service-banner4 {
        padding: 32px 24px;
        margin: 50px 0;
        background-size: cover;
        background-position: center;
        flex-direction: column;
        gap: 24px;
        box-sizing: border-box;
        height: auto;
    }

    .service-banner4-content {
        padding:  16px;
        text-align: center;
        align-items: center;
        margin: auto;
        width: auto;
    }

    .service-banner4-form {
        max-width: 100%;
        margin: auto;
    }

    /* MODALS STYLES MOBILE */
    .booking-modal-content {
        width: 100%;
        max-width: none;
        max-height: 95vh;
        border-radius: 20px;
        box-sizing: border-box;
    }

    
    .booking-form label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .booking-form input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .booking-form .checkbox-group {
        margin-bottom: 24px;
        font-size: 12px;
        gap: 10px;
    }
    
    .booking-form .checkbox-circle {
        width: 18px;
        height: 18px;
    }

    /*MASTER DETAIL MODAL MOBILE*/
    .master-detail-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .master-detail-content {
        padding: 24px;
    }
    
    .master-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .master-detail-header img {
        width: 80px;
        height: 80px;
    }
    
    .master-title h2 {
        font-size: 24px;
    }
    
    .service-block {
        margin-bottom: 20px;
    }
    
    .master-services,
    .master-education,
    .master-pricing {
        margin-bottom: 24px;
    }

    /* ================================
        404 PAGE MOBILE
        ================================ */
    .content-main-screen-404 h3 {
        font-size: 24px;
    }

    .content-main-screen-404 h4 {
        font-size: 18px;
    }

    /* ================================
        ORDER DETAILS MOBILE
        ================================ */
    .order-details {
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 24px;
        gap: 12px;
    }

    .order-details p {
        font-size: 14px;
    }

    /* ================================
        MODALS MOBILE
        ================================ */

    .favorites-modal-content,
    .cart-modal-content {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        top: 0;
        left: 0;
        transform: translateY(100%);
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }


    /* Переопределяем анимации для мобильных */
    .modal-overlay.active .favorites-modal-content,
    .modal-overlay.active .cart-modal-content {
        transform: translateY(0);
    }
    
    .modal-overlay.modal-hiding .favorites-modal-content,
    .modal-overlay.modal-hiding .cart-modal-content {
        transform: translateY(100%);
    }


    .modal-header {
        padding: 16px 24px;
        flex-shrink: 0; /* Фиксированная высота хедера */
        border-bottom: 1px solid #E0E0E0;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .modal-header img {
        width: 20px;
        height: 20px;
    }

    .favorites-list,
    .cart-list {
        flex: 1; /* Занимает оставшееся пространство */
        max-height: none !important; /* Убираем ограничение высоты */
        overflow-y: auto;
        padding: 24px;
    }

    /* Футер модального окна */
    .favorites-footer, 
    .cart-footer {
        padding: 16px 24px 24px 24px !important; /* Добавляем нижний padding */
        flex-shrink: 0; /* Фиксированная высота футера */
        background: white;
        border-top: 1px solid #E0E0E0;
        gap: 16px;
    }

    /* Общая стоимость */
    .favorites-total, 
    .cart-total {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 0; /* Убираем дополнительный padding */
    }

    /* Товары */
    .favorite-item,
    .cart-item {
        padding: 12px;
        border-radius: 8px;
        gap: 12px;
        margin-bottom: 16px;
        height: auto;
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
    }

    .favorite-item-actions, 
    .cart-item-actions {
        flex-direction: row;
        gap: 8px;
        align-items: flex-end;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
    }

    .favorite-item-left, 
    .cart-item-left {
        gap: 12px;
    }


    .recommendation-item-actions {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }

    .favorite-item img,
    .cart-item img {
        width: 60px;
        height: 90px;
    }

    .recommendation-item img {
        width: 60px;
        height: 60px;
    }

    .favorites-total, 
    .cart-total {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .cart-total-left p,
    .favorites-total-left p {
        padding: auto;
        justify-content: center;
        text-align: center;
        font-size: 12px;
    }


    .favorites-total-price, 
    .cart-total-price {
        width: 100%;
        text-align: left;
        justify-content: center;
        gap: 4px;
        align-items: center;
        flex-direction: row;
    }

    .favorites-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .favorite-item-left, 
    .cart-item-left {
        gap: 12px;
        width: 100%;
    }

    .favorites-footer, .cart-footer {
        padding: 16px 0 0 0;
        gap: 0;
    }

    .footer-recommendations 
    .recommendation-section {
        padding: 16px 24px;
    }

    .recommendation-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .favorite-item-info h5, 
    .cart-item-info h5 {
        font-size: 14px;
    }

    .favorite-item-details, 
    .cart-item-details {
        gap: 4px;
    }

    .cart-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .favorites-total h3, .cart-total h3 {
        white-space: nowrap;
    }

    .cart-buttons p {
        font-size: 14px;
    }

    .recommendation-item-info p {
        font-size: 12px;
    }


    .booking-form {
        gap: 16px;
    }

    .booking-form label {
        font-size: 14px;
    }

    .booking-form select,
    .booking-form input {
        padding: 10px 12px;
        font-size: 14px;
    }


    .master-detail-content {
        gap: 16px;
    }

    .master-title h2 {
        font-size: 20px;
    }

    .remove-from-favorites,
    .remove-from-cart {
        padding: 6px;
    }

    .remove-from-favorites img,
    .remove-from-cart img {
        width: 18px;
        height: 18px;
    }

    .favorite-item-price, 
    .cart-item-price {
        font-size: 16px;
    }

    .recommendation-item-actions button {
        padding: 6px 12px;
    }

    .favorite-item button {
        padding: 6px 12px;
    }

    .favorite-item-price-quantity, 
    .cart-item-price-quantity {
        gap: 8px;
        width: auto;
        flex-direction: row;
    }

    .quantity-btn {
        padding: 4px 8px;
        font-size: 14px;
    }

    .quantity-display {
        font-size: 14px;
    }

    .quantity-controls {
        gap: 4px;
    }

    /* ================================
        FOOTER MOBILE
        ================================ */
    .adress-container {
        margin-top: 50px;
        margin-bottom: 50px;
    }

    .adress-header {
        margin-bottom: 24px;
        gap:32px;
    }


    .contact-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
    }

    .contact-info p {
        margin-bottom: 8px;
    }

    .contact-container {
        margin: 0 0 50px 0;
    }

    .contact-header h2 {
        margin-bottom: 32px;
    }

    .contact-header h3 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .footer-bottom {
        margin-top: 50px;
    }

    .footer-bottom-content {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .footer-content-chapter1 {
        display: block;
        flex-shrink: 0;
    }

    .footer-content-chapter1 img {
        height: 32px;
        width: auto;
        margin-bottom: 12px;
    }

    .footer-links-container {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-bottom: 56px;
        white-space: nowrap;
    }

    .footer-links-container h5 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .footer-content-chapter2,
    .footer-content-chapter3,
    .footer-content-chapter4,
    .footer-content-chapter5,
    .footer-content-chapter6 {
        width: auto;
    }

    .footer-content-chapter6 {
        margin: 0;
    }

    .footer-legal-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        text-align: center;
        align-items: center;
    }

    .legal-content-body { 
        display: flex;
        flex-direction: column;
        gap: 24px;
    }
    .legal-content-body-item a{
        height: 180px;
    }


    .footer-legal-links {
        flex: 1;
        flex-direction: row;
        text-align: center;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-legal-links p {
        flex: 1;
    }

    /* ================================
        NOTIFICATIONS MOBILE
        ================================ */
    #notification-container {
        top: 80px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    .notification {
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .notification-icon {
        width: 20px;
        height: 20px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-message {
        font-size: 12px;
    }

    .notification-close {
        width: 20px;
        height: 20px;
        top: 8px;
        right: 8px;
    }

    /* Скрываем sidebar-filters на мобильных */
    .sidebar-filters {
        display: none;
    }

    /* ================================
        CATALOG PRODUCT GRID MOBILE
        ================================ */ 

    .content-main-screen-catalog {
        padding: 0; 
    }

    .main-screen-catalog {
        padding: 40px 24px;
        height: 100%;
        min-width: 0px;
        margin: 80px 0px 56px 0px; 
        border-radius: 16px;
    }

    .catalog-product-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 16px;
    }
    
    .catalog-product-grid .product-item {
        width: calc(50% - 6px);
        flex-shrink: 0;
    }

    /* ================================
    CHECKOUT PAGE MOBILE
    ================================ */

    .checkout-content {
        flex-direction: column;
        gap: 32px;
        margin-top: 24px;
    }

    .checkout-form-section {
        width: 100%;
        box-sizing: border-box;
    }

    .checkout-summary {
        width: 100%;
        position: static;
        padding: 0px;
        margin-top: 16px;
        background: none;
        box-sizing: border-box;
    }

    .checkout-form-section h2 {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .checkout-form-section h3 {
        font-size: 20px;
        margin: 24px 0 0 0;
    }

    .checkout-summary h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .form-group label {
        font-size: 14px;
    }

    .delivery-options {
        gap: 12px;
    }

    .delivery-option label {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .delivery-option label::before {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .delivery-option-content h4 {
        font-size: 14px;
    }

    .delivery-option-content p {
        font-size: 12px;
    }

    .payment-options {
        gap: 12px;
        width: 100%;
    }

    .payment-row {
        flex-direction: column;
        gap: 12px;
    }

    .payment-option label {
        padding: 16px;
        height: auto;
        min-height: 60px;
    }

    .payment-content h4 {
        font-size: 14px;
    }

    .payment-icon {
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }

    .payment-icon img {
        width: 24px;
        height: 24px;
    }

    .checkout-items {
        gap: 12px;
        margin-bottom: 20px;
    }

    .checkout-item {
        padding: 12px;
        gap: 12px;
    }

    .checkout-item img {
        width: 60px;
        height: 60px;
    }

    .checkout-item-info h5 {
        font-size: 12px;
    }

    .checkout-item-info p {
        font-size: 11px;
    }

    .checkout-item-price {
        font-size: 14px;
        white-space: nowrap;
    }

    .checkout-item-quantity {
        gap: 6px;
    }

    .checkout-item-controls img {
        width: 18px;
        height: 18px;
    }

    .checkout-item-quantity button {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .checkout-item-quantity span {
        font-size: 12px;
        min-width: 24px;
    }

    .promo-section .form-group {
        flex-direction: column;
        gap: 12px;
    }

    .order-totals {
        gap: 10px;
        margin-bottom: 20px;
        padding: 16px 0;
    }

    .total-row {
        font-size: 14px;
    }

    .total-final {
        font-size: 16px;
        padding-top: 10px;
        margin-top: 10px;
    }

    .checkout-actions {
        gap: 12px;
        margin-bottom: 16px;
    }

    .privacy-notice {
        font-size: 10px;
    }

    #main-header.search-mode .search-results-panel {
        top: calc(100% + 62px); /* Под search-bar */
    }
}

@media (max-width: 425px) {

    .action-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .action-buttons-left button.button-black{
        width: 100%;
        align-items: center;
    }
    .action-buttons-left {
        justify-content: center;
    }
    
}