/* ============================================================
   Дополнения шаблона ГОФРОМАТИК (правки под ТЗ)
   Подключается последним, после style.css и media.css
   ============================================================ */

/* Баннер страницы дилера — статичный фон (ТЗ: прописываем в коде) */
.diler_ban {
	background-image: url('../img/diler_ban_img.png');
	background-repeat: no-repeat;
	background-position: center top;
	background-size: cover;
}
@media (max-width: 768px) {
	.diler_ban {
		background-image: url('../img/diler_ban_img_mob.png');
	}
}

/* ТЗ главной: увеличить размер логотипов дилеров (блок block6) */
.block6_flex_in {
	display: flex;
	align-items: center;
	justify-content: center;
}
.block6_flex_in img {
	max-width: 100%;
	height: auto;
	transition: filter .25s ease;
	filter: grayscale(100%);
	transform: scale(1.15); /* увеличение логотипов */
}
.block6_flex_in img:hover {
	filter: grayscale(0%); /* ТЗ: при наведении логотип становится цветным */
}

/* Фон плитки готовых решений форматируется по размеру плитки
   (инлайн background-image + cover задаётся в шаблоне block4) */
.block4_flex_in {
	background-repeat: no-repeat;
}

/* Сообщение об успешной отправке формы */
.block5_flex_right_in_form .form-note {
	padding: 20px;
	border-radius: 12px;
	background: #eaf7ee;
	color: #1f7a3d;
	font-size: 16px;
	line-height: 1.45;
}

/* Подсветка незаполненных обязательных полей формы */
.block5_flex_right_in_form_in input.error,
.block5_flex_right_in_form_in .error input {
	border-color: #e23b3b !important;
	box-shadow: 0 0 0 2px rgba(226,59,59,.15);
}
.block5_flex_right_in_form .form-errors {
	margin-bottom: 14px;
	color: #e23b3b;
	font-size: 14px;
}

/* График работы под телефонами в шапке */
.bot_head_in_flex_right .work_time {
	width: 100%;
	margin-top: 4px;
	font-size: 13px;
	opacity: .75;
}

/* ============================================================
   Совместимость с админ-панелью Bitrix
   Когда показана верхняя панель управления, она не должна
   перекрываться фиксированной шапкой сайта.
   ============================================================ */
body.gofro-adminbar header {
	z-index: 990;                          /* ниже панели Bitrix (~10000) */
	top: var(--gofro-adminbar-h, 48px);    /* опустить шапку под панель */
}

/* ===== Нижнее меню каталога: ссылки наследуют вид текста ===== */
.catal_btn > p a,
.catal_btn_abs_in p a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.catal_btn > p a:hover,
.catal_btn_abs_in p a:hover {
    color: #17417B;
    text-decoration: none;
}
.catal_btn_abs_in p span {
    color: inherit;
    cursor: default;
}

/* ===== Блок логотипов дилеров: ровная сетка ===== */
.block6_flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 40px;
}
.block6_flex_in {
    height: 60px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.block6_flex_in img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .25s ease, opacity .25s ease;
}
.block6_flex_in img:hover {
    filter: grayscale(0);
    opacity: 1;
}
@media (max-width: 768px) {
    .block6_flex { gap: 20px 24px; }
    .block6_flex_in { width: 110px; height: 48px; }
}

