/* ============================================================
   ses-locale v2 —— 地球图标 + 下拉面板（语言 / 货币）
   放在顶部工具栏右侧，与购物车/账户图标同一视觉层级
   ============================================================ */

.ses-locale {
	position: relative;
	flex: 0 0 auto;
	font-size: 13px;
	line-height: 1;
}

/* ---------- 触发按钮 ---------- */
.ses-locale__btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--line, #e7e5e0);
	border-radius: 999px;
	background: #fff;
	color: var(--ink, #111114);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .3px;
	cursor: pointer;
	transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
	white-space: nowrap;
}
.ses-locale__btn:hover {
	border-color: var(--rose, #c94f7c);
	color: var(--rose, #c94f7c);
	box-shadow: 0 4px 14px rgba(17, 17, 20, .07);
}
.ses-locale__btn:focus-visible {
	outline: 2px solid var(--rose, #c94f7c);
	outline-offset: 2px;
}
.ses-locale__btn[aria-expanded="true"] {
	border-color: var(--rose, #c94f7c);
	color: var(--rose, #c94f7c);
	background: #fff;
}
.ses-locale__globe {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}
.ses-locale__code {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .8px;
}
.ses-locale__caret {
	width: 13px;
	height: 13px;
	flex: 0 0 13px;
	opacity: .55;
	transition: transform .2s ease;
}
.ses-locale__btn[aria-expanded="true"] .ses-locale__caret {
	transform: rotate(180deg);
}

/* ---------- 下拉面板 ---------- */
.ses-locale__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 120;
	width: 296px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--line, #e7e5e0);
	border-radius: 16px;
	box-shadow: 0 18px 46px -16px rgba(17, 17, 20, .28), 0 2px 8px rgba(17, 17, 20, .05);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
/* hidden 属性优先：未初始化时不占位、不遮挡 */
.ses-locale__panel[hidden] {
	display: none;
}
.ses-locale.is-open .ses-locale__panel {
	display: block;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ses-locale__sec + .ses-locale__sec {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--line, #e7e5e0);
}
.ses-locale__title {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--muted, #75757d);
	margin-bottom: 10px;
}

/* ---------- 语言列表 ---------- */
.ses-locale__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ses-locale__item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 10px;
	border-radius: 11px;
	text-decoration: none;
	color: var(--ink, #111114);
	transition: background .15s ease;
}
.ses-locale__item:hover {
	background: #f6f5f4;
}
.ses-locale__item.is-active {
	background: rgba(201, 79, 124, .09);
}
.ses-locale__badge {
	flex: 0 0 34px;
	width: 34px;
	height: 24px;
	border-radius: 6px;
	display: grid;
	place-items: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .5px;
}
.ses-locale__names {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}
.ses-locale__names b {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.15;
}
.ses-locale__item.is-active .ses-locale__names b {
	color: var(--rose, #c94f7c);
}
.ses-locale__names i {
	font-style: normal;
	font-size: 11px;
	color: var(--muted, #75757d);
	line-height: 1.15;
}
.ses-locale__check {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
	color: var(--rose, #c94f7c);
	opacity: 0;
	transform: scale(.7);
	transition: opacity .18s, transform .18s;
}
.ses-locale__item.is-active .ses-locale__check {
	opacity: 1;
	transform: scale(1);
}

/* ---------- 货币 ---------- */
.ses-locale__curs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.ses-locale__cur {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 9px 4px;
	border: 1px solid var(--line, #e7e5e0);
	border-radius: 11px;
	background: #fff;
	text-decoration: none;
	color: var(--ink, #111114);
	transition: border-color .15s, background .15s, color .15s;
}
.ses-locale__cur:hover {
	border-color: var(--rose, #c94f7c);
	color: var(--rose, #c94f7c);
}
.ses-locale__cur.is-active {
	border-color: var(--rose, #c94f7c);
	background: rgba(201, 79, 124, .08);
	color: var(--rose, #c94f7c);
}
.ses-locale__sym {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
}
.ses-locale__cc {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .6px;
	color: var(--muted, #75757d);
}
.ses-locale__cur.is-active .ses-locale__cc {
	color: var(--rose, #c94f7c);
}

/* ---------- 抽屉内（移动端）：面板常驻展开，一眼可选 ---------- */
.ses-locale--drawer {
	width: 100%;
}
.ses-locale--drawer .ses-locale__btn {
	width: 100%;
	height: 44px;
	justify-content: flex-start;
	padding: 0 16px;
	cursor: default;
	background: var(--card, #f4f3f0);
	border-color: transparent;
}
.ses-locale--drawer .ses-locale__btn:hover {
	border-color: transparent;
	box-shadow: none;
	color: var(--ink, #111114);
}
.ses-locale--drawer .ses-locale__curcode {
	margin-left: auto;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .8px;
	color: var(--rose, #c94f7c);
}
.ses-locale--drawer .ses-locale__panel {
	position: static;
	width: 100%;
	margin-top: 10px;
	box-shadow: none;
	background: #faf9f8;
	border-color: var(--line, #e7e5e0);
	opacity: 1;
	visibility: visible;
	transform: none;
	display: block;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	/* 窄屏页头空间紧张：顶部工具栏隐藏实例，改用抽屉里的展开式面板 */
	.header-top .ses-locale--header { display: none; }
	.ses-locale__panel {
		width: 280px;
	}
}
@media (max-width: 575px) {
	.ses-locale__btn {
		height: 36px;
		padding: 0 11px;
		gap: 5px;
	}
	.ses-locale__globe {
		width: 16px;
		height: 16px;
		flex-basis: 16px;
	}
	.ses-locale__panel {
		width: min(280px, calc(100vw - 32px));
	}
}
