/* =========================================
   KOTLOV Custom Styles
========================================= */

html,
body {
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0 !important;
    color: #111 !important;
}

/* Общий текст */
body,
.tf-header,
.box-nav-menu,
.nav-category-wrap,
.form_search-product,
input,
button,
a,
span,
div,
p,
li {
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0 !important;
}

/* =========================================
   Верхняя черная строка
========================================= */

.header-top,
.tf-topbar {
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* =========================================
   Главное меню
========================================= */

.box-nav-menu .item-link {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #111 !important;
    transition: 0.2s ease;
}

.box-nav-menu .item-link:hover {
    color: #c62828 !important;
}

/* =========================================
   Кнопка каталога
========================================= */

.btn-nav-drop,
.name-category {
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

/* =========================================
   Поиск
========================================= */

.form_search-product {
    border-radius: 10px !important;
}

.form_search-product input {
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #111 !important;
}

.form_search-product input::placeholder {
    color: #999 !important;
}

/* =========================================
   Иконки справа
========================================= */

.nav-icon-item {
    color: #111 !important;
}

.nav-icon-item.has-text span {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
}

/* =========================================
   Логотип
========================================= */

.logo-site img {
    max-height: 34px;
}

/* =========================================
   Header spacing
========================================= */

.header-inner {
    min-height: 88px;
}

.header-bottom {
    min-height: 90px;
}

/* =========================================
   Убираем fashion-стили шаблона
========================================= */

.cus-text {
    letter-spacing: 0 !important;
    text-transform: none !important;
}

/* =========================================
   Hover эффекты
========================================= */

a {
    transition: 0.2s ease;
}

.cat-icon{
    width:20px;
    height:20px;
    object-fit:contain;
    flex-shrink:0;
    opacity:.9;
}
.nav-category_link {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
}

.nav-category_link > span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-nav__link {
    color: #555 !important;
    font-size: 15px !important;
}

.sub-nav__link:hover {
    color: #c62828 !important;
}

.col-right .overflow-auto::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 40px; height: 100%;
    background: linear-gradient(to right, transparent, #fff);
    pointer-events: none;
}
@media (min-width: 1024px) {
    .col-right .overflow-auto::after { display: none; }
}

body {
    margin: 0;
    padding: 0;
}
/* ==============================================
   Дополнения к kotlov.css
   Добавить в конец файла assets/css/kotlov.css
   ============================================== */

/* Подкатегории под карточкой категории */
.cate-subcategories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.cate-sub-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}

.cate-sub-link:hover {
    border-color: #111;
    color: #111;
}

.cate-sub-more {
    color: #999;
    border-style: dashed;
}

.cate-count {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

/* Карточки брендов на странице каталога */
.brand-card-catalog {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
    min-height: 80px;
}

.brand-card-catalog:hover {
    border-color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.brand-name-text {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

/* Анимация кнопок алфавитного фильтра на странице брендов */
.tf-btn.btn-outline,
.tf-btn.btn-primary {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tf-btn.btn-outline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tf-btn.btn-primary {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==============================================
   Дополнения к kotlov.css
   Добавить в конец файла assets/css/kotlov.css
   ============================================== */

/* Подкатегории под карточкой категории */
.cate-subcategories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.cate-sub-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}

.cate-sub-link:hover {
    border-color: #111;
    color: #111;
}

.cate-sub-more {
    color: #999;
    border-style: dashed;
}

.cate-count {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

/* Карточки брендов на странице каталога */
.brand-card-catalog {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
    min-height: 80px;
}

.brand-card-catalog:hover {
    border-color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.brand-name-text {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

/* Автодополнение поиска */
.suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s;
    gap: 12px;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: #f8f8f8; }

.suggest-category {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}
.suggest-product .suggest-name {
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggest-product .suggest-price {
    font-size: 13px;
    white-space: nowrap;
    color: var(--color-primary, #e02020);
    font-weight: 600;
}

/* Dropdown автодополнения поиска */
.search-suggest-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}

/* Модалка поиска — разрешаем overflow чтобы дропдаун не обрезался */
.modal-search .modal-content,
.modal-search .modal-dialog {
    overflow: visible;
}

/* Мобильное меню — fieldset растягиваем на всю ширину формы */
.canvas-header .form-search-nav fieldset {
    flex: 1;
}
/* =========================================
   Mega-menu marketplace — исправления и promo-колонка
========================================= */

/*
 * Amerce по умолчанию ставит white-space: nowrap на .sub-nav-category.
 * Это ломает flex-wrap брендов и растягивает панель за экран.
 * Переопределяем размер и сброс white-space.
 */
.has-sub-nav-category .sub-nav-category {
    white-space: normal !important;
    width: 700px !important;
    max-width: min(700px, calc(100vw - 260px)) !important;
    box-sizing: border-box !important;
}

/* Flex-обёртка: ссылки слева, promo справа */
.sub-nav-category .mega-inner {
    display: flex;
    gap: 0;
    align-items: flex-start;
    width: 100%;
    overflow: hidden;
}

/* Левая зона — подкатегории */
.mega-links {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
    overflow: hidden;
}

/* Явно сбрасываем white-space для текста ссылок внутри mega-links */
.mega-links a,
.mega-links .sub-nav__title {
    white-space: normal;
}

/* Правая promo-колонка */
.mega-promo {
    width: 200px;
    min-width: 180px;
    flex-shrink: 0;
    border-left: 1px solid #f0f0f0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

/* Секция внутри promo */
.mega-promo__section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Заголовок секции */
.mega-promo__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    white-space: normal;
}

/* Бренды — чипы с переносом */
.mega-promo__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
    overflow: hidden;
}

.mega-brand-chip {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    padding: 3px 10px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, color .15s, border-color .15s;
}

.mega-brand-chip:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Баннер-картинка — ограниченная высота */
.mega-promo__banner {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
}

.mega-promo__banner img {
    width: 100%;
    height: 90px;
    max-height: 100px;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.mega-promo__banner:hover img {
    transform: scale(1.05);
}

.mega-promo__banner-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.6));
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
}

/* CTA-ссылки — каждая на отдельной строке */
.mega-promo__cta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mega-promo__cta-link {
    display: block;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: normal;
    line-height: 1.4;
    transition: background .15s, color .15s;
}

.mega-promo__cta-link:hover {
    background: #f5f5f5;
    color: #c62828;
}

/* Карточка «Монтаж» — внизу promo-колонки */
.mega-promo__install-cta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    margin-top: auto;
    flex-shrink: 0;
    white-space: normal;
}

.mega-promo__install-cta span:first-child {
    font-size: 12px;
    font-weight: 600;
    color: #c62828;
    white-space: normal;
}

.mega-promo__install-sub {
    font-size: 11px;
    color: #999;
    white-space: normal;
    line-height: 1.3;
}

.mega-promo__install-cta:hover {
    border-color: #c62828;
    background: #fff;
}

/* Уменьшаем gap сетки внутри mega-links (Amerce ставит 30px 50px) */
.mega-links .tf-grid-layout {
    gap: 16px 24px !important;
}

.tf-footer .tf-swiper .swiper-wrapper {
    height: auto;
}

#quickView .wrap-quick .image {
    align-self: start;
    aspect-ratio: 340 / 444;
}

#quickView .wrap-quick .image img {
    aspect-ratio: auto !important;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    #quickView .wrap-quick .image {
        height: 157px;
    }

    #quickView .wrap-quick .image img {
        height: 155px !important;
    }

    #quickView {
        width: min(360px, calc(100% - 32px)) !important;
    }

    #quickView .mini-quick-image {
        flex-shrink: 0;
    }

    #quickView .wrap-canvas {
        min-height: 0;
    }

    #quickView .canvas-header,
    #quickView .canvas-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    #quickView .canvas-header .title-pop {
        font-size: 18px;
        line-height: 1.3;
    }

    #quickView .product-infor-name {
        font-size: 18px;
        line-height: 1.25;
        margin-bottom: 8px !important;
    }

    #quickView .product-infor-price h4 {
        font-size: 18px;
        line-height: 1.3;
    }

    #quickView .product-infor-desc {
        font-size: 13px;
        line-height: 1.45;
    }

    #quickView .tf-product-quick_view {
        gap: 16px;
    }

    #quickView .tf-btn.type-xl {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

