/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.kvk-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: var(--color-dark);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kvk-toast.show { transform: translateY(0); opacity: 1; }
.kvk-toast--success { background: var(--color-success); }
.kvk-toast--error   { background: #E74C3C; }
.kvk-toast__icon { flex-shrink: 0; display: flex; align-items: center; }
.kvk-toast__text { line-height: 1.3; }

/* Add to cart button loading state */
.single_add_to_cart_button.loading {
    opacity: 0.75 !important;
    cursor: wait !important;
    pointer-events: none !important;
}
.single_add_to_cart_button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kvk-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes kvk-spin { to { transform: rotate(360deg); } }

/* =============================================
   STATIC PAGE
   ============================================= */
.page-main--static { padding: 40px 0 80px; }
.static-page__title { font-size: clamp(24px, 3vw, 36px); font-weight: 800; margin-bottom: 24px; }
.static-page__content { font-size: 15px; line-height: 1.75; color: var(--color-text); }
.static-page__content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.static-page__content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 10px; }
.static-page__content ul, .static-page__content ol { padding-left: 20px; margin-bottom: 16px; }
.static-page__content li { margin-bottom: 6px; }
.static-page__content a { color: var(--color-primary); text-decoration: underline; }
.static-page__content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.static-page__content th,
.static-page__content td { padding: 10px 14px; border: 1px solid var(--color-border); font-size: 14px; }
.static-page__content th { background: var(--color-bg-light); font-weight: 700; }

/* =============================================
   МОДАЛЬНОЕ ОКНО — Оптовый прайс-лист
   ============================================= */
.kvk-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.kvk-modal.is-open {
    display: flex;
}

/* Overlay */
.kvk-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 40, 55, 0.55);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

