/**
 * Block-theme bridging styles.
 *
 * The classic theme relied on #wrapper (flex column) wrapping header + main +
 * footer, and on #wrapper .click-capture for the drawer dim overlay. In the
 * block theme the #wrapper group is recreated in the templates, but the
 * overlays are printed at body level (wp_footer), so a few rules are restated
 * here without the #wrapper ancestor.
 */

.wp-site-blocks {
	margin: 0;
}

/* ---------- Announcement bar ---------- */
.thb-announcement-bar {
	background: var(--announcement-bg, #151515);
	color: var(--announcement-color, #fff);
	text-align: center;
}
.thb-announcement-bar__inner {
	padding: 10px 16px;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.3;
}
.thb-announcement-bar a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Header currency indicator ---------- */
.thb-header-currency {
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	white-space: nowrap;
	cursor: default;
	display: inline-flex;
	align-items: center;
}
@media (max-width: 767px) {
	.thb-header-currency {
		display: none;
	}
}

/* #wrapper flex behaviour is in app.css; ensure the <main> area fills height. */
#wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
#wrapper > main,
#wrapper > .thb-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
}
#wrapper > .thb-main > .row {
	width: 100%;
}

/* Group wrappers used in templates must not impose their own width/padding. */
.thb-wrapper.wp-block-group,
.thb-main.wp-block-group {
	margin: 0;
	padding: 0;
}