/* ===== Выпадашка каталога с иконками ===== */
.catal_btn_abs_icons { min-width: 340px; }
.catal_ic_item { margin: 0 !important; padding: 0 !important; }
.catal_ic_item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    color: #000;
    text-decoration: none;
}
.catal_ic_item a:hover { color: #17417B; }
.catal_ic_img {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catal_ic_img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.catal_ic_txt { font-size: 15px; line-height: 1.25em; }

/* ===== Выпадашка каталога: широкая сетка (как nzeta) ===== */
.catal_btn_abs_icons {
    min-width: 720px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
}
.catal_btn_abs_icons .catal_ic_item {
    flex: 0 0 calc(50% - 12px);
    box-sizing: border-box;
}
.catal_ic_item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
}
.catal_ic_txt { font-size: 15px; line-height: 1.25em; }

/* ===== Выпадашка Решения: вертикальный список с иконками ===== */
.catal_btn_abs_solutions {
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.catal_btn_abs_solutions .catal_ic_item { flex: 0 0 auto; }

/* ===== Подчёркивание при наведении: шапка и подвал ===== */

/* Верхнее меню в шапке */
.top_head_flex_link p a:hover {
    text-decoration: underline;
}

/* Вход/регистрация */
.login_btn:hover,
.login_mob_btn:hover {
    text-decoration: underline;
}

/* Телефоны в шапке */
.bot_head_in_flex_right a:hover {
    text-decoration: underline;
}

/* Все ссылки в подвале */
footer a:hover {
    text-decoration: underline;
}

/* ===== Слайдер партнёров ===== */
.block6_slider .block6_slide { padding: 0 15px; }
.block6_slider .block6_flex_in {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.block6_slider .block6_flex_in img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .75;
    transition: filter .25s ease, opacity .25s ease;
}
.block6_slider .block6_flex_in img:hover { filter: grayscale(0); opacity: 1; }

/* ===== Слайдер партнёров: отступы и стрелки (финал) ===== */
.block6_slider {
    position: relative;
    padding: 0 70px;
    margin: 20px 0;
}
.block6_slider .block6_slide {
    padding: 18px 22px;
    box-sizing: border-box;
}
.block6_slider .block6_flex_in {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.block6_slider .block6_flex_in img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Стрелки строго по центру области логотипов */
.block6_slider .slick-list { margin: 0; }
.block6_slider .slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d5d5d5;
    z-index: 5;
    cursor: pointer;
    font-size: 0;
    padding: 0;
}
.block6_slider .slick-prev { left: 10px; }
.block6_slider .slick-next { right: 10px; }
.block6_slider .slick-arrow::before {
    content: "";
    display: block;
    width: 11px; height: 11px;
    border-top: 2px solid #17417B;
    border-right: 2px solid #17417B;
    position: absolute;
    top: 50%; left: 50%;
}
.block6_slider .slick-prev::before { transform: translate(-30%,-50%) rotate(-135deg); }
.block6_slider .slick-next::before { transform: translate(-70%,-50%) rotate(45deg); }
.block6_slider .slick-arrow.slick-disabled { opacity: .3; }

/* Фикс: одна пара стрелок, без наложения */
.block6_slider .slick-next { right: 10px; left: auto; }
.block6_slider .slick-prev { left: 10px; right: auto; }
.block6_slider .slick-arrow + .slick-arrow.slick-next { display: none; }

/* Два ряда через парные слайды (без slick rows) */
.block6_slider .block6_slide {
    display: flex !important;
    flex-direction: column;
    gap: 24px;
    padding: 18px 22px;
    box-sizing: border-box;
}
/* Штатные стрелки slick без наших переопределений */
.block6_slider .slick-arrow::before { background: none !important; }

/* ===== Иконка корзины в шапке ===== */
.top_head_flex { display: flex; align-items: center; }
.top_head_flex .cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 18px;
}
.top_head_flex .cart-link svg { display: block; }
.top_head_flex .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #fff;
    color: #17417B;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    font-weight: 600;
}

/* ===== Группировка имя + корзина справа ===== */
.top_head_flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* login_btn и cart-link прижимаем друг к другу справа */
.top_head_flex .login_btn { margin-left: auto; }
.top_head_flex .cart-link { margin-left: 16px; }

/* ===== Кнопка Выйти ===== */
.top_head_flex .logout_btn {
    margin-left: 16px;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    opacity: .85;
}
.top_head_flex .logout_btn:hover { opacity: 1; text-decoration: underline; }
