/*
Theme Name: Kalachi Bakery
Author: Alex
Version: 1.0
*/

/* --- 1. Подключение шрифта Hikasami --- */

@font-face {
    font-family: 'Hikasami';
    src: url('assets/fonts/Hikasami-SemiBold.woff2') format('woff2'),
 /*        url('assets/fonts/Hikasami-SemiBold.woff') format('woff');  */
    font-weight: 600; /* SemiBold */
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #F9F7F2;
    --color-bg-card: #FFFFFF;
    --color-accent: #D4A373;
    --color-accent-light: #F4C9A8;
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-border: #E5E5E5;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 50px;
    --container-width: 1392px;
    --section-gap: 80px;
    --font-main: 'Hikasami', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Hikasami', 'Playfair Display', Georgia, serif;
}

/* Сброс */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    /* background-color: var(--color-bg); */
    background: #fff;
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Контейнер 1392px */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px; /* Отступы по краям для мобильных */
    width: 100%;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px; /* Скругленные кнопки как на макете */
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    /* background-color: var(--color-accent); */
    background: #fff;
    color: var(--color-white);
    padding: 11px 106px;
    border-radius: 24px;
}

.btn-grey {
    background-color: var(--color-grey-btn);
    color: var(--color-text);
}  


/* --- HEADER --- */
.site-header {
    padding: 25px 0;
    background: transparent;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Вертикальное выравнивание по центру */
}

/* Логотип */
.header-logo img {
    height: auto;
    max-width: 140px; /* Подбери размер под свой SVG */
    display: block;
}

/* Правый блок (содержит верхнюю строку и меню) */
.header-right-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Всё прижимаем к правому краю */
    gap: 16px; /* Отступ между телефоном/корзиной и меню */
}

/* Верхняя строка: Телефон, ТГ, Корзина */
.header-top-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 20px;
    color: var(--color-text);
    color: #0C0D0D;
    text-decoration: none;
    white-space: nowrap;
}

/* Кнопка Telegram */
.header-tg-btn {
    width: 54px;
    height: 54px;
    background-color: #969696; /* Серый цвет иконки */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.3s;
}
.header-tg-btn:hover {
    background-color: var(--color-accent);
}

/* Кнопка Корзины */
.header-cart-btn {
    background-color: #969696; /* Темно-серый фон как на макете */
    color: #fff;
    padding: 16px 50px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.3s;
}

.header-cart-btn:hover {
    background-color: #333;
}

.cart-sum {
    letter-spacing: 0.5px;
}

/* Навигация (Нижняя строка) */
.main-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 32px; /* Расстояние между пунктами меню */
}

.main-menu li a {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 20px;
    color: #0C0D0D8A; /* Серый цвет текста меню */
    text-decoration: none;
    text-transform: lowercase; /* "меню", "о нас" - как на макете */
    transition: color 0.3s;
}

.main-menu li a:hover {
    color: var(--color-text);
}

/* Адаптив для шапки (Мобильная версия) */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    .header-right-block {
        align-items: center;
        width: 100%;
    }
    .header-top-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-menu {
        gap: 16px;
        font-size: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* --- FOOTER --- */
.site-footer {
    /* background-color: #F2F1EB; */
    padding: 60px 0 40px;
    margin-top: 80px;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
}

/* Фоновый паттерн (замени путь на свой файл) */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('<?php echo get_template_directory_uri(); ?>/assets/img/footer-fon.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 60px;
    align-items: start;
    /* margin-bottom: 40px; */
}

/* Левая колонка - Лого */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    max-width: 205px;
    height: auto;
}

.footer-copyright {
    font-size: 16px;
    color: #0C0D0D8A;
    margin: 0;
    margin-top: 45px;
}

/* Средние колонки - Меню */
.footer-menus {
    display: flex;
    gap: 100px;
    justify-content: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links li a {
    font-size: 15px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
    opacity: 0.7;
}

.footer-links li a:hover {
    opacity: 1;
    color: var(--color-accent);
}

/* Правая колонка - Контакты */
.footer-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    text-align: right;
}

.footer-phone {
    font-size: 32px;
    font-weight: 600;
    /* color: var(--color-text); */
    color: #575757;
    text-decoration: none;
}