.badge-label-mobile {
    display: none;
}

@media (max-width: 575px) {
    #gridLayout {
        gap: 16px 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #gridLayout .product-style_stroke {
        min-width: 0;
        gap: 10px;
        padding: 8px;
        border-radius: 12px;
    }

    #gridLayout .card-product_wrapper.square {
        aspect-ratio: 1;
    }

    #gridLayout .product-action_list {
        top: auto;
        right: 46px;
        bottom: 6px;
        flex-direction: row;
        gap: 4px;
    }

    #gridLayout .product-action_list .wishlist {
        display: none;
    }

    #gridLayout .product-action_list .compare {
        display: block !important;
        order: 2;
    }

    #gridLayout .product-action_list > li:last-child {
        order: 1;
    }

    #gridLayout .product-action_list .box-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    #gridLayout .product-badge_list {
        top: 6px;
        left: 6px;
    }

    #gridLayout .product-badge_item {
        min-width: 34px;
        padding: 3px 7px;
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
    }

    #gridLayout .badge-label-full {
        display: none;
    }

    #gridLayout .badge-label-mobile {
        display: inline;
    }

    #gridLayout .product-action_bot {
        right: 6px;
        bottom: 6px;
        left: auto;
    }

    #gridLayout .product-action_bot .btn-add-to-cart {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        flex: 0 0 36px;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #gridLayout .product-action_bot .btn-add-to-cart .icon {
        font-size: 17px;
    }

    #gridLayout .add-to-cart-label {
        display: none;
    }

    #gridLayout .card-product_info {
        gap: 4px;
    }

    #gridLayout .card-product_info .name-product {
        min-width: 0;
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 13px;
        line-height: 1.35;
    }

    #gridLayout .card-product_info .price-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 6px;
    }

    #gridLayout .card-product_info .price-new,
    #gridLayout .card-product_info .price-old {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* ── Mini-cart mobile: карточка товара ──────────────────── */
