/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

/* ==================== НАВИГАЦИЯ ==================== */
.navbar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

/* ==================== КАРТОЧКИ ТОВАРОВ ==================== */
.product-card {
    background: #fff;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    transition: var(--transition);
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
    line-height: 1.4;
}

.product-card .card-text {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.product-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: auto 0 1rem 0;
}

.product-card .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.625rem 1rem;
    transition: var(--transition);
}

.product-card .btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #22c55e 100%);
    border: none;
}

.product-card .btn-success:hover {
    background: linear-gradient(135deg, var(--success-hover) 0%, #16a34a 100%);
    transform: scale(1.02);
}

.product-card .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border: none;
}

.product-card .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #2563eb 100%);
    transform: scale(1.02);
}

/* ==================== ФИЛЬТРЫ ==================== */
.filter-sidebar {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: none;
    position: sticky;
    top: 20px;
}

.filter-sidebar .card-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
}

.filter-sidebar .form-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
}

.filter-sidebar .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

/* ==================== СТРАНИЦЫ ==================== */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ==================== ФУТЕР ==================== */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    margin-top: auto;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: #fff;
}

/* ==================== КОРЗИНА ==================== */
#cart-notification .toast {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
}

/* ==================== АНИМАЦИИ ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 768px) {
    .product-card .card-img-top {
        height: 150px;
    }
    
    .product-card .price {
        font-size: 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}
