/* Основные стили с более светлым фоном */
:root {
    --primary-color: #4361ee;
    --secondary-color: #6c757d;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --background-light: #ffffff;
    --background-soft: #f8f9ff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e9ecef;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-soft);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.navbar {
    background-color: var(--background-light) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 1rem 0;
}

.navbar .nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%);
    padding: 4rem 0;
    border-radius: 0 0 30px 30px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.hero-section .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

/* Категории */
.categories-section {
    background-color: var(--background-light);
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.03);
    padding: 2rem;
    margin-bottom: 2rem;
}

.categories-section h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.category-btn {
    background-color: var(--background-light);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

/* Карточки товаров */
.product-card {
    background-color: var(--background-light);
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-image {
    height: 220px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f4ff, #e6f0ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Цены */
.h5.text-primary {
    font-weight: 800;
    font-size: 1.5rem;
}

/* Кнопки */
.btn {
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #4895ef 0%, #4cc9f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

/* Формы */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background-color: var(--background-light);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
    background-color: var(--background-light);
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
}

/* Бейджи */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%) !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Алерты */
.alert {
    border-radius: 16px;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1a237e;
}

.alert-info .alert-heading {
    color: #1a237e;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2b2d42 0%, #1d1e2c 100%);
    color: rgba(255,255,255,0.8);
    border-radius: 30px 30px 0 0;
    margin-top: 3rem;
}

footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

footer .text-muted {
    color: rgba(255,255,255,0.6) !important;
}

footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Секция поиска */
.search-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border-radius: 25px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.search-form .form-control {
    border-radius: 50px 0 0 50px;
    border: 2px solid rgba(67, 97, 238, 0.2);
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Таблицы */
.table {
    background-color: var(--background-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.table th {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%);
    color: white;
    font-weight: 600;
    border: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.03);
}

/* Карточки статистики */
.stat-card {
    background: linear-gradient(135deg, var(--background-light) 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    padding: 2rem;
    transition: all 0.4s ease;
    border: none;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.stat-card .number {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Админ-панель */
.admin-header {
    background: linear-gradient(135deg, #2b2d42 0%, #1d1e2c 100%) !important;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    padding: 1.5rem 0;
}

.admin-nav {
    background-color: var(--background-light);
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border-radius: 0 0 16px 16px;
    margin-bottom: 2rem;
}

.admin-nav .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%);
    color: white !important;
    transform: translateY(-2px);
}

.admin-content {
    padding: 2rem 0;
}

.form-card {
    background: var(--background-light);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: none;
}

/* Кнопки действий */
.action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: none;
    transition: all 0.3s ease;
}

.edit-btn {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%);
    color: white;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
    color: white;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.add-product-btn {
    background: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
    color: white;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 20px rgba(76, 201, 240, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.add-product-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 201, 240, 0.4);
}

/* Статусы заказов */
.status-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-pending { 
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%); 
    color: #856404; 
}
.status-processing { 
    background: linear-gradient(135deg, #cce5ff 0%, #9ecbff 100%); 
    color: #004085; 
}
.status-shipped { 
    background: linear-gradient(135deg, #d1ecf1 0%, #a2dbe5 100%); 
    color: #0c5460; 
}
.status-delivered { 
    background: linear-gradient(135deg, #d4edda 0%, #b3e6be 100%); 
    color: #155724; 
}
.status-cancelled { 
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%); 
    color: #721c24; 
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-form .form-control,
    .search-form .btn {
        border-radius: 50px;
        margin-bottom: 1rem;
    }
    
    .categories-list {
        justify-content: center;
    }
    
    .stat-card .number {
        font-size: 2.2rem;
    }
    
    .admin-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Скругления */
.rounded-xl {
    border-radius: 25px !important;
}

.rounded-xxl {
    border-radius: 30px !important;
}

/* Тени */
.shadow-soft {
    box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important;
}

.shadow-strong {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

/* Градиенты */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4361ee 0%, #4895ef 100%) !important;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
}

/* Цвета текста */
.text-gradient {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}