/* ============================================================
   fastfoodmenu.ru — Site styles (base + общие компоненты)
   Подключается ко всем шаблонам сайта.
   Page-специфика — в page-*.css рядом.
   ============================================================ */

/* ============ INTER (локальный, @fontsource) ============ */
/* Latin: 4 веса */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic: 4 веса */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-cyrillic-400-normal.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-cyrillic-500-normal.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-cyrillic-600-normal.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-cyrillic-700-normal.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    --bg-page: #FAFAF7;
    --bg-card: #FFFFFF;
    --bg-footer: #1F2937;

    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border: #E5E7EB;

    --accent: #E63946;
    --accent-hover: #C42836;
    --accent-bg: #FEF2F2;

    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --info: #3B82F6;
    --info-bg: #EFF6FF;
    --pink-bg: #FDF2F8;
    --purple-bg: #F5F3FF;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
}
h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 22px; font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }

@media (max-width: 640px) {
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    h3 { font-size: 19px; }
}

a { color: var(--text-primary); text-decoration: none; transition: color 200ms; }
a:hover { color: var(--accent); text-decoration: none; }

/* ============ LAYOUT PRIMITIVES ============ */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
}

.section { padding: 60px 0; }
@media (max-width: 640px) {
    .section { padding: 32px 0; }
}

.stack-12 > * + * { margin-top: 12px; }

.price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--accent);
}
.meta {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: 64px;
}
.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    white-space: nowrap;
}
.site-logo:hover { color: var(--text-primary); }
.site-logo .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}
.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 200ms, background 200ms;
}
.header-search input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
}
.header-search .uk-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    white-space: nowrap;
}
.header-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}
.header-nav a:hover { color: var(--accent); }

.header-mobile {
    display: none;
    margin-left: auto;
    gap: 8px;
    align-items: center;
}
.header-mobile a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}
.header-mobile a:hover { background: var(--accent-bg); color: var(--accent); }

@media (max-width: 960px) {
    .site-header .header-search,
    .header-nav { display: none; }
    .header-mobile { display: inline-flex; }
}

/* ============ BREADCRUMBS ============ */
.breadcrumbs {
    padding-top: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 8px; color: #C7CDD6; }
.breadcrumbs .current { color: var(--text-primary); font-weight: 500; }

/* ============ SECTION HEADERS ============ */
.section-head,
.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.section-head .section-sub,
.sec-head .sec-sub,
.sec-head .sub {
    color: var(--text-secondary);
    margin-top: 6px;
    font-size: 15px;
}
.section-link,
.sec-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
}
.section-link:hover,
.sec-link:hover { color: var(--accent-hover); }

/* ============ BUTTONS ============ */
.btn-outline {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 200ms, color 200ms, background 200ms;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}

.btn-accent-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 200ms, color 200ms;
}
.btn-accent-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 22px;
    background: #fff;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background 200ms;
}
.btn-white:hover {
    background: #F3F4F6;
    color: var(--text-primary);
}

.tag-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 200ms, color 200ms;
}
.tag-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============ DISH CARD (универсальная — индекс, страница сети, карточка блюда) ============ */
.dish-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 960px) {
    .dish-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .dish-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

.dish-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: transform 200ms, box-shadow 200ms, border-color 200ms;
    cursor: pointer;
}
.dish-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--accent);
}

.dish-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.dish-photo .uk-icon {
    color: var(--accent);
    opacity: 0.55;
}
.dish-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dish-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}
.dish-badge.is-fresh { background: var(--success); }
.dish-badge.is-sale {
    background: var(--warning);
    top: 10px;
    left: auto;
    right: 10px;
}