/* Диалог */
.kvk-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 44px 44px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    animation: kvkModalIn 0.22s ease;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes kvkModalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Кнопка закрыть */
.kvk-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-bg-light, #F5F7FA);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--color-text, #2C3E50);
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}
.kvk-modal__close:hover {
    background: var(--color-border, #DEE2E6);
}

/* Заголовок */
.kvk-modal__title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    color: var(--color-text, #2C3E50);
    margin: 0 0 12px;
    padding-right: 36px;
    line-height: 1.2;
}

/* Подзаголовок */
.kvk-modal__subtitle {
    font-size: 15px;
    color: #6c757d;
    margin: 0 0 20px;
    line-height: 1.55;
}

/* Разделитель */
.kvk-modal__divider {
    border: none;
    border-top: 1px solid var(--color-border, #DEE2E6);
    margin: 0 0 20px;
}

/* Список каналов */
.kvk-modal__channels {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Карточка канала */
.kvk-modal__channel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1.5px solid var(--color-border, #DEE2E6);
    border-radius: 14px;
    text-decoration: none;
    color: var(--color-text, #2C3E50);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    background: #fff;
}
.kvk-modal__channel:hover {
    border-color: var(--color-primary, #0C89B6);
    background: rgba(12,137,182,0.04);
    box-shadow: 0 2px 12px rgba(12,137,182,0.1);
    color: var(--color-text, #2C3E50);
}

/* Иконка */
.kvk-modal__channel-icon {
    width: 44px; height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.kvk-modal__channel-icon--tg  { background: none; }
.kvk-modal__channel-icon--max { background: none; }
.kvk-modal__channel-icon--ym  { background: none; }
.kvk-modal__channel-icon--email { background: var(--color-primary, #0C89B6); }

/* Название */
.kvk-modal__channel-name { flex: 1; }

/* Стрелка */
.kvk-modal__channel-arrow {
    color: #adb5bd;
    flex-shrink: 0;
    transition: color 0.18s, transform 0.18s;
}
.kvk-modal__channel:hover .kvk-modal__channel-arrow {
    color: var(--color-primary, #0C89B6);
    transform: translateX(3px);
}

/* Мобайл */
@media (max-width: 600px) {
    .kvk-modal__dialog {
        padding: 28px 20px 32px;
        border-radius: 16px;
    }
    .kvk-modal__title { font-size: 18px; }
    .kvk-modal__channel { padding: 14px 16px; gap: 12px; }
    .kvk-modal__channel-icon { width: 38px; height: 38px; min-width: 38px; border-radius: 10px; }
}

/* =============================================
   СТРАНИЦА КОНТАКТОВ
   ============================================= */
.contacts-page { padding: 32px 0 80px; }

.contacts-page__title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 8px;
}
.contacts-page__subtitle {
    font-size: 15px;
    color: #6c757d;
    margin: 0 0 36px;
}

/* Двухколоночный layout */
.contacts-page__layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

/* Карточки контактов */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.contacts-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.18s;
}
.contacts-card:last-child { border-bottom: none; }
.contacts-card:hover { background: var(--color-bg-light); }

.contacts-card__icon {
    width: 40px; height: 40px;
    min-width: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(12,137,182,0.1);
    border-radius: 10px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contacts-card__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.contacts-card__label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contacts-card__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    font-style: normal;
    line-height: 1.4;
}
a.contacts-card__value:hover { color: var(--color-primary); }

/* Карта */
.contacts-map {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
    line-height: 0;
}
.contacts-map iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
}

/* Адаптив */
@media (max-width: 768px) {
    .contacts-page__layout {
        grid-template-columns: 1fr;
    }
    .contacts-map { order: -1; }
    .contacts-map iframe { height: 280px; }
}

/* =============================================
   СТРАНИЦА ДОСТАВКИ И ОПЛАТЫ
   ============================================= */
.delivery-page { padding: 32px 0 80px; }

.delivery-page__title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 36px;
}

/* Список блоков */
.delivery-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Один блок */
.delivery-section {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
}

/* Заголовок блока: иконка + h2 в одну строку всегда */
.delivery-section__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

/* Иконка */
.delivery-section__icon {
    width: 56px; height: 56px;
    min-width: 56px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    flex-shrink: 0;
}
.delivery-section__icon--blue {
    background: rgba(12,137,182,0.1);
    color: var(--color-primary);
}
.delivery-section__icon--yellow {
    background: rgba(230,160,40,0.12);
    color: #C88A00;
}

/* Заголовок блока */
.delivery-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

/* Список пунктов */
.delivery-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.delivery-list li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.5;
}
.delivery-list li::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 5px;
    flex-shrink: 0;
}
/* Последний li без нижнего отступа от badge */
.delivery-list:has(+ .delivery-carriers) { margin-bottom: 16px; }

/* Хайлайт текст "от 10 000 ₽" */
.delivery-highlight {
    color: var(--color-primary);
    font-weight: 700;
    white-space: nowrap;
}

/* Бейдж "бесплатно" */
.delivery-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
}
.delivery-badge--green {
    background: rgba(39,174,96,0.12);
    color: #1e8c46;
}

/* Сетка перевозчиков */
.delivery-carriers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.delivery-carrier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-bg-light);
    white-space: nowrap;
    transition: border-color 0.18s, background 0.18s;
}
.delivery-carrier:hover {
    border-color: var(--color-primary);
    background: rgba(12,137,182,0.05);
}

/* Адаптив */
@media (max-width: 600px) {
    .delivery-section { padding: 20px; }
    .delivery-section__header { gap: 12px; margin-bottom: 16px; }
    .delivery-section__icon {
        width: 44px; height: 44px; min-width: 44px;
        border-radius: 12px;
    }
    .delivery-section__title { font-size: 16px; }
}

/* =============================================
   ANCHOR SCROLL OFFSET (sticky header компенсация)
   ============================================= */
[id] {
    scroll-margin-top: 88px; /* высота шапки 68px + отступ 20px */
}

/* =============================================
   CATEGORY SEO TEXT BLOCK
   ============================================= */
.category-seo-text {
    border-top: 1px solid var(--color-border);
}
.category-seo-text__inner {
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.7;
}

/* Collapsible wrapper */
.category-seo-text__body {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.category-seo-text__body.is-collapsed {
    max-height: 96px; /* ~3 строки */
}
.category-seo-text__body.is-expanded {
    max-height: 9999px;
}
/* Градиент-fade когда свёрнуто */
.category-seo-text__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.category-seo-text__body.is-expanded .category-seo-text__fade {
    opacity: 0;
}

/* Toggle button */
.category-seo-text__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
}
.category-seo-text__toggle:hover {
    color: var(--color-primary-dark, #0a72a0);
}
.category-seo-text__toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.category-seo-text__toggle.is-expanded svg {
    transform: rotate(180deg);
}

/* Typography */
.category-seo-text__inner h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 12px;
}
.category-seo-text__inner h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin: 24px 0 10px;
}
.category-seo-text__inner p {
    margin: 0 0 14px;
    color: var(--color-text-muted, #5a6a7a);
}
.category-seo-text__inner p:last-child {
    margin-bottom: 0;
}
.category-seo-text__inner ul,
.category-seo-text__inner ol {
    margin: 0 0 14px 0;
    padding-left: 0;
    list-style: none;
    color: var(--color-text-muted, #5a6a7a);
}
.category-seo-text__inner ul li {
    padding-left: 18px;
    position: relative;
    margin-bottom: 6px;
}
.category-seo-text__inner ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}
.category-seo-text__inner ol {
    counter-reset: seo-ol;
}
.category-seo-text__inner ol li {
    padding-left: 22px;
    position: relative;
    margin-bottom: 6px;
    counter-increment: seo-ol;
}
.category-seo-text__inner ol li::before {
    content: counter(seo-ol) '.';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}
.category-seo-text__inner a {
    color: var(--color-primary);
    text-decoration: underline;
}
.category-seo-text__inner a:hover {
    text-decoration: none;
}

.home-seo-text {
    border-top: 1px solid var(--color-border);
}
