/* Выбор города. Цвета — токены витрины (--link, --black, --grey). */
.cs-city {
	display: block;
	position: relative;
	margin: 4px 0 6px;
	max-width: 100%;
	z-index: 40;
}
.cs-city-pin,
button.cs-city-pin {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	height: auto !important;
	min-height: 0 !important;
	line-height: 18px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	color: var(--link) !important;
	font: inherit;
	font-weight: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	overflow: visible !important;
}
.cs-city-pin:hover .cs-city-name {
	text-decoration: underline;
}
.cs-city-pin-ico {
	display: inline-block;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/></svg>") center / contain no-repeat;
}
.cs-city-name {
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cs-city-chevron {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: .7;
	flex: 0 0 auto;
}
[data-cs-city-plaque][hidden],
[data-cs-city-suggest][hidden] {
	display: none !important;
}
[data-cs-city-overlay][hidden],
[data-cs-city-panel][hidden],
[data-cs-city-sheet][hidden] {
	display: none !important;
}
html.cs-city-open,
html.cs-city-open body {
	overflow: hidden !important;
	overscroll-behavior: none;
}
.cs-city-overlay {
	position: fixed;
	inset: 0;
	background: rgba(38, 46, 56, .28);
	z-index: 100100;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .35s ease-out, visibility .35s ease-out;
}
.cs-city-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.cs-city-overlay.is-plaque {
	background: transparent;
}
.cs-city-plaque {
	position: fixed;
	z-index: 100110;
	width: 300px;
	padding: 16px 16px 14px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
	border-radius: 8px;
	text-align: left;
	color: var(--black, #333);
	box-sizing: border-box;
}
.cs-city-plaque-handle {
	display: none;
}
.cs-city-plaque-label {
	font-size: 11px;
	color: var(--grey, #888);
	margin-bottom: 4px;
}
.cs-city-plaque-city {
	font-size: 22px;
	font-weight: bold;
	margin-bottom: 12px;
	line-height: 1.2;
}
.cs-city-plaque-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* Сброс глобальных button/.bttn витрины (height:30px, фон, text-shadow). */
button.cs-city-yes,
button.cs-city-no,
button.cs-city-submit,
button.cs-city-close {
	appearance: none !important;
	-webkit-appearance: none !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.25 !important;
	text-shadow: none !important;
	background-image: none !important;
	box-shadow: none !important;
	overflow: visible !important;
	text-indent: 0 !important;
	font: inherit;
	font-weight: bold !important;
	cursor: pointer;
	box-sizing: border-box;
}
button.cs-city-yes,
button.cs-city-submit {
	background: var(--link) !important;
	background-color: var(--link) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 4px;
}
button.cs-city-yes:hover,
button.cs-city-yes:active,
button.cs-city-submit:hover,
button.cs-city-submit:active {
	background: var(--link) !important;
	background-color: var(--link) !important;
	color: #fff !important;
	box-shadow: none !important;
	text-decoration: none !important;
}
button.cs-city-yes {
	flex: 0 0 auto;
	width: auto !important;
	min-width: 148px;
	padding: 10px 20px !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}
button.cs-city-no {
	flex: 0 0 auto;
	width: auto !important;
	padding: 10px 8px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--link) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	display: inline-flex !important;
	align-items: center;
}
button.cs-city-no:hover,
button.cs-city-no:active {
	background: transparent !important;
	background-color: transparent !important;
	color: var(--link) !important;
	text-decoration: underline !important;
	box-shadow: none !important;
}
button.cs-city-submit {
	display: flex !important;
	width: 100%;
	min-height: 44px;
	margin-top: 16px;
	padding: 12px 16px !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	align-items: center;
	justify-content: center;
}
.cs-city-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: min(420px, 100%);
	height: 100%;
	background: #fff;
	z-index: 100120;
	padding: 28px 32px 24px;
	box-shadow: -8px 0 28px rgba(0, 0, 0, .08);
	box-sizing: border-box;
	color: var(--black, #333);
	display: flex;
	flex-direction: column;
	overflow: auto;
	transform: translateX(110%);
	visibility: hidden;
	pointer-events: none;
	transition: transform .35s ease-out, visibility .35s ease-out;
}
.cs-city-panel.is-open {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}
button.cs-city-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px !important;
	height: 32px !important;
	min-height: 32px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	color: inherit !important;
}
.cs-city-close::before,
.cs-city-close::after {
	content: '';
	position: absolute;
	left: 8px;
	right: 8px;
	top: 15px;
	height: 1px;
	background: var(--black, #333);
}
.cs-city-close::before { transform: rotate(45deg); }
.cs-city-close::after { transform: rotate(-45deg); }
.cs-city-panel-title {
	font-size: 28px;
	font-weight: bold;
	margin: 8px 0 24px;
	text-transform: none;
	line-height: 1.2;
	padding-right: 36px;
}
.cs-city-field {
	display: block;
	position: relative;
	margin-bottom: 16px;
	overflow: visible;
}
.cs-city-field input,
.cs-city-field input[type="text"],
.cs-city-panel input[type="text"] {
	width: 100%;
	height: auto !important;
	min-height: 36px;
	border: 0 !important;
	border-bottom: 1px solid #ddd !important;
	border-radius: 0 !important;
	padding: 8px 0 !important;
	font: inherit;
	color: inherit;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: none !important;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}
.cs-city-field input:hover,
.cs-city-field input:focus,
.cs-city-field input:active,
.cs-city-panel input[type="text"]:hover,
.cs-city-panel input[type="text"]:focus,
.cs-city-panel input[type="text"]:active {
	border: 0 !important;
	border-bottom: 1px solid #ddd !important;
	box-shadow: none !important;
	outline: none !important;
	background: transparent !important;
	background-image: none !important;
}
.cs-city-field-with-clear input {
	padding-right: 32px !important;
}
.cs-city-error {
	color: #c00;
	font-size: 12px;
	margin: -8px 0 12px;
}
.cs-city-suggest,
ul.cs-city-suggest {
	list-style: none !important;
	margin: 4px 0 0 !important;
	padding: 0 !important;
	max-height: 280px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	border: 0 !important;
	background: #fff !important;
	position: static;
	left: auto;
	right: auto;
	top: auto;
	z-index: auto;
	box-shadow: none !important;
}
.cs-city-suggest li,
ul.cs-city-suggest li {
	list-style: none !important;
	margin: 0 !important;
	cursor: pointer;
	background: none !important;
	background-image: none !important;
	color: var(--black, #333);
}
.cs-city-suggest .cs-city-sheet-suggest-item {
	padding: 12px 4px !important;
}

.cs-city-field input[data-cs-city-field-city] {
	cursor: pointer;
}

.cs-city-sheet {
	position: fixed;
	top: 0;
	right: 0;
	width: min(480px, 100%);
	height: 100%;
	background: #fff;
	z-index: 100140;
	padding: 28px 32px 24px;
	box-shadow: -8px 0 28px rgba(0, 0, 0, .08);
	box-sizing: border-box;
	color: var(--black, #333);
	display: flex;
	flex-direction: column;
	transform: translateX(110%);
	visibility: hidden;
	pointer-events: none;
	transition: transform .35s ease-out, visibility .35s ease-out;
}
.cs-city-sheet.is-open {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}
.cs-city-sheet-title {
	font-size: 28px;
	font-weight: bold;
	margin: 8px 0 20px;
	text-transform: none;
	line-height: 1.2;
	padding-right: 36px;
}
.cs-city-sheet-search {
	position: relative;
	margin-bottom: 8px;
	flex: 0 0 auto;
}
.cs-city-sheet-search input,
.cs-city-sheet input[data-cs-city-sheet-query] {
	width: 100%;
	height: 44px !important;
	min-height: 44px !important;
	border: 1px solid #e4e8ee !important;
	border-radius: 8px !important;
	padding: 10px 44px 10px 14px !important;
	font: inherit;
	color: inherit;
	background: #f4f6f8 !important;
	background-color: #f4f6f8 !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: none !important;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}
.cs-city-sheet-search input:focus,
.cs-city-sheet input[data-cs-city-sheet-query]:focus {
	border-color: #d5dce4 !important;
	background: #f4f6f8 !important;
}
.cs-city-clear,
button.cs-city-clear {
	position: absolute;
	top: 50%;
	right: 10px;
	width: 20px !important;
	height: 20px !important;
	min-width: 20px !important;
	min-height: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #c5cdd6 !important;
	background-image: none !important;
	box-shadow: none !important;
	transform: translateY(-50%);
	cursor: pointer;
	z-index: 2;
}
.cs-city-field-with-clear .cs-city-clear {
	right: 0;
	top: 18px;
}
.cs-city-clear[hidden] {
	display: none !important;
}
.cs-city-clear::before,
.cs-city-clear::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 1.5px;
	background: #fff;
	border-radius: 1px;
}
.cs-city-clear::before {
	transform: translate(-50%, -50%) rotate(45deg);
}
.cs-city-clear::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.cs-city-sheet-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	margin: 0 -8px;
	padding: 0 8px 8px;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
}
.cs-city-quick,
ul.cs-city-quick,
.cs-city-sheet-suggest,
ul.cs-city-sheet-suggest {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.cs-city-quick-item,
.cs-city-sheet-suggest-item {
	list-style: none !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 4px !important;
	margin: 0 !important;
	border-bottom: 1px solid #eef1f4;
	cursor: pointer;
	background: none !important;
	color: var(--black, #333);
}
.cs-city-sheet-suggest-item {
	display: block;
	padding: 12px 8px !important;
	border-radius: 8px;
	border-bottom: 1px solid #eef1f4;
}
.cs-city-sheet-suggest-item:hover,
.cs-city-quick-item:hover {
	background: #f7f8fa !important;
}
.cs-city-quick-item.is-current .cs-city-quick-name {
	color: var(--link);
	font-weight: 600;
}
.cs-city-quick-check {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background: var(--link);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / contain no-repeat;
}
.cs-city-sheet-suggest-name {
	display: block;
	color: var(--link);
	font-weight: 600;
}
.cs-city-sheet-suggest-item small {
	display: block;
	color: var(--grey, #888);
	font-size: 12px;
	margin-top: 2px;
}
.cs-city-sheet-empty,
li.cs-city-sheet-empty {
	list-style: none !important;
	padding: 28px 8px 16px !important;
	margin: 0 !important;
	color: var(--grey, #888);
	text-align: center;
	cursor: default;
	background: none !important;
	border: 0 !important;
}
.cs-city-suggest-loading,
li.cs-city-suggest-loading {
	list-style: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-height: 64px;
	padding: 20px 8px !important;
	margin: 0 !important;
	cursor: default;
	pointer-events: none;
	background: none !important;
	border: 0 !important;
}
.cs-city-spinner {
	width: 22px;
	height: 22px;
	border: 2px solid #e4e8ee;
	border-top-color: var(--link);
	border-radius: 50%;
	animation: cs-city-spin .7s linear infinite;
}
@keyframes cs-city-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
	.cs-city-sheet {
		top: 8vh;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: auto;
		max-height: none;
		min-height: 0;
		border-radius: 12px 12px 0 0;
		padding: 12px 20px max(24px, env(safe-area-inset-bottom));
		transform: translateY(110%);
		overflow: hidden;
	}
	.cs-city-sheet.is-open {
		transform: translateY(0);
	}
	.cs-city-sheet-title {
		font-size: 22px;
		margin: 4px 0 16px;
	}
}

@media (max-width: 760px) {
	.cs-city-overlay.is-plaque {
		background: rgba(38, 46, 56, .28);
	}
	.cs-city-plaque {
		position: fixed;
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		width: 100%;
		margin: 0;
		border-radius: 12px 12px 0 0;
		z-index: 100110;
		padding-bottom: 20px;
	}
	.cs-city-plaque-handle {
		display: block;
		width: 40px;
		height: 4px;
		border-radius: 2px;
		background: #d6dee8;
		margin: 0 auto 12px;
	}
	button.cs-city-no {
		flex: 1;
		border: 1px solid var(--link) !important;
		border-radius: 4px !important;
		justify-content: center;
	}
	button.cs-city-yes {
		flex: 1;
		min-width: 0;
	}
	.cs-city-panel {
		top: 8vh;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: auto;
		max-height: none;
		min-height: 0;
		border-radius: 12px 12px 0 0;
		padding: 16px 20px max(24px, env(safe-area-inset-bottom));
		overflow: auto;
		transform: translateY(110%);
		background: #fff;
	}
	.cs-city-panel.is-open {
		transform: translateY(0);
	}
	.cs-city-panel-title {
		font-size: 22px;
	}
}

/* Шаг 1 чекаута: после скрытия способов доставки убираем пустой зазор до «Продолжить». */
body.cs-city-step1 #cart-items > br,
body.cs-city-step1 #f-order fieldset > br,
body.cs-city-step1 #f-order + br {
	display: none !important;
}
body.cs-city-step1 .delivery-types-list {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}
body.cs-city-step1 #f-order {
	margin: 0;
}
body.cs-city-step1 #f-order fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-height: 0;
}
body.cs-city-step1 #f-order + p,
body.cs-city-step1 p:has(> button[rel="next-step"]) {
	margin-top: 12px;
}

/* Бренд: токены --link/--black уже в :root витрины. Ниже — шрифты и посадка пина. */
html[data-cs-city-brand="gigi"] .cs-city-panel-title,
html[data-cs-city-brand="gigi"] .cs-city-sheet-title,
html[data-cs-city-brand="gigi"] .cs-city-plaque-city {
	font-family: Georgia, Times, serif;
	font-style: italic;
	color: #3a96d4;
	font-weight: bold;
	text-transform: none;
}
html[data-cs-city-brand="gigi"] #logo-n-address .cs-city {
	margin: 6px 0 0;
}
@media (max-width: 760px) {
	html[data-cs-city-brand="gigi"] #logo-n-address .cs-city {
		text-align: center;
	}
	html[data-cs-city-brand="gigi"] #logo-n-address .cs-city-pin {
		justify-content: center;
	}
}

html[data-cs-city-brand="anna"] .cs-city-panel-title,
html[data-cs-city-brand="anna"] .cs-city-sheet-title,
html[data-cs-city-brand="anna"] .cs-city-plaque-city {
	font-family: "PT Sans Narrow", "PT Sans", Arial, sans-serif;
	text-transform: uppercase;
	letter-spacing: .02em;
}

html[data-cs-city-brand="star"] .cs-city-panel-title,
html[data-cs-city-brand="star"] .cs-city-sheet-title {
	font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
}
#header.expanded .cs-city {
	margin: 8px 0 14px;
}
@media (max-width: 760px) {
	#header.expanded .cs-city {
		margin: 0 0 16px 5px;
		padding-left: 0;
	}
	#header.expanded .cs-city-pin {
		color: #fff !important;
	}
}

