/* 04.10.2026: новая шапка ПК (#dhead, layouts/scripts/_dhead.phtml). Мобила — старая шапка + mobile.css */
#dhead { display: none; }

@media (min-width: 901px) {
	#superheader, #header, #content_wrapper > .three-features, #content_wrapper > .search_bg { display: none !important; }

	#dhead {
		display: block;
		position: relative;
		z-index: 20;
		font-family: 'Lato', Arial, sans-serif;
		color: #1d2733;
		background: #fff;
	}
	#dhead * { box-sizing: border-box; }
	#dhead a { text-decoration: none; color: inherit; }
	#dhead svg { flex: none; }
	#dhead .dh-in { max-width: 1190px; margin: 0 auto; padding: 0 22px; }
	#dhead .dh-sp { flex: 1; }

	/* верхняя полоса */
	#dhead .dh-top { background: #f4f5f7; border-bottom: 1px solid #e3e7ec; font-size: 13px; color: #66727f; }
	#dhead .dh-top .dh-in { display: flex; align-items: center; gap: 22px; height: 36px; }
	#dhead .dh-top a:hover { color: #0585b9; }
	#dhead .dh-addr { display: flex; align-items: center; gap: 6px; }
	#dhead .dh-hours { position: relative; display: flex; align-items: center; gap: 6px; cursor: default; }
	#dhead .dh-dot { width: 8px; height: 8px; border-radius: 50%; background: #2fa84f; }
	#dhead .dh-dot.off { background: #c9d2dc; }
	#dhead .dh-pop { position: absolute; top: 24px; left: 0; display: none; z-index: 30; background: #fff; border: 1px solid #e3e7ec; border-radius: 6px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(20,40,70,.14); color: #1d2733; white-space: nowrap; line-height: 1.7; }
	#dhead .dh-hours:hover .dh-pop, #dhead .dh-hours:focus .dh-pop { display: block; }
	#dhead .dh-pop b { display: inline-block; width: 58px; font-weight: 700; }
	#dhead .dh-mk { display: flex; align-items: center; gap: 12px; }
	#dhead .dh-mk img { height: 20px; width: auto; display: block; }
	#dhead .dh-login { display: flex; align-items: center; gap: 6px; color: #0585b9; font-weight: 700; }
	#dhead .dh-user { display: flex; gap: 16px; }
	#dhead .dh-user a { color: #0585b9; }

	/* логотип, поиск, телефоны */
	#dhead .dh-mid .dh-in { display: flex; align-items: center; gap: 34px; padding-top: 18px; padding-bottom: 18px; }
	#dhead .dh-logo img { display: block; width: 205px; height: auto; }
	#dhead .dh-search { flex: 1; min-width: 0; }
	#dhead .dh-sbox { display: flex; border: 2px solid #0585b9; border-radius: 8px; overflow: hidden; background: #fff; }
	#dhead .dh-sbox input { flex: 1; min-width: 0; height: 46px; border: 0; padding: 0 16px; font: inherit; font-size: 15px; color: #1d2733; background: transparent; outline: none; }
	#dhead .dh-sbox button { border: 0; margin: 0; background: #0585b9; color: #fff; padding: 0 22px; display: flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
	#dhead .dh-sbox button:hover { background: #046d98; }
	#dhead .dh-hint { margin-top: 6px; font-size: 12.5px; color: #66727f; }
	#dhead .dh-hint a { color: #0585b9; border-bottom: 1px dashed currentColor; }
	#dhead .dh-phones { text-align: right; }
	#dhead .dh-ph1 { display: block; font-size: 23px; font-weight: 700; white-space: nowrap; }
	#dhead .dh-ph1 small { font-size: 15px; font-weight: 400; color: #66727f; }
	#dhead .dh-ph2 { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 4px; font-size: 15px; font-weight: 700; white-space: nowrap; }
	#dhead .dh-ph2 img { display: block; }
	#dhead .dh-cb { display: inline-block; margin-top: 4px; font-size: 12.5px; color: #0585b9; border-bottom: 1px dashed currentColor; }

	/* меню */
	#dhead .dh-nav { border-top: 1px solid #e3e7ec; border-bottom: 1px solid #e3e7ec; }
	#dhead .dh-nav .dh-in { display: flex; align-items: center; height: 52px; }
	#dhead .dh-it { height: 100%; display: flex; align-items: center; padding: 0 13px; font-size: 15.5px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
	#dhead .dh-it:first-child { padding-left: 0; }
	#dhead .dh-it:hover, #dhead .dh-it.on { color: #0585b9; }
	#dhead .dh-it.on { border-bottom-color: #0585b9; }
	#dhead .dh-cta { display: flex; align-items: center; gap: 8px; background: #f07a1a; color: #fff; border-radius: 6px; padding: 10px 18px; font-weight: 700; font-size: 15px; }
	#dhead .dh-cta:hover { background: #d86a10; color: #fff; }

	/* преимущества */
	#dhead .dh-perks { background: #e8f3f9; }
	#dhead .dh-perks .dh-in { display: flex; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
	#dhead .dh-perk { flex: 1; display: flex; align-items: center; gap: 12px; line-height: 1.35; }
	#dhead .dh-perk svg { color: #0585b9; }
	#dhead .dh-perk b { display: block; font-size: 15px; }
	#dhead .dh-perk span { color: #66727f; font-size: 13px; }
	#dhead .dh-perk a { color: #0585b9; text-decoration: underline; }

	/* окно входа */
	#dhead .dh-modal { position: fixed; inset: 0; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000; background: rgba(18,30,45,.45); display: flex; align-items: center; justify-content: center; }
	#dhead .dh-modal[hidden] { display: none; }
	#dhead .dh-mbox { position: relative; width: 340px; background: #fff; border-radius: 10px; padding: 26px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
	#dhead .dh-mbox h4 { margin: 0 0 14px; font-size: 19px; }
	#dhead .dh-mbox label { display: block; margin-bottom: 12px; font-size: 13px; color: #66727f; }
	#dhead .dh-mbox input[type=text], #dhead .dh-mbox input[type=password] { display: block; width: 100%; height: 40px; margin-top: 4px; border: 1px solid #c9d2dc; border-radius: 6px; padding: 0 12px; font: inherit; font-size: 15px; color: #1d2733; }
	#dhead .dh-go { width: 100%; height: 42px; border: 0; border-radius: 6px; background: #0585b9; color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
	#dhead .dh-mrow { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
	#dhead .dh-mrow a { color: #0585b9; }
	#dhead .dh-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 24px; line-height: 1; color: #66727f; cursor: pointer; }
}

