/* Страница «Магазины» — список + Яндекс.Карта */

body.techno-stores-v2 {
	--stores-bg-page: #141518;
	--stores-bg-panel: #2a2b2e;
	--stores-border: rgba(255, 255, 255, 0.08);
	--stores-accent: #ff7a00;
	--stores-accent-hover: #e86c03;
	--stores-text: #ffffff;
	--stores-text-muted: #9ca3b6;
	--stores-radius: 14px;
	--stores-list-width: 340px;
	--stores-map-height: min(72vh, 720px);
	--stores-card-weight: 400;
}

body.techno-stores-v2 #content,
body.techno-stores-v2 .rey-pageCover,
body.techno-stores-v2 .rey-siteContainer,
body.techno-stores-v2 .rey-siteMain {
	background: var(--stores-bg-page) !important;
}

/* Hide page title cover only — do NOT hide .elementor (header/footer are Elementor) */
body.techno-stores-v2 .rey-pageCover,
body.techno-stores-v2 .rey-pageTitle {
	display: none !important;
}

.stores-v2 {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 28px 20px 48px;
	color: var(--stores-text);
	box-sizing: border-box;
}

.stores-v2__inner {
	width: 100%;
}

.stores-v2__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.stores-v2__title {
	margin: 0;
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--stores-text);
}

.stores-v2__map-toggle {
	display: none !important;
	flex-shrink: 0;
	appearance: none !important;
	border: none !important;
	background: transparent !important;
	background-color: transparent !important;
	color: var(--stores-text-muted) !important;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 0.95rem;
	font-weight: 400 !important;
	line-height: 1.2;
	cursor: pointer;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	box-shadow: none !important;
	text-shadow: none !important;
	text-align: left;
	border-radius: 0 !important;
}

.stores-v2__map-toggle-label {
	color: #c8ccd6;
	font-size: 0.95rem;
	font-weight: 400;
}

.stores-v2__switch {
	position: relative;
	flex: 0 0 auto;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18) !important;
	transition: background 0.2s ease;
	pointer-events: none;
}

.stores-v2__switch-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease;
}

.stores-v2__map-toggle[aria-checked="true"] .stores-v2__switch {
	background: var(--stores-accent) !important;
}

.stores-v2__map-toggle[aria-checked="true"] .stores-v2__switch-thumb {
	transform: translateX(20px);
}

.stores-v2__layout {
	display: grid;
	grid-template-columns: var(--stores-list-width) minmax(0, 1fr);
	gap: 16px;
	align-items: stretch;
	height: var(--stores-map-height);
	min-height: 480px;
}

.stores-v2__list {
	min-height: 0;
	height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Padding so active card border/shadow isn't clipped by overflow */
	padding: 4px 10px 10px 4px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.stores-v2__list::-webkit-scrollbar {
	width: 4px;
}

.stores-v2__list::-webkit-scrollbar-track {
	background: transparent;
}

.stores-v2__list::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.22);
	border-radius: 4px;
}

body.techno-stores-v2 .stores-v2__card {
	margin: 0;
	padding: 14px 14px 14px 14px;
	background: var(--stores-bg-panel);
	border: 1px solid var(--stores-border);
	border-radius: var(--stores-radius);
	box-sizing: border-box;
	cursor: pointer;
	font-weight: 400;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
	outline: none;
}

body.techno-stores-v2 .stores-v2__card:hover,
body.techno-stores-v2 .stores-v2__card:focus-visible {
	border-color: rgba(255, 122, 0, 0.4);
}

body.techno-stores-v2 .stores-v2__card.is-active {
	border-color: var(--stores-accent);
	box-shadow: 0 0 0 1px var(--stores-accent);
	background: #2f3034;
}

body.techno-stores-v2 .stores-v2__card-head {
	margin: 0 0 4px;
}

body.techno-stores-v2 .stores-v2__card-city,
body.techno-stores-v2 .stores-v2__card h2.stores-v2__card-city {
	margin: 0;
	font-size: 1.25rem !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.01em;
	color: var(--stores-text) !important;
}

