/* Header + footer chrome, layered over legacy main.css */

body.chrome-redesign {
    background: #f7f2ea;
}

/* Старый main.css задаёт body height:100%. Тогда контейнер шапки равен
   одному экрану и sticky перестаёт работать после первой прокрутки. */
body.chrome-redesign {
    height: auto;
    min-height: 100%;
}

body.chrome-redesign header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 400;
    background: #fffaf4;
    box-shadow: 0 2px 12px rgba(43, 33, 24, 0.08);
    font-size: 16px;
    line-height: 1.3;
    color: #2b2118;
}

/* Плашка «Сейчас мы не работаем» вне рабочих часов (см. common/helpers/WorkingHours.php) */
body.chrome-redesign .closed-notice {
    max-width: 1240px;
    margin: 16px auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}

body.chrome-redesign .closed-notice__box {
    padding: 16px 24px;
    border-radius: 16px;
    background: #fdf1e0;
    color: #c0392b;
    font-size: 17px;
    line-height: 1.45;
    text-align: center;
}

@media screen and (max-width: 768px) {
    body.chrome-redesign .closed-notice {
        padding: 0 16px;
    }

    body.chrome-redesign .closed-notice__box {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.site-header a {
    color: inherit;
    text-decoration: none;
}

.site-header a:hover {
    color: #c0392b;
    text-decoration: none;
}

.site-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header .w-limiter {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-header__top {
    background: #2b2118;
    color: #f4eadc;
    font-size: 13px;
}

.site-header__top a,
.site-header__top a:hover {
    color: #f4eadc;
}

.site-header__top a:hover {
    color: #ffd7a8;
}

.site-header__top-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 36px;
}

.site-header__delivery {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
}

.site-header__info {
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header__info-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.site-header__info-list li {
    display: inline-block;
}

.site-header__info-list span {
    display: inline;
}

.site-header__info-list .submenu {
    display: none;
}

.site-header__main {
    background: #fffaf4;
    border-bottom: 1px solid #efe4d4;
}

.site-header__main-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.site-header__burger {
    display: none;
    border: 1px solid #e2430b;
    background: #fff;
    color: #e2430b;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.site-header__logo img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.site-header__logo span {
    display: flex;
    flex-direction: column;
}

.site-header__logo strong {
    font-size: 28px;
    letter-spacing: 0.04em;
    color: #c0392b;
    line-height: 1;
}

.site-header__logo em {
    font-style: normal;
    font-size: 12px;
    color: #7a6a58;
}

.site-header__phones {
    margin-left: auto;
    text-align: right;
}

.site-header__phones a {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #e2430b;
    line-height: 1.15;
    white-space: nowrap;
}

.site-header__phones > span {
    display: block;
    font-size: 12px;
    color: #7a6a58;
    margin-top: 2px;
}

body.chrome-redesign a[href^="tel"] {
    white-space: nowrap;
    position: relative;
    overflow: visible;
}

.site-header__phones a {
    color: #e2430b;
}

footer.site-footer a[href^="tel"] {
    color: #ffd7a8;
    display: inline;
}

.site-footer__contacts {
    overflow: visible;
}

body.chrome-redesign a[href^="tel"] span,
body.chrome-redesign a[href^="tel"] font,
body.chrome-redesign a[href^="tel"] small,
body.chrome-redesign a[href^="tel"] nobr {
    display: inline !important;
    position: static !important;
    background: transparent !important;
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    text-indent: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

body.chrome-redesign a[href^="tel"] [style*="absolute"],
body.chrome-redesign a[href^="tel"] [style*="fixed"] {
    display: none !important;
}

/* Cart stays #card-indicator for existing JS, but lives in the header */
body.chrome-redesign header.site-header div.card-indicator,
body.chrome-redesign header.site-header div.card-indicator.active {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    top: auto;
    height: auto;
    min-width: 0;
    line-height: 1.2;
    font-size: 14px;
    opacity: 1;
    visibility: visible;
    background: none;
    background-image: none;
    box-shadow: none;
    border-radius: 0;
    flex: 0 0 auto;
}

/* Название и сумма на фоне шапки, рядом оранжевый скруглённый квадрат с иконкой и значком количества */
body.chrome-redesign header.site-header div.card-indicator a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    color: #2b2118;
    white-space: nowrap;
}

body.chrome-redesign header.site-header div.card-indicator .card-indicator__text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

body.chrome-redesign header.site-header div.card-indicator .card-indicator__label {
    font-size: 16px;
    font-weight: 600;
    color: #2b2118;
}

body.chrome-redesign header.site-header div.card-indicator .card-indicator__sum {
    font-size: 15px;
    color: #9a928a;
}

body.chrome-redesign header.site-header div.card-indicator .card-indicator__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #ffab00;
    transition: background-color 0.2s;
}

body.chrome-redesign header.site-header div.card-indicator a:hover .card-indicator__icon {
    background: #f29d00;
}

body.chrome-redesign header.site-header div.card-indicator span.count {
    position: absolute;
    top: -6px;
    right: -6px;
    left: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #d62718;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* Мигание при добавлении товара: иконка краснеет на секунду */
body.chrome-redesign header.site-header div.card-indicator.blink,
body.chrome-redesign header.site-header div.card-indicator.blink span.price {
    background: none;
    color: inherit;
}

body.chrome-redesign header.site-header div.card-indicator.blink .card-indicator__icon {
    background: #e2430b;
}

.site-header__cats {
    background: #fff;
    border-top: 1px solid #eee7dc;
    border-bottom: 1px solid #eee7dc;
}

.site-header__cats-nav {
    padding: 6px 0 10px;
}

.site-header__cats-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
}

.site-header__cats-list > li {
    position: relative;
}

.site-header__cats-list > li > a {
    display: block;
    padding: 10px 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #2b2118;
    border-bottom: 2px solid transparent;
}

.site-header__cats-list > li.opened > a,
.site-header__cats-list > li:hover > a {
    color: #c0392b;
    border-bottom-color: #c0392b;
}

.site-header__subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #f3ebe0;
    list-style: none;
}

.site-header__subcats a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 400;
    color: #6d5e4e;
}