/* буквы в каталоге марок на главной (общие для ПК и мобилы) */
.index_layout .tab-content .border ul ul > li { position: relative; padding-left: 22px; }
.index_layout .tab-content .border .brand-letter { position: absolute; left: 0; top: 0; width: 16px; font-weight: 700; color: #f07a1a; text-decoration: none; }
@media (max-width: 900px) {
	.index_layout .tab-content .border .brand-letter { top: 50%; transform: translateY(-50%); }
	.index_layout .tab-content .border .brand-letter.rep { display: none; }
}

/* 04.10.2026: кнопка «наверх» на ПК — под новый стиль, слева внизу (справа Jivo) */
@media (min-width: 901px) {
	div#to_top { left: 24px; top: auto; bottom: 24px; width: auto; padding: 10px 18px 10px 14px; box-sizing: border-box; background: #0585b9; color: #fff; font-family: 'Lato', Arial, sans-serif; font-weight: 700; font-size: 14px; line-height: 20px; border-radius: 6px; box-shadow: 0 4px 14px rgba(20,40,70,.25); white-space: nowrap; }
	div#to_top::before { content: "\2191"; margin-right: 6px; }
	div#to_top:hover { background: #046d98; }
}

/* 04.10.2026: в поиске на ПК показываем заголовки «новые / б/у» над таблицами (в front_search.css были скрыты) */
@media (min-width: 901px) {
	.search_layout div.items_list > table > caption { display: table-caption; font-size: 17px; padding: 8px 10px; }
	.search_layout .model_layout + .model_layout { margin-top: 24px; }
}

/* 04.10.2026: каталог марок на главной шире — средняя линия правее (было 55% / 40%, колонки по 20%) */
@media (min-width: 901px) {
	.index_layout .left.tab-content div.casual { width: 63%; }
	.index_layout .left.tab-content div.truck { width: 33%; vertical-align: middle; }
	.index_layout .left.tab-content div.casual { vertical-align: middle; }
	.index_layout .left.tab-content div.casual .border > ul > li { width: 25%; }
	.index_layout .tab-content div.casual .border ul ul > li { font-size: 16px; line-height: 31px; height: auto; }
	.index_layout .left.tab-content div.casual > .border { padding-bottom: 20px; }
	/* ul был overflow:auto (вместо clearfix) — при крупном шрифте/масштабе появлялись полосы прокрутки */
	.index_layout div.casual > .border > ul { overflow: visible; display: flow-root; }
	.index_layout div.casual .border > ul > li { box-sizing: border-box; padding-right: 8px; }
}

/* 04.10.2026: главная — переключатель руля в строку с заголовком каталога (экономия места сверху) */
@media (min-width: 901px) {
	.index_layout { position: relative; }
	.index_layout > .tabs { position: absolute; top: 14px; right: calc(37% + 20px); z-index: 2; }
	.index_layout .tab-content h2.special { margin-top: 20px; margin-bottom: 14px; }
	.index_layout .left.tab-content div.truck { box-sizing: border-box; }
	.index_layout > .tab-content { clear: both; } /* плавающая «Корзина» сверху сужала строку — правый блок уезжал вниз */
	.index_layout .right.tab-content { font-size: 0; }
	.index_layout .right.tab-content > * { font-size: 14px; }
}

/* 04.10.2026: «Корзина» на ПК крупнее на 50% */
@media (min-width: 901px) {
	#title .cart_header { font-size: 150%; }
	#title .cart_header img { width: 18px; height: auto; vertical-align: middle; }
	#title .cart_header { margin-right: 22px; } /* край как у шапки (.dh-in padding 22px) */
}

/* 04.10.2026: главная — «Корзина» в строку с заголовком каталога, без отдельной полосы */
@media (min-width: 901px) {
	#content_wrapper > #title { position: relative; height: 0; z-index: 3; } /* все страницы: корзина без отдельной полосы */
	#content_wrapper > #title .cart_header { float: right; margin: 12px 22px 0 16px; position: relative; } /* обтекается текстом страницы, не перекрывает его */
	#content_wrapper:has(.model_layout) > #title .cart_header { position: absolute; right: 42px; top: 12px; float: none; margin: 0; } /* модель: float ломал колонку категорий и стрелку; своя строка 44px — там сверху справа грузится выдача */
	#content_wrapper:has(.index_layout) > #title .cart_header { position: absolute; right: 42px; top: 35px; float: none; margin: 0; }
	#content_wrapper:has(.contacts_layout) > #title, #content_wrapper:has(.request_layout) > #title, #content_wrapper:has(.model_layout):not(:has(.search_layout)) > #title { height: 44px; } /* сверху карта — корзине нужна своя строка */
	#content_wrapper:has(.index_layout) .index_layout { margin-top: 0; }
}

/* 04.10.2026: статус работы цветом — открыто зелёным, закрыто красным */
@media (min-width: 901px) {
	#dhead .dh-hours.is-open { color: #2a9a48; font-weight: 700; }
	#dhead .dh-hours.is-closed { color: #d93a2b; font-weight: 700; }
	#dhead .dh-hours.is-closed .dh-dot { background: #d93a2b; }
	#dhead .dh-hours .dh-pop { font-weight: 400; }
}
