.header{
	background: #C51718;
	padding:15px 0;
	position: sticky;
	top: 0;
	z-index: 900;
	transition: padding .2s ease;
}
.header__container{
	display: grid;
	grid-template-columns: auto minmax(260px, 1fr) auto auto;
	align-items: center;
	gap:24px;
	position: relative;
}
.header__filter{
	display: none;
}
.header__logo{
	display: flex;
	align-items: center;
	gap:8px;
	grid-column: 1;
	min-width: max-content;
	white-space: nowrap;
}
.header__logo > a:first-child{
	flex: 0 0 50px;
}

.header__logo-img{
	width: 50px;
	height: 50px;
	min-width: 50px;
	flex: 0 0 50px;
	display: block;
	vertical-align: middle;
	transition: width .2s ease, height .2s ease, min-width .2s ease, flex-basis .2s ease;
}

.header__logo-text{
	color:#FFFFFF;
	font-size: 24px;
	font-weight:700;
	line-height: 1;
	flex: 0 0 auto;
	white-space: nowrap;
}
.header__text-p{
	color:#FFFFFF;
	font-size: 34.5px;
	font-weight:600;
	white-space: nowrap;
}
.header__text {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	pointer-events: none;
}
.header__popular {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	margin-right: 28px;
	transform: translateX(85px);
	grid-column: 3;
	min-width: 0;
	white-space: nowrap;
}
.header__popular-link {
	color: #FFFFFF;
	font-size: 14px;
	font-weight: 700;
	padding: 8px 11px;
	background: #361B1B;
	border: 1px solid rgba(255, 255, 255, .38);
	border-radius: 6px;
	transition: color .2s, background-color .2s, border-color .2s;
}
.header__popular-link:hover {
	color: #361B1B;
	background: #FDC540;
	border-color: #FDC540;
	text-decoration: none;
}
.header--scrolled {
	padding: 9px 0;
}
.header--scrolled .header__logo > a:first-child {
	flex-basis: 44px;
}
.header--scrolled .header__logo-img {
	width: 44px;
	height: 44px;
	min-width: 44px;
	flex-basis: 44px;
}
.header__location{
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap:5px;
	width: 230px;
	max-width: 230px;
	min-width: 0;
	box-sizing: border-box;
	grid-column: 4;
}
.header__location-title a{
	color: #171717;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}
.header__location-btn{
	display: flex;
	align-items: center;
	gap:5px;
	max-width: 100%;
	min-width: 0;
}
.header__location-link{
	color:#FFFFFF;
	font-size: 16px;
	font-weight: 600;
	transition: all .3s;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.header__location-link:hover{
	color:#FDC540;
}





.header__location {
  position: relative;
  cursor: pointer;
}
.header__location-head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid #eeeeee;
}

.header__location-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 280px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(28, 10, 10, 0.22);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 999;
}

.header__location-dropdown::before {
	content: "";
	position: absolute;
	top: -7px;
	right: 22px;
	width: 12px;
	height: 12px;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	transform: rotate(45deg);
}

.header__location.open .header__location-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.header__location-citys {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: min(420px, calc(100vh - 150px));
  overflow-y: auto;
}
.header__location-citys a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.header__location-citys a:hover {
  color: #C51718;
  background: #fff1f1;
  text-decoration: none;
  transform: translateX(2px);
}
.header__location-citys a.is-current {
  color: #fff;
  background: #C51718;
}
.header__location-city-arrow {
  color: #C51718;
  font-size: 16px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.header__location-citys a:hover .header__location-city-arrow {
  opacity: 1;
  transform: translateX(0);
}
.header__location-citys a.is-current .header__location-city-arrow {
  color: #fff;
  opacity: 1;
  transform: translateX(0);
}
.header__location-close {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #f5f5f5;
	transition: background-color 0.18s ease, transform 0.18s ease;
}
.header__location-close:hover {
	background: #ffe5e5;
	transform: rotate(90deg);
}
.header__location-close svg {
	width: 20px;
	height: 20px;
}



@media screen and (max-width: 1200px) {
	.header__container {
		grid-template-columns: auto minmax(180px, 1fr) auto auto;
		gap: 24px;
	}
	.header__text-p {
		font-size: 34.5px;
	}
	.header__location {
		width: 220px;
		max-width: 220px;
	}
	.header__text-optional {
		display: inline;
	}
}
@media screen and (max-width: 1400px) {
	.header__container {
		grid-template-columns: auto minmax(0, 1fr) auto;
		row-gap: 10px;
	}
	.header__text {
		position: static;
		display: block;
		grid-column: 2;
		grid-row: 1;
		justify-self: start;
		margin-left: 8px;
		transform: none;
	}
	.header__popular {
		display: flex;
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: stretch;
		width: 100%;
		margin-right: 0;
		transform: none;
	}
	.header__popular-link {
		flex: 1 1 0;
		text-align: center;
	}
	.header__location {
		grid-column: 3;
		grid-row: 1;
		width: auto;
		max-width: none;
	}
}
@media screen and (max-width: 992px) {
	.header__container {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}
	.header__text {
		display: block;
	}
	.header__popular {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: center;
		width: 100%;
		margin-right: 0;
		transform: none;
	}
	.header__location {
		grid-column: 3;
		width: auto;
		max-width: none;
	}
 	.header__location-dropdown{
 		width: 280px;
 	}
}
@media screen and (max-width: 768px) {
 	.header__text{
 		display: none;
 	}
 	.header__filter{
 		display: block;
 	}
 	.header__container{
 		grid-template-columns: 30px minmax(0, 1fr) auto;
 		row-gap: 12px;
 	}
	.header__filter {
		grid-column: 1;
		grid-row: 1;
	}
 	.header__logo{
		grid-column: 2;
		grid-row: 1;
 		margin:0 auto;
		min-width: 0;
 	}
	.header__logo > a:first-child,
	.header__logo-img {
		display: none;
	}
	.header__logo-text {
		font-size: 19px;
	}
	.header__location {
		grid-column: 3;
		grid-row: 1;
	}
	.header__popular {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-content: flex-start;
		width: 100%;
		overflow-x: auto;
		padding-bottom: 2px;
		scrollbar-width: thin;
	}
}
@media screen and (max-width: 576px) {
	.header__location-dropdown {
		right: -8px;
		padding: 14px;
	}
}