






/* Заголовок */
header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: #333;
	color: #fff;
	padding: 15px 20px;
	text-align: center;
}

.header-secondary {
	position: fixed;
	top: 70px; /* Высота первого заголовка */
	left: 0;
	width: 100%;
	background-color: #555;
	color: #fff;
	padding: 10px 20px;
	text-align: center;
	z-index: 899;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Обновляем отступ для основного контента */
main {
	margin-top: 110px; /* Отступ под заголовок */
}

/* Плашка справа */
.header-panel {
	position: fixed;
	top: 82px; /* Высота первого заголовка */
	right: 0;
	width: 200px; 
	height: 150px; 
	background-color: #444;
	border: 1px solid #ccc;
	color: #4D6BFE;
	padding: 10px;
	box-shadow: -2px  4px 5px rgba(0,0,0,0.2);
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
//	overflow: hidden;
	overflow-y: auto;
	z-index: 998;
}

.header-panel-content {
	padding: 10px;
}

/* Стили для основного заголовка */
.header-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
	background-color: var(--header-bg);
	color: var(--header-text);
    padding: 10px 0;
    text-align: center;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-segment {
    display: flex;
    align-items: center;
    padding: 0 1px;
}

/* Стили для подстраиваемых сегментов */
.header-left-space,
.header-right-space,
.header-search {
    flex: 1 1 auto;
    min-width: 20px;
}

/* Стили для фиксированных сегментов */
.header-logo {
    width: 50px;
    flex: 0 0 50px;
}

.header-title {
    width: 200px;
    flex: 0 0 200px;
    justify-content: flex-start;
}

.header-title h1 {
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
}

.header-catalog,
.header-login {
    width: 100px;
    flex: 0 0 100px;
}

/* Общие стили для иконок с подписями */
.header-compare,
.header-favorites,
.header-orders,
.header-check,
.header-cart,
.header-login-icon {
    width: 70px;
    flex: 0 0 70px;
}

/* Стили для кнопок */
.header-btn {
    background-color: var(--btn-primary, #4D6BFE);
    color: white;
    border: none;
    padding: 12px 12px;
    border-radius: 0px;	 /* Закругляем углы кнопки 4px */
    cursor: pointer;
    font-size: 16.8px;
    white-space: nowrap;
    height: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background-color: var(--btn-primary-hover, #3a56d4);
}

/* Стили для контейнера иконки с подписью */
.header-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    width: 100%;
    padding: 5px 0;
}

/* Стили для иконок */
.header-icon {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1;
}

.header-icon-container:hover {
    color: var(--btn-primary);
}

/* Стили для подписи под иконкой */
.icon-label {
    font-size: 12px;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

/* Стили для поля поиска */
.search-container {
    display: flex;
    width: 100%;
    height: 40px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 16.8px;
    height: 100%;
    box-sizing: border-box;
}

.search-btn {
    padding: 0 15px;
    background-color: #4D6BFE;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16.8px;
    height: 100%;
}

.search-btn:hover {
    background-color: #3a56d4;
}

/* Логотип */
.logo-img {
    height: auto;
    max-height: 40px;
    object-fit: contain;
}

/* body */
.body-img {
    width: 100%; 
    height: auto;
    object-fit: contain;
}



/* === ДОБАВЛЕНО: header-nav с прокруткой и постоянными стрелками === */
/* Контейнер меню с контролами */
.header-nav-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	position: relative;
}

/* Кнопки прокрутки */
.header-scroll-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	z-index: 10;
	opacity: 0; /* Сначала скрыты */
	transition: opacity 0.2s ease;
	touch-action: manipulation;
}

.header-scroll-btn-left {
	left: 10px;
}

.header-scroll-btn-right {
	right: 10px;
}

/* Активные кнопки (показываются, если есть прокрутка) */
.header-nav-controls.has-scroll .header-scroll-btn {
	opacity: 1;
}

/* Меню с горизонтальной прокруткой */
.header-nav {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	scroll-behavior: smooth;
	padding: 0 40px; /* Отступы под стрелки — не влияет на внешний паддинг хэдера */
	gap: 20px; /* Как у тебя в макете — не меняем */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
	cursor: grab;
}

.header-nav::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.header-nav.dragging {
	cursor: grabbing;
}

/* Пункты меню — без изменений в стиле */
.header-nav a {
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}

.header-nav a:hover {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 4px;
}

.dragging-cursor {
    cursor: grabbing !important;
}

.dragging-cursor * {
    cursor: grabbing !important;
}

.header-nav.dragging {
    cursor: grabbing;
}

/* === КОНЕЦ ДОБАВЛЕНИЯ === */