body.techno-stores-v2 .stores-v2__card-subtitle {
	margin: 2px 0 0;
	font-size: 0.78rem !important;
	font-weight: 400 !important;
	line-height: 1.35;
	color: var(--stores-text-muted) !important;
}

body.techno-stores-v2 .stores-v2__card-address {
	margin: 0;
	font-size: 0.8rem !important;
	font-weight: 400 !important;
	line-height: 1.4;
	color: var(--stores-text-muted) !important;
}

body.techno-stores-v2 .stores-v2__card-block {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 6px 10px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--stores-border);
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.4;
}

body.techno-stores-v2 .stores-v2__card-label {
	color: var(--stores-text-muted);
	font-size: 0.72rem !important;
	font-weight: 400 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding-top: 1px;
}

body.techno-stores-v2 .stores-v2__card-block-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

body.techno-stores-v2 .stores-v2__card-phone,
body.techno-stores-v2 .stores-v2__card-email {
	color: var(--stores-text);
	text-decoration: none;
	font-size: 0.8rem !important;
	font-weight: 400 !important;
	width: fit-content;
}

body.techno-stores-v2 .stores-v2__card-phone:hover,
body.techno-stores-v2 .stores-v2__card-email:hover {
	color: var(--stores-accent);
}

body.techno-stores-v2 .stores-v2__card-hours-text {
	color: var(--stores-text);
	white-space: pre-line;
	font-size: 0.8rem !important;
	font-weight: 400 !important;
}

.stores-v2__map-panel {
	position: relative;
	min-width: 0;
	min-height: 0;
	height: 100%;
	border-radius: var(--stores-radius);
	overflow: hidden;
	border: 1px solid var(--stores-border);
	background: var(--stores-bg-panel);
}

.stores-v2__map {
	width: 100%;
	height: 100%;
	min-height: 280px;
}

/* Custom zoom — avoids broken Yandex float-buttons under border-box !important */
.stores-v2__zoom {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.stores-v2__zoom-btn {
	box-sizing: border-box !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
	border-radius: 0 !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #1a1a1a !important;
	font-size: 22px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	user-select: none;
	box-shadow: none !important;
	text-shadow: none !important;
}

.stores-v2__zoom-btn:last-child {
	border-bottom: none !important;
}

.stores-v2__zoom-btn:hover,
.stores-v2__zoom-btn:focus {
	background: #f3f4f6 !important;
	background-color: #f3f4f6 !important;
	color: #1a1a1a !important;
}

.stores-v2__zoom-btn:active {
	background: #e5e7eb !important;
	background-color: #e5e7eb !important;
	color: #1a1a1a !important;
}

/*
 * threesixty.min.css sets `* { box-sizing: border-box !important }`,
 * which breaks Yandex Maps balloon layout/anchor.
 * Restore content-box for map chrome; keep border-box only where we add padding.
 */
body.techno-stores-v2 .stores-v2__map ymaps,
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"] {
	box-sizing: content-box !important;
}

.stores-v2__map-error {
	padding: 24px;
	text-align: center;
	color: #f87171;
	font-size: 0.95rem;
}

/* —— Balloon content (inner HTML only; do not restyle Yandex chrome/tail) —— */
.stores-v2-balloon {
	box-sizing: border-box;
	min-width: 220px;
	max-width: 280px;
	padding: 10px 12px 8px;
	font-family: inherit;
	font-weight: 400;
	color: #ffffff;
	line-height: 1.4;
}

.stores-v2-balloon__handle {
	display: none;
}

.stores-v2-balloon__city {
	margin: 0 0 2px;
	font-size: 1rem;
	font-weight: 400;
	color: #ffffff;
}

.stores-v2-balloon__subtitle {
	margin: 0 0 6px;
	font-size: 0.75rem;
	font-weight: 400;
	color: #9ca3b6;
}

.stores-v2-balloon__address {
	margin: 0 0 10px;
	font-size: 0.8rem;
	font-weight: 400;
	color: #9ca3b6;
}

.stores-v2-balloon__row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 4px 8px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.78rem;
}

.stores-v2-balloon__label {
	font-size: 0.68rem;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #9ca3b6;
	padding-top: 1px;
}

.stores-v2-balloon__value {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	color: #ffffff;
	white-space: pre-line;
}

