/* ===== WEBSITE GENERAL STYLES ===== */

/* Стили для счетчика корзины */
.nav-link.position-relative {
    position: relative !important;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.cart-badge:empty {
    display: none;
}

.cart-badge.animate {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Стили для иконок в навигации */
.nav-link i {
    font-size: 1rem !important;
    vertical-align: middle;
}

.nav-link .bi-basket,
.nav-link .bi-person,
.nav-link .bi-box-arrow-in-right {
    font-size: 1rem !important;
}

/* Стили для навигации */
.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    height: 100%;
}

/* Улучшенное позиционирование для мобильных устройств */
@media (max-width: 768px) {
    .cart-badge {
        top: -3px;
        right: -3px;
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
        min-width: 16px;
    }
}

/* Стили для уведомлений */
.toast-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
}

.toast-notification.error {
    background: #dc3545;
}

.toast-notification.warning {
    background: #ffc107;
    color: #212529;
}

.toast-notification.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Стили для кнопок добавления в корзину */
.add-to-cart-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-to-cart-btn.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* Стили для загрузки */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для карточек товаров */
.food-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.food-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.food-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.food-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Стили для навигации */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffc107 !important;
}

/* Стили для футера */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: #ffc107;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffc107;
}

/* Стили для форм */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(45deg, #1e7e34, #155724);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c82333, #bd2130);
    transform: translateY(-1px);
}

/* Стили для модальных окон */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .food-card .card-img-top {
        height: 150px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}