@media (max-width: 767px) {
    /* 1. Карточка: flex-wrap — price уходит на вторую строку */
    .popup-shopping-cart .tf-mini-cart-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    /* 2. Фото: фиксированный квадрат, не растягивается */
    .popup-shopping-cart .tf-mini-cart-image {
        width: 72px;
        max-width: 72px;
        flex-shrink: 0;
    }
    .popup-shopping-cart .tf-mini-cart-image img {
        width: 72px !important;
        height: 72px !important;
        aspect-ratio: 1 !important;
        object-fit: cover;
    }

    /* 3. Info: занимает остаток строки, текст не выходит за край */
    .popup-shopping-cart .tf-mini-cart-info {
        flex: 1;
        min-width: 0;
    }

    /* 4. Price: убираем жёсткий padding-left, не выходит за край */
    .popup-shopping-cart .tf-mini-cart-price {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        padding-left: 0;
    }
    .popup-shopping-cart .tf-mini-cart-price .mini-cart-remove {
        order: 2;
        margin-left: auto;
    }

    /* 5. Пустой блок: убираем абсолютную прокрутку на мобильном */
    .popup-shopping-cart .tf-mini-cart-main {
        flex: 0 0 auto;
    }
    .popup-shopping-cart .tf-mini-cart-sroll {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        right: auto;
        overflow: visible;
    }
    .popup-shopping-cart .tf-mini-cart-items {
        height: auto;
    }

    /* 6. Купон/Заметка/Доставка: меньше padding и иконка */
    .popup-shopping-cart .tf-mini-cart-tool-btn {
        padding: 8px 6px;
        font-size: 12px;
    }
    .popup-shopping-cart .tf-mini-cart-tool-btn .icon {
        font-size: 16px;
    }

    /* 7. Корзина / Оформить заказ: вертикально, не обрезается */
    .popup-shopping-cart .tf-mini-cart-view-checkout {
        flex-direction: column;
        gap: 8px;
    }
}

/* ── Плитки подкатегорий (category-v05.subcat-tile) ─────────────────────── */
a.category-v05.subcat-tile {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    gap: 12px;
    display: flex;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.category-v05.subcat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    border-color: var(--primary);
    text-decoration: none;
    opacity: 1;
}
.subcat-tile .cate-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--text-2);
    transition: color 0.15s ease;
}
a.category-v05.subcat-tile:hover .cate-icon {
    color: var(--primary);
}
.subcat-tile__text {
    min-width: 0; /* нужно для ellipsis внутри flex */
}
.subcat-tile .cate_name {
    color: var(--text);
    margin-bottom: 1px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    font-size: 13px;
}
.subcat-tile .cate_quantity {
    color: var(--text-2);
    font-size: 11px;
}
/* На мобиле сохраняем горизонтальный layout, не вертикальный */
@media (max-width: 1199px) {
    a.category-v05.subcat-tile {
        flex-direction: row !important;
        text-align: left !important;
        justify-content: flex-start !important;
        padding: 8px 10px;
    }
    .subcat-tile .cate-icon { font-size: 18px; }
}

/* Прижимаем пункты колонки мегаменю к верху — иначе grid растягивает пробел между ссылками */
.sub-nav-category_list {
    align-content: start;
}

/* =========================================
   Мобильное меню — каталог категорий
========================================= */

.mb-categories {
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line, #e9e9e9);
    margin-bottom: 4px;
}

.mb-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #aaa;
}

.mb-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mb-cat-item {
    border-bottom: 1px solid #f5f5f5;
}

.mb-cat-item:last-child {
    border-bottom: none;
}

.mb-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mb-cat-link {
    display: block;
    flex: 1;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
}

.mb-cat-link:hover {
    color: #c62828;
}

.mb-cat-toggle {
    background: none;
    border: none;
    padding: 11px 16px 11px 4px;
    cursor: pointer;
    color: #999;
    transition: transform .2s;
    flex-shrink: 0;
}

.mb-cat-item.open .mb-cat-toggle {
    transform: rotate(180deg);
    color: #c62828;
}

.mb-cat-item.open .mb-cat-link {
    color: #c62828;
}

.mb-cat-sub {
    list-style: none;
    padding: 0 0 6px 0;
    margin: 0;
    display: none;
    background: #fafafa;
}

.mb-cat-item.open .mb-cat-sub {
    display: block;
}

.mb-cat-sub li a {
    display: block;
    padding: 8px 20px 8px 32px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.mb-cat-sub li:last-child a {
    border-bottom: none;
}

.mb-cat-sub li a:hover {
    color: #c62828;
    background: #fff;
}