.dish-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.dish-body h4 { margin: 0; }
.dish-body .network,
.dish-body .category {
    font-size: 14px;
    color: var(--text-secondary);
}
.dish-body .nutrients {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.dish-footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dish-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.dish-price .price-old {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-right: 6px;
    vertical-align: middle;
}

/* ============ MINI DISH CARD (.d-card — для блока "другие в сети") ============ */
.d-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 200ms, border-color 200ms, box-shadow 200ms;
    cursor: pointer;
}
.d-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow-card-hover);
}
.d-card .ph {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.d-card .ph .uk-icon { color: var(--accent); opacity: 0.5; }
.d-card .body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.d-card .body h4 { margin: 0; font-size: 16px; }
.d-card .body .cat {
    font-size: 13px;
    color: var(--text-secondary);
}
.d-card .body .nutr {
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.d-card .body .ft {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.d-card .body .pp {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ============ COLLECTION CARD (универсальная, фон через .col-* модификатор) ============ */
.collection-card,
.coll-card,
.rel-card {
    position: relative;
    display: block;
    border-radius: var(--radius-md);
    padding: 22px;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: transform 200ms, box-shadow 200ms;
    overflow: hidden;
}
.collection-card { height: 180px; min-width: 280px; }
.coll-card       { min-height: 150px; }
.rel-card        { min-height: 160px; }

.collection-card:hover,
.coll-card:hover,
.rel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    color: var(--text-primary);
}
.collection-card h4,
.coll-card h4,
.rel-card h4 {
    font-size: 19px;
    line-height: 1.3;
    max-width: 80%;
}
.coll-card h4, .rel-card h4 { font-size: 18px; }
.collection-card .meta { margin-top: 8px; }
.coll-card .ct,
.rel-card .ct {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.collection-card .arrow,
.coll-card .arrow,
.rel-card .arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background 200ms;
}
.coll-card .arrow,
.rel-card .arrow {
    right: 18px;
    bottom: 18px;
    width: 32px;
    height: 32px;
}
.collection-card:hover .arrow {
    background: var(--text-primary);
    color: #fff;
}

/* Палитра фонов карточек подборок */
.col-pink   { background: #FCE7E7; }
.col-green  { background: #DCFCE7; }
.col-amber  { background: #FEF3C7; }
.col-blue   { background: #DBEAFE; }
.col-purple { background: #EDE9FE; }
.col-mint   { background: #CCFBF1; }

/* ============ SLIDER NAV (стрелки для UIkit slider) ============ */
.slider-nav {
    display: inline-flex;
    gap: 8px;
}
.slider-nav a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: border-color 200ms, color 200ms, background 200ms;
}
.slider-nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
/* UIkit slider items spacing reset */
.uk-slider-items > li { padding-left: 16px; }
.uk-slider-items > li:first-child { padding-left: 0; }

/* ============ PAGER ============ */
.pager {
    display: inline-flex;
    gap: 4px;
}
.pager a, .pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 200ms, color 200ms;
}
.pager a:hover { background: var(--accent-bg); color: var(--accent); }
.pager .active {
    background: var(--accent);
    color: #fff;
}
.pager .arrow { color: var(--text-secondary); }

/* ============ SEO BLOCK ============ */
.seo-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}
@media (max-width: 640px) { .seo-block { padding: 22px; } }
.seo-block h2 { margin-bottom: 18px; }
.seo-block h3 { margin-top: 28px; margin-bottom: 12px; }
.seo-block p {
    color: #374151;
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 14px;
}

/* ============ UPDATED BADGE (используется на странице сети и карточке блюда) ============ */
.updated-badge,
.updated-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--bg-footer);
    color: #fff;
    padding: 60px 0;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col ul a {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    transition: color 200ms;
}
.footer-col ul a:hover { color: #fff; }

.footer-contact-line {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-contact-line a { color: rgba(255,255,255,0.85); }
.footer-contact-line a:hover { color: #fff; }

.footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms;
}
.footer-socials a:hover { background: var(--accent); color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 48px;
    padding-top: 24px;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    line-height: 1.6;
}

/* ============ HEADER SEARCH AUTOCOMPLETE (mSearch, под палитру) ============ */
.header-search .mse-autocomplete {
    margin-top: 6px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card-hover);
}
.header-search .mse-autocomplete-item { border-radius: var(--radius-sm); }
.header-search .mse-autocomplete-item:hover,
.header-search .mse-autocomplete-item.active { background: var(--accent-bg); }
.header-search .mse-suggest-item { color: var(--text-primary); }
.header-search .mse-suggest-title { font-weight: 500; }
.header-search .mse-suggest-price-current { color: var(--accent); font-weight: 600; }

/* ============ МОБИЛЬНАЯ МОДАЛКА ПОИСКА ============ */
.search-modal-dialog {
    padding: 24px 20px 28px;
}
.search-modal-title {
    font-size: 20px;
    margin: 0 32px 16px 0;
}
.search-modal-form {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}
.search-modal-form > .uk-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}
.search-modal-form .mse-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 200ms, background 200ms;
}
.search-modal-form .mse-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
}
.search-modal-submit {
    flex-shrink: 0;
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 200ms;
}
.search-modal-submit:hover { background: var(--accent-hover); }

.search-modal .mse-autocomplete {
    margin-top: 6px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card-hover);
}
.search-modal .mse-autocomplete-item { border-radius: var(--radius-sm); }
.search-modal .mse-autocomplete-item:hover,
.search-modal .mse-autocomplete-item.active { background: var(--accent-bg); }
.search-modal .mse-suggest-item { color: var(--text-primary); }
.search-modal .mse-suggest-title { font-weight: 500; }
.search-modal .mse-suggest-price-current { color: var(--accent); font-weight: 600; }