/* Drawer dim overlay (printed at body level via wp_footer). */
.click-capture {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 52;
	opacity: 0;
	visibility: hidden;
	background: rgba(var(--color-overlay-rgb, 0, 0, 0), 0.7);
	backdrop-filter: blur(3px);
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.open-cc .click-capture,
body.open-quick-view .click-capture,
body.open-cart .click-capture {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ---------- Footer (store layout) ---------- */
.thb-footer {
	background: var(--bg-body, #fff);
	border-top: 1px solid var(--color-border, #e2e2e2);
}
.thb-footer__top {
	padding: 60px 0 40px;
}
.thb-footer__top .row {
	display: flex;
	flex-wrap: wrap;
}
.thb-footer__brand {
	padding-right: 30px;
	margin-bottom: 30px;
}
.thb-footer__logo {
	display: inline-block;
	margin-bottom: 16px;
	font-size: 1.4rem;
	color: var(--color-accent, #151515);
	text-decoration: none;
}
.thb-footer__logo .logoimg {
	height: 30px;
	width: auto;
}
.thb-footer__desc {
	font-size: 0.9rem;
	line-height: 1.6;
	max-width: 360px;
	margin: 0 0 18px;
	color: rgba(var(--color-body-rgb, 21, 21, 21), 0.7);
}
.thb-footer__social {
	display: flex;
	gap: 10px;
}
.thb-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--color-border, #e2e2e2);
	border-radius: 999px;
	color: var(--color-accent, #151515);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.thb-footer__social a:hover {
	background: var(--color-accent, #151515);
	color: #fff;
	border-color: var(--color-accent, #151515);
}
.thb-footer__col {
	margin-bottom: 30px;
}
.thb-footer .thb-widget-title {
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
	margin-bottom: 16px;
}
.thb-footer .thb-widget-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.thb-footer .thb-widget-menu li {
	margin-bottom: 10px;
}
.thb-footer .thb-widget-menu a {
	font-size: 0.9rem;
	color: rgba(var(--color-body-rgb, 21, 21, 21), 0.7);
	text-decoration: none;
	transition: color 0.15s ease;
}
.thb-footer .thb-widget-menu a:hover {
	color: var(--color-accent, #151515);
}
.thb-footer__newsletter {
	margin-bottom: 30px;
}
.thb-newsletter {
	display: flex;
	max-width: 380px;
	margin-top: 8px;
}
.thb-newsletter__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	border: 1px solid var(--color-border, #e2e2e2);
	border-right: 0;
	padding: 0 14px;
	font-size: 0.9rem;
	background: transparent;
}
.thb-newsletter__btn {
	flex: 0 0 auto;
	height: 48px;
}
.thb-footer__bottom {
	border-top: 1px solid var(--color-border, #e2e2e2);
	padding: 22px 0;
}
.thb-footer__bottom .row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.thb-footer .thb-copyright {
	font-size: 0.8125rem;
	color: rgba(var(--color-body-rgb, 21, 21, 21), 0.55);
}
.thb-footer__pay {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
@media (min-width: 768px) {
	.thb-footer__pay {
		justify-content: flex-end;
	}
}
.thb-pay-badge {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border: 1px solid var(--color-border, #e2e2e2);
	border-radius: 4px;
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	color: rgba(var(--color-body-rgb, 21, 21, 21), 0.6);
}
@media (max-width: 767px) {
	.thb-footer__bottom .thb-footer__pay {
		margin-top: 12px;
	}
}

/* ---------- Top utility bar ---------- */
.thb-topbar {
	background: var(--topbar-bg, #fff);
	color: var(--topbar-text, #151515);
	border-bottom: 1px solid var(--color-border, #e2e2e2);
	font-size: 0.8125rem;
}
.thb-topbar .row.expanded {
	display: flex;
	align-items: center;
	min-height: 40px;
}
.thb-topbar__left {
	display: flex;
	align-items: center;
}
.thb-topbar__social {
	display: flex;
	align-items: center;
	gap: 14px;
}
.thb-topbar__social a {
	display: inline-flex;
	align-items: center;
	color: var(--topbar-text, #151515);
	opacity: 0.8;
	transition: opacity 0.15s ease;
}
.thb-topbar__social a:hover {
	opacity: 1;
}
.thb-topbar__right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 22px;
}
.thb-topbar__select {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	white-space: nowrap;
	outline: none;
}
.thb-topbar__cap {
	display: none;
}
.thb-topbar__val {
	color: var(--topbar-text, #151515);
}
.thb-topbar__chev {
	width: 7px;
	height: 7px;
	border-right: 1.3px solid currentColor;
	border-bottom: 1.3px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: 0.6;
}
@media (max-width: 767px) {
	.thb-topbar__right {
		gap: 12px;
	}
	.thb-topbar__select .thb-topbar__val {
		max-width: 90px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* ---------- Top bar: force single line + flag ---------- */
.thb-topbar .row.expanded {
	flex-wrap: nowrap;
}
.thb-topbar__left,
.thb-topbar__right,
.thb-topbar__social {
	flex-wrap: nowrap;
}
.thb-topbar__select {
	flex-wrap: nowrap;
}
.thb-flag {
	display: inline-flex;
	flex: 0 0 auto;
	line-height: 0;
}
.thb-flag svg {
	border-radius: 2px;
	display: block;
}

/* ---------- Top bar: three-section single line (social | promo | region) ---------- */
.thb-topbar {
	border-bottom: 0;
}
.thb-topbar .row.expanded {
	gap: 12px;
}
.thb-topbar__left {
	flex: 1 1 0;
	min-width: 0;
}
.thb-topbar__right {
	flex: 1 1 0;
	min-width: 0;
}
.thb-topbar__center {
	flex: 0 1 auto;
	min-width: 0;
	text-align: center;
	padding: 0 10px;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.thb-topbar__center a {
	color: inherit;
	text-decoration: none;
}
@media (max-width: 900px) {
	.thb-topbar__left {
		display: none;
	}
	.thb-topbar__center {
		flex: 1 1 auto;
		text-align: left;
	}
}
@media (max-width: 600px) {
	.thb-topbar__center {
		font-size: 0.6875rem;
		letter-spacing: 0.03em;
	}
}

/* Newsletter signup confirmation message */
.thb-newsletter__msg {
	margin: 12px 0 0;
	font-size: 0.9rem;
	line-height: 1.4;
}
.thb-newsletter__msg[hidden] {
	display: none;
}
.thb-newsletter__msg.is-ok {
	color: #1a7f4b;
}
.thb-newsletter__msg.is-err {
	color: #c0392b;
}

/* ===== Shop 大菜单:去掉促销图后，让四列成组居中、间距适中 ===== */
@media only screen and (min-width: 1025px) {
	.thb-full-menu .sub-menu.mega-menu-container {
		justify-content: flex-start;
	}
	.thb-full-menu .mega-menu-columns {
		flex: 0 1 auto;
		grid-auto-columns: minmax(150px, max-content);
		grid-column-gap: 72px;
		padding: 46px 60px;
	}
}
@media only screen and (min-width: 1200px) {
	.thb-full-menu .mega-menu-columns {
		grid-column-gap: 88px;
	}
}

/* ---------- 页脚：修正标题颜色 + 手机端紧凑布局 ---------- */
/* 板块标题在浅底页脚上必须是深色（避免白字白底看不见） */
.thb-footer .thb-widget-title,
.thb-footer__newsletter .thb-widget-title {
	color: var(--color-accent, #151515);
}
@media (max-width: 767px) {
	/* 旧 footer.css 在手机上把链接列表 display:none 了，这里恢复显示 */
	.thb-footer .thb-widget-menu { display: block; }

	.thb-footer__top { padding: 34px 0 6px; }
	.thb-footer__brand { padding-right: 0; margin-bottom: 22px; }
	.thb-footer__desc { max-width: none; margin-bottom: 12px; }
	.thb-footer__social:empty { display: none; }

	/* Shop 与 Customer Care 保持并排（各占一半），省纵向空间 */
	.thb-footer__col { margin-bottom: 20px; padding-right: 10px; }
	.thb-footer__newsletter { margin-bottom: 4px; margin-top: 2px; }

	.thb-footer .thb-widget-title { margin-bottom: 10px; }
	.thb-footer .thb-widget-menu li { margin-bottom: 7px; }
	.thb-newsletter { max-width: none; margin-top: 10px; }

	.thb-footer__bottom { padding: 16px 0; }
	.thb-footer__bottom .thb-footer__pay { margin-top: 10px; }
}

/* ---------- 页眉图标着色修复 + 手机菜单抽屉 ---------- */
/* --color-header-icons 全站未定义，导致汉堡线/图标透明看不见。定义为深色。 */
:root {
	--color-header-icons: #151515;
}
/* 汉堡三条线兜底着色（防无效 fallback） */
.mobile-toggle span { background: var(--color-header-icons, #151515); }
/* 右侧图标（搜索/账户/购物车）着色兜底 */
.thb-secondary-area-item svg path { fill: var(--color-header-icons, #151515); }
.thb-secondary-area-item.thb-secondary-cart .thb-item-count svg { fill: #fff; }
/* <details> 原生展开即显示抽屉（不依赖 JS 的 .active） */
.mobile-toggle-wrapper[open] .mobile-menu-drawer {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
}

/* ---------- 手机端 logo 下方的文字菜单行 ---------- */
.thb-mobile-textnav { display: none; }
@media (max-width: 1067px) {
	.thb-mobile-textnav {
		display: block;
		border-top: 1px solid var(--color-border, #ececec);
		background: var(--color-header-bg, #fff);
	}
	.thb-mobile-textnav__list {
		display: flex;
		gap: 24px;
		margin: 0;
		padding: 11px 16px;
		list-style: none;
		justify-content: center;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.thb-mobile-textnav__list::-webkit-scrollbar { display: none; }
	.thb-mobile-textnav__list li { flex: 0 0 auto; margin: 0; }
	.thb-mobile-textnav__list a {
		font-size: 0.95rem;
		color: var(--color-accent, #151515);
		text-decoration: none;
		white-space: nowrap;
	}
	.thb-mobile-textnav__list .current-menu-item > a,
	.thb-mobile-textnav__list a:hover {
		text-decoration: underline;
		text-underline-offset: 5px;
	}
}