.footer-email {
    font-size: 32px;
    /* color: var(--color-text); */
    font-weight: 600;
    color: #575757;
    text-decoration: none;
    /* opacity: 0.8; */
}

.footer-email:hover {
    opacity: 1;
}

/* Соцсети */
.footer-socials {
    display: flex;
    gap: 16px;
    margin: 8px 0;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #848484;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.social-icon:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Юридические ссылки */
.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 36px;
}

.footer-legal a {
    font-size: 16px;
    color: #0C0D0D8A;
    text-decoration: none;
    text-align: right;
    z-index: 2;
}

.footer-legal a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* График работы */
.footer-schedule {
    text-align: center;
    font-size: 16px;
    color: #0C0D0D8A;
    position: relative;
    /* padding-top: 20px; */
    /* border-top: 1px solid #D9D8D2; */
    bottom: 20px;
}

/* Адаптив */
@media (max-width: 1024px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .footer-menus {
        gap: 40px;
    }
    .footer-contacts {
        grid-column: 1 / -1;
        align-items: center;
        text-align: center;
    }
    .footer-legal {
        align-items: center;
    }
    .footer-legal a {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-brand {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-menus {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .footer-links {
        align-items: center;
    }
    .footer-contacts {
        align-items: center;
        text-align: center;
    }
    .footer-schedule {
        font-size: 13px;
    }
}



/* Сетка постов */
.posts-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Карточка поста */
.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card-thumb img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-card-content {
    padding: 24px;
}

.post-card-title {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-card-title a:hover {
    color: var(--color-accent);
}

.post-card-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.post-card-summary {
    margin-bottom: 20px;
    font-size: 15px;
    color: #555;
}

/* Страница "Ничего не найдено" */
.no-results {
    text-align: center;
    padding: 80px 0;
}

.no-results .page-title {
    margin-bottom: 20px;
}

.no-results-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Адаптив для блога */
@media (max-width: 900px) {
    .posts-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .posts-list {
        grid-template-columns: 1fr;
    }
}


/* --- Hero Section --- */
.hero-section {
    /* background: #FFDBA9; */ /* Светло-персиковый фон */
    padding: 40px 0 60px;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    background-image: url(/wp-content/themes/kalachi-bak/assets/img/slide_back.png);
    background-color: #FFDBA9;
    padding: 50px;
    border-radius: 24px;
}
.hero-label {
    display: block;
    font-size: 40px;
    font-weight: 500;
    /* color: var(--color-text-muted); */
    color: #0C0D0DCC;
    margin-bottom: 10px;
}
.hero-title {
    font-family: var(--font-main);
    /* font-size: clamp(48px, 5vw, 80px); */
    font-size: 128px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero-subtitle {
    font-size: 20px;
    color: var(--color-text);
    margin-bottom: 30px;
    max-width: 300px;
}
.hero-image img {
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
    position: relative;
    right: -50px;
    bottom: -50px;
}

/* --- About Section --- */
.about-grid {
    /* display: grid; */
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
    background: url(/wp-content/themes/kalachi-bak/assets/img/frame.png);
    /* padding-bottom: 200px; */
}
.section-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0C0D0D;
}
.about-text p {
    font-size: 24px;
    line-height: 100%;
    color: var(--color-text-muted);
    color: #0C0D0D8A;
    font-weight: 600;
}
.about-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 16px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.gallery-item.item-1 { grid-row: 1 / 3; } /* Большая картинка слева */

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--color-bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.feature-badge {
    display: block;
    text-align: center;
    background: #EBEBEB;
    padding: 8px 16px;
    /* border-radius: var(--radius-sm); */
    /* color: #0C0D0D8A; */
    border-radius: 24px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: lowercase;
}
.feature-text {
    font-size: 20px;
    /* color: var(--color-text-muted); */
    color: #0C0D0D8A;
    line-height: 1.5;
    font-weight: 400;
}

/* --- Loyalty Section --- */
.loyalty-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    /* align-items: center; */
}
.btn-accent-light {
    background: var(--color-accent-light);
    color: var(--color-text);
    margin-top: 20px;
}
.loyalty-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.loyalty-card {
    background: #F4F4F4;
    padding: 30px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    /* overflow: hidden; */
    background-image: url(/wp-content/themes/kalachi-bak/assets/img/footer-fon.png);
    background-size: cover;
    width: 330px;
    height: 330px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
/* Декоративный паттерн (опционально) */
.loyalty-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('assets/img/pattern-light.svg');
    opacity: 0.1;
    pointer-events: none;
}
.loyalty-number {
    display: block;
    font-size: 128px;
    font-weight: 500;
    /* margin-bottom: 8px; */
}
.loyalty-desc {
    font-size: 20px;
    /* color: var(--color-text-muted); */
    color: #0C0D0D8A;
    line-height: 1.4;
    font-weight: 600;
    position: absolute;
    bottom: -65px;
    height: 60px;
}

/* --- Products Section --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.carousel-nav { display: flex; gap: 10px; }
.nav-btn {
    width: 40px; height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: 0.2s;
}
.nav-btn:hover { background: var(--color-accent-light); border-color: transparent; }

.products-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: transform 0.3s;
}
.product-card:hover { transform: translateY(-5px); }
.product-image {
    background: #F8F8F8;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; min-height: 44px; }
.product-weight { font-size: 14px; color: var(--color-text-muted); display: block; margin-bottom: 4px; }
.product-price { font-size: 20px; font-weight: 700; display: block; margin-bottom: 16px; }
.product-card .button {
    width: 100%;
    background: var(--color-grey-btn);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

/* --- НАШИ ЗАВЕДЕНИЯ --- */
.locations-wrapper {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

/* Карточки слева */
.location-card {
    padding: 28px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 330px;
    height: 233px;
}

.location-card.active {
    background-color: #F5D5C8; /* Розовый как на макете */
    transform: scale(1.02);
    /* box-shadow: 0 8px 20px rgba(0,0,0,0.08); */
}

.location-card:not(.active) {
    background-color: #F0F0F0;
    opacity: 0.75;
}

.location-card:not(.active):hover {
    opacity: 1;
}

.location-name {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    line-height: 1.2;
}

.location-address {
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 500;
    /* opacity: 0.85; */
}

.location-phone {
    font-size: 20px;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0,0,0,0.3);
    width: fit-content;
    margin-top: 4px;
    font-weight: 500;
}

.location-phone:hover {
    border-bottom-style: solid;
}

/* Правая часть с контентом */
.locations-right {
    position: relative;
    /* min-height: 650px; */ /* Фиксируем высоту, чтобы не прыгало */
}

.location-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    display: flex;
    /* flex-direction: column; */
    gap: 20px;
}

.location-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.map-container, .reviews-container {
    border-radius: 24px;
    overflow: hidden;
    background: #EAEAEA;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    width: 50%;
}

.map-container iframe,
.reviews-container iframe {
    display: block;
    width: 100%;
    border: none;
}

/* Адаптив */
@media (max-width: 960px) {
    .locations-wrapper {
        grid-template-columns: 1fr;
    }
    .locations-right {
        min-height: auto;
        order: -1; /* Карта уходит наверх на мобильных */
    }
    .location-content {
        position: relative;
    }
    .map-container iframe { height: 300px; }
    .reviews-container iframe { height: 180px; }
}


.about-text {
    padding-bottom: 670px;
}  

.loyalty-info p {
    font-size: 23px;
    line-height: 100%;
    color: var(--color-text-muted);
    color: #0C0D0D8A;
    font-weight: 600;
    line-height: 1.5;
} 



section.loyalty-section.section {
    margin: 140px 0;
}


footer.site-footer .container {
    background-image: url(/wp-content/themes/kalachi-bak/assets/img/footer-fon.png);
    background-color: #EBEBEB;
    padding: 50px;
    border-radius: 24px 24px 0 0;
} 


.footer-menus li a {
    font-size: 24px;
    color: #0C0D0D8A;
    font-weight: 500;
    line-height: 1.7;
} 


p.locations-subtitle {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #0C0D0D8A;
}


.reviews-container {
    height: 600px;
    overflow-y: scroll;
}