.site-header__subcats a:hover {
    color: #c0392b;
}

footer.site-footer {
    background: #2b2118;
    color: #f4eadc;
    font-size: 15px;
    margin-top: 0;
}

.site-footer a {
    color: #f4eadc;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffd7a8;
    text-decoration: none;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer .w-limiter {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    padding-top: 40px !important;
    padding-bottom: 32px !important;
}

.site-footer__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff;
}

.site-footer__list li {
    margin: 0 0 8px;
}

.site-footer__list span {
    display: inline;
}

.site-footer__list .submenu {
    display: none;
}

.site-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.site-footer__social a {
    border: 1px solid rgba(244, 234, 220, 0.35);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.site-footer__bottom {
    border-top: 1px solid rgba(244, 234, 220, 0.15);
    padding: 16px 0;
    font-size: 13px;
    color: #cbbba6;
}

.site-footer__bottom .copyright {
    display: block;
}

@media screen and (max-width: 980px) {
    .site-header__info {
        display: none;
    }

    .site-header__phones a {
        font-size: 16px;
    }

    .site-header__logo em {
        display: none;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 768px) {
    .site-header__burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        order: 0;
    }

    .site-header__logo {
        order: 1;
        flex: 1 1 auto;
    }

    .site-header__logo img {
        width: 44px;
        height: 44px;
    }

    .site-header__logo strong {
        font-size: 22px;
    }

    .site-header__phones {
        display: none;
    }

    .site-header__main-inner {
        gap: 10px;
        flex-wrap: wrap;
    }

    body.chrome-redesign header.site-header div.card-indicator,
    body.chrome-redesign header.site-header div.card-indicator.active {
        order: 2;
        margin-left: auto;
        width: auto;
    }

    body.chrome-redesign header.site-header div.card-indicator a {
        gap: 8px;
    }

    body.chrome-redesign header.site-header div.card-indicator .card-indicator__label {
        font-size: 14px;
    }

    body.chrome-redesign header.site-header div.card-indicator .card-indicator__sum {
        font-size: 13px;
    }

    body.chrome-redesign header.site-header div.card-indicator .card-indicator__icon {
        width: 40px;
        height: 40px;
    }

    .site-header__cats {
        display: none;
        border-top: 1px solid #efe4d4;
        max-height: 70vh;
        overflow: auto;
    }

    body.header-cats-open .site-header__cats {
        display: block;
    }

    .site-header__cats-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 8px 0 8px;
    }

    .site-header__cats-list > li > a {
        padding: 10px 0;
        border-bottom: 0;
    }

    .site-header__subcats {
        flex-direction: column;
        gap: 0;
        margin: 0 0 12px;
        padding: 0 0 0 12px;
        border-top: 0;
    }

    .site-header__top-inner {
        justify-content: space-between;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 28px !important;
    }

    footer.site-footer .site-footer__list li {
        margin: 0 0 4px;
        padding: 0;
        border: 0;
        line-height: 1.3;
    }

    footer.site-footer .site-footer__list li a {
        display: inline-block;
        padding: 2px 0;
        line-height: 1.3;
    }

    footer.site-footer .site-footer__list {
        margin: 0;
        padding: 0;
        border: 0;
    }

    footer.site-footer .site-footer__title {
        margin-bottom: 8px;
    }

    footer.site-footer nav {
        padding: 0;
        background: none;
    }
}
