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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            margin: 0;
            padding: 2px;
            background-color: #c1c1c192;
}

  
.install-banner {
    position: fixed;
    bottom: 80px;
    left: 0;
    right: 0;
    background: #ff5722;
    color: white;
    padding: 15px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    display: none;
}

.install-banner p {
    margin: 0 0 10px 0;
}

#installButton, #dismissInstall {
    padding: 8px 15px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#installButton {
    background: #fff;
    color: #ff5722;
}

#dismissInstall {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    
    /* Эффект размытого фона как в iOS */
    background-color: white;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(10px);
    
    /* Граница сверху */
    border-top: 0.5px solid rgba(0, 0, 0, 0.615);
}

.nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease;
}

.nav-button:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Для иконок (если используете) */
.nav-button i {
    font-size: 24px;
    margin-bottom: 4px;
}
        .nav-button img {
            width: 23px;
            height: 23px;
            margin-bottom: 3px;
        }
        .nav-button span {
            font-size: 10px;
        }



    /* Общие стили */
    .category-container {
        padding: 0 16px;
        margin-top: -10px;
        margin-bottom: 24px;
        font-family: 'Montserrat', sans-serif;
    }
    
    .categories-grid {
        display: grid;
        gap: 12px;
    }
    
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: none;
    border-radius: 16px;
    background: rgba(245, 245, 247, 0.7); /* Полупрозрачный фон */
    backdrop-filter: blur(10px); /* Размытие фона за карточкой */
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
    
    .category-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .category-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .category-name {
        font-size: 13px;
        font-weight: 500;
        color: #1d1d1f;
        text-align: center;
    }
    
    .category-card:hover, .category-card.active {
        background: #0071e3;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,113,227,0.2);
    }
    
    .category-card:hover .category-name, 
    .category-card.active .category-name {
        color: white;
    }
    
    /* Мобильный дизайн (до 768px) */
    @media (max-width: 768px) {
        .categories-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }
        
        .category-card {
            padding: 10px 6px;
            border-radius: 14px;
        }
        
        .category-icon {
            width: 36px;
            height: 36px;
            margin-bottom: 6px;
        }
        
        .category-name {
            font-size: 13px;
        }
    }
    
    /* ПК дизайн (от 769px) */
    @media (min-width: 769px) {
        .category-container {
            max-width: 1200px;
            margin: 0 auto 32px;
            padding: 0 24px;
        }
        
        .categories-grid {
            grid-template-columns: repeat(6, 1fr);
            gap: 16px;
        }
        
        .category-card {
            padding: 16px 12px;
            border-radius: 18px;
        }
        
        .category-icon {
            width: 48px;
            height: 48px;
            margin-bottom: 10px;
        }
        
        .category-name {
            font-size: 14px;
        }
    }

        .category-button:hover {
            background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
        }
        .category-button:active {
            transform: translateY(0);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
      
 .products {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: -12px;
    justify-content: center;
    margin-block-end: 50px;
    padding: 10px;
}

/* Общие стили карточек */
.product-card {
    background: rgba(255, 255, 255, 0.85);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
}

/* Мобильные (2 в ряд) */
@media (max-width: 767px) {
    .product-card {
        width: calc(50% - 8px);
    }
}

/* Планшеты (3 в ряд) */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-card {
        width: calc(33.33% - 10px);
    }
}

/* Десктоп (5 в ряд) */
@media (min-width: 1024px) {
    .product-card {
        width: calc(20% - 12px);
    }
}

/* Эффекты при наведении (только для десктопа) */
@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Контент карточки */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: center center;
    will-change: transform;
}