.stores-v2-balloon__value a {
	color: #ffffff;
	text-decoration: none;
}

.stores-v2-balloon__value a:hover {
	color: #ff7a00;
}

.stores-v2-balloon__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 12px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #ff7a00;
	color: #fff !important;
	font-size: 0.75rem;
	font-weight: 400;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.stores-v2-balloon__link:hover {
	background: #e86c03;
	color: #fff !important;
}

.stores-v2-balloon__link-icon {
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	opacity: 0.9;
}

/*
 * Dark balloon chrome (Yandex only — do not match .stores-v2-balloon*).
 * Do NOT paint the outer .balloon wrapper — it has no radius and looks square.
 * Do NOT add padding/width on balloon__content — that shifts the tail.
 */
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__layout"],
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__content"],
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close"],
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close-button"] {
	background-color: #2a2b2e !important;
	color: #fff !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon_layout_normal"] {
	background: transparent !important;
	background-color: transparent !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__layout"] {
	border: none !important;
	border-radius: 14px !important;
	overflow: hidden !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__content"] {
	border: none !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__tail"]::after,
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__tail"] {
	background-color: #2a2b2e !important;
	background-image: none !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close"],
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close-button"] {
	filter: none !important;
	opacity: 1 !important;
	background-color: #2a2b2e !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ff7a00' d='M3.2 2.1 2.1 3.2 6.9 8l-4.8 4.8 1.1 1.1L8 9.1l4.8 4.8 1.1-1.1L9.1 8l4.8-4.8-1.1-1.1L8 6.9 3.2 2.1z'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
	background-size: 14px 14px !important;
}

body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close"]:hover,
body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon__close-button"]:hover {
	opacity: 1 !important;
	background-color: #2a2b2e !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23e86c03' d='M3.2 2.1 2.1 3.2 6.9 8l-4.8 4.8 1.1 1.1L8 9.1l4.8 4.8 1.1-1.1L9.1 8l4.8-4.8-1.1-1.1L8 6.9 3.2 2.1z'/%3E%3C/svg%3E") !important;
}

body.techno-stores-v2 .stores-v2__map [class*="copyrights"] {
	opacity: 0.55;
}

@media (max-width: 900px) {
	.stores-v2 {
		padding: 20px 16px 40px;
	}

	.stores-v2__header {
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: flex-start;
		gap: 10px 16px;
	}

	.stores-v2__title {
		width: 100%;
	}

	.stores-v2__map-toggle {
		display: inline-flex !important;
		align-items: center;
		justify-content: flex-start;
		width: auto;
		max-width: 100%;
		margin: 0;
		padding: 0 !important;
	}

	.stores-v2.is-map-mode .stores-v2__title {
		display: none;
	}

	.stores-v2__layout {
		display: block;
		height: auto;
		min-height: 0;
	}

	.stores-v2__list {
		height: auto;
		max-height: none;
		overflow: visible;
		padding: 2px;
	}

	.stores-v2__map-panel {
		display: none;
		height: min(70vh, 560px);
		min-height: 360px;
		margin-top: 0;
	}

	.stores-v2.is-map-mode .stores-v2__list {
		display: none;
	}

	.stores-v2.is-map-mode .stores-v2__map-panel {
		display: block;
	}

	/* Bottom sheet balloon (panel mode) */
	.stores-v2-balloon {
		min-width: 0;
		max-width: none;
		padding: 4px 4px 8px;
	}

	.stores-v2-balloon__handle {
		display: block;
		width: 36px;
		height: 4px;
		margin: 2px auto 12px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.28);
	}

	body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon_layout_panel"] {
		background-color: #2a2b2e !important;
	}

	body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon_layout_panel"] [class*="balloon__layout"],
	body.techno-stores-v2 .stores-v2__map [class*="ymaps-"][class*="balloon_layout_panel"] [class*="balloon__content"] {
		border-radius: 16px 16px 0 0 !important;
		overflow: hidden !important;
		background-color: #2a2b2e !important;
	}
}

@media (max-width: 480px) {
	.stores-v2__card-block {
		grid-template-columns: 1fr;
		gap: 4px;
	}
}
