/* ============================================
   БЛЮДА.РУ — Дизайн-система
   Версия: 1.0
   ============================================ */

/* ── ПЕРЕМЕННЫЕ ─────────────────────────── */
:root {
    /* Палитра */
    --primary: #E85D32;
    --primary-hover: #D14A22;
    --primary-light: #FFF0EB;
    --secondary: #1B1F3B;
    --secondary-light: #2D325A;
    --accent: #FFB347;
    --accent-light: #FFF4E0;
    
    /* Нейтральные */
    --bg: #FAFBFC;
    --bg-card: #FFFFFF;
    --bg-dark: #0F1225;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    /* Статус */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Рейтинги */
    --star: #FBBF24;
    
    /* Типографика */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Отступы */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Радиусы */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    /* Переходы */
    --transition: 0.2s ease;
    --transition-slow: 0.4s ease;
}

/* ── СБРОС — ОТКЛЮЧЁН (конфликт с Tailwind v4) ── */
/* Глобальные стили перенесены в base.html через Tailwind */


/* ── КОНТЕЙНЕР ──────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ── HEADER ─────────────────────────── */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    height: 64px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-dot {
    color: var(--primary);
}

.header__nav {
    display: flex;
    gap: var(--space-lg);
}

.header__nav a {
    color: var(--text);
    font-weight: 500;
    font-size: var(--font-size-sm);
    padding: var(--space-sm) 0;
    position: relative;
}

.header__nav a:hover {
    color: var(--primary);
}

.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform var(--transition);
}

.header__nav a:hover::after {
    transform: scaleX(1);
}

.header__search {
    margin-left: auto;
}

.search-input {
    width: 220px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: var(--font-size-sm);
    background: var(--bg);
    transition: all var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    width: 280px;
}

/* ── HERO ───────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 50%, var(--primary) 100%);
    color: white;
    text-align: center;
    padding: var(--space-3xl) 0;
}

.hero__title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: var(--font-size-xl);
    opacity: 0.85;
    margin-bottom: var(--space-2xl);
}

.hero__search {
    display: flex;
    max-width: 640px;
    margin: 0 auto var(--space-xl);
    gap: var(--space-sm);
}

.hero__search-input {
    flex: 1;
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-lg);
    font-family: var(--font);
    box-shadow: var(--shadow-lg);
}

.hero__search-input:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 3px var(--primary-light);
}

.hero__quick-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.hero__quick-links span {
    opacity: 0.7;
    font-size: var(--font-size-sm);
}

.hero__quick-links a {
    color: white;
    background: rgba(255,255,255,0.15);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    transition: background var(--transition);
}

.hero__quick-links a:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* ── СЕКЦИИ ─────────────────────────── */
.section {
    padding: var(--space-3xl) 0;
}

.section__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xl);
}

/* ── КУХНИ ──────────────────────────── */
.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.cuisine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.cuisine-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    color: var(--text);
}

.cuisine-card__flag {
    font-size: 2.5rem;
}

.cuisine-card__name {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* ── NEEDS/СИТУАЦИИ ─────────────────── */
.needs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.need-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.need-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text);
}

.need-card__icon {
    font-size: 2rem;
}

.need-card__text {
    font-weight: 600;
}

/* ── КАТЕГОРИИ ──────────────────────── */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--text);
    font-size: var(--font-size-sm);
    transition: all var(--transition);
}

.category-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── КНОПКИ ─────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: white;
}

.btn--primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--border-light);
}

.btn--large {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--font-size-base);
    border-radius: var(--radius-full);
}

.btn--sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-xs);
}

/* ── КАРТОЧКА БЛЮДА (компонент) ──── */
.dish-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.dish-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.dish-card__image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.dish-card__body {
    padding: var(--space-md);
}

.dish-card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.dish-card__title a {
    color: var(--text);
}

.dish-card__title a:hover {
    color: var(--primary);
}

.dish-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.dish-card__rating {
    color: var(--star);
    font-weight: 600;
}

.dish-card__price {
    font-weight: 700;
    color: var(--text);
}

/* ── STAT CARDS ─────────────────────── */
.stats-row {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.stat-card__value {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--primary);
}

.stat-card__label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* ── BREADCRUMBS ────────────────────── */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.breadcrumbs li + li::before {
    content: '›';
    margin-right: var(--space-xs);
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

/* ── FOOTER ─────────────────────────── */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer__cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer__col h4 {
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.footer__col a {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: var(--font-size-sm);
    padding: var(--space-xs) 0;
}

.footer__col a:hover {
    color: white;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-xl);
    text-align: center;
    font-size: var(--font-size-sm);
}

/* ── ERROR PAGE ─────────────────────── */
.error-page {
    text-align: center;
    padding: var(--space-3xl) 0;
}

.error-page__code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
}

.error-page__text {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin: var(--space-md) 0 var(--space-xl);
}

/* ── RESPONSIVE ─────────────────────── */
@media (max-width: 768px) {
    .header__nav {
        display: none;
    }
    
    .hero__title {
        font-size: var(--font-size-3xl);
    }
    
    .hero__search {
        flex-direction: column;
    }
    
    .footer__cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cuisine-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .cuisine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer__cols {
        grid-template-columns: 1fr;
    }
}