/* Эффект при наведении на изображение */
.product-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Анимация при нажатии на изображение (приближение) */
.product-card img:active {
    transform: scale(1.1) translateZ(5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.product-card p {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
}

.product-card .price {
    font-size: 16px;
    font-weight: 700;
    color: #ff5722;
    margin-bottom: 10px;
}

.product-card .add-to-cart {
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
}

/* Анимация нажатия для всей карточки (если нужно) */
.product-card:active {
    transform: scale(0.98);
}
.product-card img.active {
    transform: scale(1.1) translateZ(5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    z-index: 10; /* Чтобы увеличенное фото было поверх других */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.admin-link, .back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px; /* Более округлые углы */
    font-size: 16px;
    font-weight: 500; /* Средний вес шрифта */
    transition: background-color 0.2s ease; /* Плавное изменение цвета */
}


.admin-link {
    background: #34c759; /* Зеленый цвет, как в iOS */
}

.admin-link:hover {
    background: #248a3d; /* Темнее при наведении */
}

.back-link {
    background: #8e8e93; /* Серый цвет, как в iOS */
}

.back-link:hover {
    background: #6c6c70; /* Темнее при наведении */
}

.cart-items {
    margin-top: 20px;
    padding: 0 16px; /* Добавляем отступы по бокам */
}

.cart-item {
    background: #fff;
    padding: 16px;
    border-radius: 12px; /* Увеличиваем скругление углов */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Мягкая тень */
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1); /* Легкая граница для аккуратности */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Плавные анимации */
}

.cart-item:hover {
    transform: translateY(-2px); /* Легкий подъем при наведении */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Увеличенная тень при наведении */
}

/* Дополнительные элементы для стиля Apple */
.cart-item h3 {
    font-size: 18px;
    font-weight: 500; /* Полужирный шрифт */
    color: #1d1d1f; /* Темно-серый цвет текста */
    margin-bottom: 8px;
}

.cart-item p {
    font-size: 14px;
    color: #6e6e73; /* Серый цвет текста */
    margin-bottom: 4px;
}

.cart-item button {
    background: #007aff; /* Синий цвет, как в iOS */
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-item button:hover {
    background: #0063cc; /* Темнее синий при наведении */
}

.out-of-stock {
    color: #FF1900; /* Красный цвет, как в iOS */
    font-weight: bold;
}

.error {
    color: #ff3b30; /* Красный цвет для ошибок */
}

.product-card textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0; /* Светлая граница */
    border-radius: 8px; /* Округлые углы */
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
}

.delete-button {
    background-color: #ff3b30; /* Красный цвет, как в iOS */
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 8px; /* Округлые углы */
    font-size: 14px;
    font-weight: 500; /* Средний вес шрифта */
    transition: background-color 0.2s ease; /* Плавное изменение цвета */
}

.delete-button:hover {
    background-color: #cc2e25; /* Темнее при наведении */
}
  /* iPhone-style notification */
        .notification {
            position: fixed;
            top: 50px;
            left: 50%;
            transform: translateX(-50%);
            background-color: #333;
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 500;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            opacity: 0;
            transition: opacity 0.3s, transform 0.3s;
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 8px;
            pointer-events: none;
        }

        .notification.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .notification.success {
            background-color: #34C759; /* Green for success */
        }

        .notification.error {
            background-color: #FF3B30; /* Red for error/removal */
        }

        .notification i {
            font-size: 16px;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .notification.show {
            opacity: 1;
            animation: slideIn 0.3s ease-out forwards;
        }

        /* Cart button styles */
        .korzina i {
            margin-right: 8px;
        }

        .korzina {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8px 12px;
            cursor: pointer;
            border: none;
            border-radius: 13px;
            background: #0071e3;
            color: white;
            font-weight: bold;
            transition: background 0.2s;
        }

        .korzina:hover {
            background: #0071e3;
        }

        .korzina .fa-trash {
            margin-right: 8px;
        }

/*Поиск товар*/
.search-container {
    max-width: 600px;
    margin: 20px auto;
    position: sticky;
    top: 0; /* You need to specify the sticky position */
    z-index: 100; /* Optional: ensures it stays above other content */
    margin-top: -8px;
}
.search-box {
        display: flex;
        position: relative;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-radius: 30px;
        overflow: hidden;
        background: white;
    }
    
#searchInput {
        flex: 1;
        padding: 10px 15px;
        border: none;
        outline: none;
        font-size: 16px;
        background: transparent;
    }
    
 #searchButton {
        background: linear-gradient(145deg, #007aff, #0063cc);
        border: none;
        padding: 0 20px;
        cursor: pointer;
        transition: background 0.3s;
    }
    
#searchButton:hover {
        background: linear-gradient(145deg, #007aff, #0063cc);
    }
    
#searchButton img {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(1);
    }
    
.no-products-message {
        text-align: center;
        padding: 20px;
        color: #666;
        font-size: 18px;
    }
    


           /* PWA Prompt Styles */
        .pwa-prompt {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,0.5);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }

        .pwa-prompt-content {
            background: white;
            border-radius: 14px;
            width: 300px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            font-family: -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .pwa-prompt-header {
            padding: 16px;
            text-align: center;
            border-bottom: 1px solid #f0f0f0;
        }

        .pwa-prompt-icon {
            width: 60px;
            height: 60px;
            margin: 0 auto 10px;
            border-radius: 14px;
            background: #b9aeabb6;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 30px;
        }
.pwa-prompt-icon::before {
    content: "";
    display: inline-block;
    width: 45px;
    height: 45px;
    background: url('logodona.png') center/cover;
}
        .pwa-prompt-body {
            padding: 16px;
            text-align: center;
        }

        .pwa-prompt-title {
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 18px;
        }

        .pwa-prompt-text {
            color: #666;
            font-size: 14px;
            margin-bottom: 16px;
        }

        .pwa-prompt-buttons {
            display: flex;
            border-top: 1px solid #f0f0f0;
        }

        .pwa-prompt-button {
            flex: 1;
            padding: 12px;
            text-align: center;
            background: none;
            border: none;
            font-size: 16px;
            cursor: pointer;
        }

        .pwa-prompt-button:first-child {
            border-right: 1px solid #f0f0f0;
            color: #666;
        }

        .pwa-prompt-button:last-child {
            font-weight: 600;
            color: #007aff;
        }
        

           /* Мобильные стили */
    
    .dodo-notifications {
        position: fixed;
        bottom: 70px;
        left: 10px;
        right: 10px;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        pointer-events: none;
    }

    .dodo-notification {
        position: relative;
        background: white;
        border-radius: 12px;
        padding: 12px 15px 12px 60px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: auto;
    }

    .dodo-notification.show {
        transform: translateY(0);
        opacity: 1;
    }

    .dodo-notification.hide {
        transform: translateY(20px);
        opacity: 0;
    }

    .dodo-notification-badge {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 16px;
    }

    .dodo-notification.new .dodo-notification-badge {
        background: linear-gradient(135deg, #FF6900, #FF8C00);
    }

    .dodo-notification.pending .dodo-notification-badge {
        background: linear-gradient(135deg, #FFA800, #FFC000);
    }

    .dodo-notification.deliveri .dodo-notification-badge {
        background: linear-gradient(135deg, #00B956, #00D166);
    }

    .dodo-notification.success .dodo-notification-badge {
        background: linear-gradient(135deg, #00B956, #00D166);
    }

    .dodo-notification.otmen .dodo-notification-badge {
        background: linear-gradient(135deg, #FF2E00, #FF4D00);
    }

    .dodo-notification-content {
        display: flex;
        flex-direction: column;
        gap: 3px;
        width: 100%;
    }

    .dodo-notification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dodo-notification-title {
        font-weight: 600;
        font-size: 14px;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60%;
    }

    .dodo-notification-time {
        font-size: 12px;
        color: #888;
    }

    .dodo-notification-body {
        display: flex;
        flex-direction: column;
    }

    .dodo-notification-status {
        font-weight: 700;
        font-size: 15px;
        color: #222;
    }

    .dodo-notification-details {
        font-size: 12px;
        color: #666;
    }

    .dodo-notification-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0,0,0,0.05);
        color: #888;
        font-size: 14px;
        border: none;
        padding: 0;
    }

    .dodo-notification-progress {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 2px;
        width: 100%;
        overflow: hidden;
    }

    .dodo-notification-progress:after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        animation: progressBar 8s linear forwards;
    }

    .dodo-notification.new .dodo-notification-progress:after {
        background: linear-gradient(90deg, #FF6900, #FF8C00);
    }

    .dodo-notification.pending .dodo-notification-progress:after {
        background: linear-gradient(90deg, #FFA800, #FFC000);
    }

    .dodo-notification.deliveri .dodo-notification-progress:after {
        background: linear-gradient(90deg, #00B956, #00D166);
    }

    .dodo-notification.success .dodo-notification-progress:after {
        background: linear-gradient(90deg, #00B956, #00D166);
    }

    .dodo-notification.otmen .dodo-notification-progress:after {
        background: linear-gradient(90deg, #FF2E00, #FF4D00);
    }

    @keyframes progressBar {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(0); }
    }

    /* Десктопные стили */
    @media (min-width: 768px) {
        .dodo-notifications {
            bottom: 80px;
            left: 20px;
            right: auto;
            width: 350px;
        }
        
        .dodo-notification {
            padding: 15px 20px 15px 70px;
        }
        
        .dodo-notification-badge {
            width: 40px;
            height: 40px;
            font-size: 18px;
            left: 15px;
        }
        
        .dodo-notification-title {
            font-size: 15px;
        }
        
        .dodo-notification-time {
            font-size: 13px;
        }
        
        .dodo-notification-status {
            font-size: 16px;
        }
        
        .dodo-notification-details {
            font-size: 13px;
        }
        
        .dodo-notification-close {
            width: 24px;
            height: 24px;
            font-size: 16px;
        }
    }
     .dodo-notification-badge {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-size: cover;
            background-position: center;
            background-color: #f8f8f8;
            border: 2px solid #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .dodo-notification.new .dodo-notification-badge {
            background-image: url('https://img.icons8.com/ios-filled/49/realtime-protection.png');
        }
        
        .dodo-notification.pending .dodo-notification-badge {
            background-image: url('https://img.icons8.com/color/48/chef-cooking-skin-type-4.png');
        }
        
        .dodo-notification.delivery .dodo-notification-badge {
            background-image: url('https://img.icons8.com/ios-filled/48/order-on-the-way.png');
        }
        
        .dodo-notification.success .dodo-notification-badge {
            background-image: url('https://img.icons8.com/tiny-color/49/ok.png');
        }
        
        .dodo-notification.otmen .dodo-notification-badge {
            background-image: url('https://img.icons8.com/cotton/48/cancel--v4.png');
        }

        @keyframes reappear {
            0% { transform: scale(0.9); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }
        
        .reappear-notification {
            animation: reappear 0.3s ease-out forwards;
        }

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