/**
 * MOSAIC 前台主题覆盖样式
 *
 * 只做两件事，不碰 fecshop 原始样式表（60cfc1cd/css/style.css 会被 asset 重新发布覆盖）：
 *   1. 标题栏：logo 靠左、搜索栏居中、识图入口靠右
 *   2. 首页：居中上传卡片（hero）+ 四张特性卡
 *
 * 引入位置：theme/terry/theme01/widgets/head.php（在主题 assets 之后）
 */

/* =====================================================================
   一、标题栏：logo 左 / 搜索居中 / 识图工具 右
   ===================================================================== */
.top_main_inner {
	padding-top: 14px;
}

.top_header {
	position: relative;
	display: flex;
	align-items: center;
	height: 64px;
	padding-bottom: 10px;
	box-sizing: content-box;
}

/* 原始 logo 用了 margin-left:-100% 的居中技巧，这里改回正常靠左 */
.top_header .logo {
	float: none;
	margin: 0;
	width: auto;
	height: 52px;
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

/* logo 为竖版方图（篮子 + 字标），34px 时字标不可读，放到 52px */
.top_header .logo img {
	height: 52px;
	width: auto;
	display: block;
}

/* 搜索栏：脱离文档流，绝对定位到容器正中（= 页面正中），不被 logo 宽度影响 */
.top_header .topSeachForm {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	float: none;
	width: 440px;
	max-width: 38vw;
}

.top_header .topSeachForm form {
	float: none;
	width: 100%;
	margin: 0;
}

.top_header .top_seachBox {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 6px 0 18px;
	background: #f4f4f1;
	border: 1px solid #ebebe6;
	border-radius: 999px;
	box-sizing: border-box;
	transition: border-color .18s, background .18s;
}

.top_header .top_seachBox:focus-within {
	background: #fff;
	border-color: #cfcfc7;
}

.top_header .searchInput {
	float: none;
	width: auto;
	flex: 1 1 auto;
	min-width: 0;
}

.top_header .searchArea {
	width: 100%;
	height: 40px;
	line-height: 40px;
	padding: 0;
	background: transparent;
	border: 0;
	font-size: 13px;
	color: #212121;
}

.top_header .searchArea::placeholder {
	color: #9b9b95;
}

/* 原始按钮是 105×25 的精灵图，这里换成深色圆形 + 内联放大镜图标 */
.top_header .seachBtn {
	float: none;
	margin: 0;
	width: 30px;
	height: 30px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #1c1c1c;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background .18s;
}

.top_header .seachBtn:hover {
	background: #000;
}

.top_header .seachBtn::after {
	content: "";
	width: 13px;
	height: 13px;
	background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 右侧：识图工具入口 */
.top_header_tools {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 10px;
}

.top_header_tools .lego-entry {
	float: none;
	margin: 0;
	width: auto !important;
}

.top_header_tools .lego-entry__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 38px;
	padding: 0 16px;
	border: 1.5px solid #e4e4de;
	border-radius: 999px;
	background: #fff;
	color: #212121;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .3px;
	line-height: 1;
	text-decoration: none;
	transition: background .18s, border-color .18s, color .18s;
}

.top_header_tools .lego-entry__link:hover {
	background: #1c1c1c;
	border-color: #1c1c1c;
	color: #fff;
}

.top_header_tools .lego-entry__icon {
	display: inline-flex;
	align-items: center;
}

@media (max-width: 1200px) {
	.top_header {
		padding-left: 20px;
		padding-right: 20px;
	}

	/* 主题是固定 1200px 的桌面版（手机版走 apphtml5），
	   视口窄于容器时取消 100vw 出血，避免 hero 相对内容横向错位 */
	.mosaic-hero {
		left: auto;
		width: auto;
		margin-left: 0;
		margin-right: 0;
	}
}

/* =====================================================================
   二、首页 hero：居中上传卡片
   ===================================================================== */
html {
	overflow-x: clip;
}

body {
	overflow-x: clip;
}

.mosaic-hero {
	position: relative;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 62px 20px 66px;
	box-sizing: border-box;
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 62%),
		linear-gradient(180deg, #37404f 0%, #232a35 45%, #161b22 100%);
}

/* 颗粒/底板质感的细纹，纯 CSS，不额外请求图片 */
.mosaic-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .055) 0 5px, rgba(255, 255, 255, 0) 6px),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, rgba(255, 255, 255, 0) 1px 52px),
		repeating-linear-gradient(90deg, rgba(255, 255, 255, .028) 0 1px, rgba(255, 255, 255, 0) 1px 52px);
	background-size: 52px 52px, 52px 52px, 52px 52px;
	pointer-events: none;
}

.mosaic-hero__card {
	position: relative;
	z-index: 1;
	max-width: 660px;
	margin: 0 auto;
	padding: 44px 40px 32px;
	background: rgba(255, 255, 255, .96);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
	text-align: center;
}

.mosaic-hero__title {
	margin: 0 0 14px;
	font-size: 32px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -.4px;
	color: #1d1d1f;
}

.mosaic-hero__sub {
	margin: 0 0 26px;
	font-size: 14px;
	line-height: 1.7;
	color: #5d5d59;
}

/* 注意：fecshop 全局有 `a:active, a:link{background-color:transparent}`（0,1,1），
   这里必须用 `a.` 前缀把特异性提上去，否则按钮背景会被打成透明 */
.mosaic-hero a.mosaic-hero__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 384px;
	height: 58px;
	margin: 0 auto;
	background-color: #33322f;
	color: #fff164;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .3px;
	text-decoration: none;
	border-radius: 3px;
	transition: background-color .18s, transform .12s, box-shadow .18s;
}

.mosaic-hero a.mosaic-hero__btn:hover {
	background-color: #1d1d1b;
	color: #fff164;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.mosaic-hero__btn svg {
	flex: 0 0 auto;
}

.mosaic-hero__link {
	display: inline-block;
	margin-top: 20px;
	font-size: 12.5px;
	color: #6d6d68;
	text-decoration: none;
	letter-spacing: .2px;
}

.mosaic-hero__link:hover {
	color: #1d1d1f;
	text-decoration: underline;
}

/* =====================================================================
   三、首页四张特性卡
   ===================================================================== */
.mosaic-feats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
	margin: 26px 0 6px;
}

.mosaic-feat {
	position: relative;
	display: flex;
	gap: 14px;
	padding: 22px 20px;
	background: #fff;
	border: 1px solid #ededE8;
	border-radius: 10px;
	box-sizing: border-box;
}

.mosaic-feat__icon {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	color: #2c2c2a;
}

.mosaic-feat__title {
	margin: 0 0 7px;
	font-size: 16px;
	font-weight: 700;
	color: #1d1d1f;
	line-height: 1.3;
}

.mosaic-feat__text {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.75;
	color: #6a6a65;
}

.mosaic-feat__text strong {
	color: #b3261e;
	font-weight: 700;
}

@media (max-width: 1024px) {
	.mosaic-feats {
		grid-template-columns: repeat(2, 1fr);
	}

	.mosaic-hero__title {
		font-size: 27px;
	}

	.mosaic-hero__card {
		padding: 34px 26px 26px;
	}
}

@media (max-width: 640px) {
	.mosaic-feats {
		grid-template-columns: 1fr;
	}

	.mosaic-hero {
		padding: 34px 14px 38px;
	}

	.mosaic-hero__btn {
		height: 52px;
		font-size: 15px;
	}
}

/* =====================================================================
   四、全站页脚（参考设计稿：四项保障条 + 四列页脚 + 版权条）
   模板：theme/terry/theme01/widgets/footer.php
   ===================================================================== */
.mt-footer {
	margin-top: 0;
	background: #fff;
	color: #1b1b1b;
	font-size: 13px;
}

.mt-footer__wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
	min-height: 0;
}

/* 页脚与上方内容的间距：站点原为 50px，略收紧以贴近设计稿的紧凑节奏 */
.footer-container {
	margin-top: 36px;
}

/* ---- ① 四项保障条 ---- */
.mt-footer__benefits {
	background: #fff;
	border-bottom: 1px solid #ececec;
	padding: 34px 0 32px;
}

.mt-footer__benefits-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px 24px;
}

.mt-benefit {
	text-align: center;
	padding: 0 8px;
}

.mt-benefit__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	color: #1a1a1a;
}

.mt-benefit__title {
	margin: 10px 0 7px;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 700;
	color: #161616;
	letter-spacing: .1px;
}

.mt-benefit__text {
	margin: 0 auto;
	max-width: 250px;
	font-size: 12.5px;
	line-height: 1.65;
	color: #4d4d4d;
}

/* ---- ② 页脚主体 ---- */
.mt-footer__main {
	background: #f7f7f7;
	padding: 42px 0 38px;
}

.mt-footer__grid {
	display: grid;
	grid-template-columns: 1.25fr .95fr 1.05fr 1.45fr;
	gap: 20px 44px;
	align-items: start;
}

.mt-footer__title {
	margin: 0 0 16px;
	font-size: 11.5px;
	line-height: 1.5;
	font-weight: 700;
	letter-spacing: .9px;
	text-transform: uppercase;
	color: #1b1b1b;
}

.mt-footer__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

/* 注意：fecshop 全局 `a:link{background-color:transparent}` 特异性为 (0,1,1)，
   这里用 `.mt-footer a.mt-social`（0,2,1）确保边框与底色不被覆盖 */
.mt-footer a.mt-social {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background-color: #fff;
	border: 1px solid #d8d8d8;
	border-radius: 5px;
	color: #1b1b1b;
	text-decoration: none;
	transition: border-color .18s, color .18s, background-color .18s;
}

.mt-footer a.mt-social:hover {
	border-color: #1b1b1b;
	color: #000;
	background-color: #fff;
}

.mt-footer__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-footer__links li {
	margin: 0;
	padding: 0;
	line-height: 2.05;
}

.mt-footer__links a {
	font-size: 13px;
	color: #3d3d3d;
	text-decoration: none;
}

.mt-footer__links a:hover {
	color: #000;
	text-decoration: underline;
}

/* 订阅邮件 */
.mt-footer__news-text {
	margin: 0 0 14px;
	max-width: 340px;
	font-size: 13px;
	line-height: 1.7;
	color: #3d3d3d;
}

.mt-footer__form {
	position: relative;
	display: flex;
	align-items: stretch;
	max-width: 340px;
	height: 40px;
}

.mt-footer__form-icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	color: #8a8a8a;
	pointer-events: none;
}

/* 可访问性：标签只给读屏，不占视觉空间 */
.mt-footer__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.mt-footer .mt-footer__input {
	flex: 1 1 0%;
	width: auto;
	height: 40px;
	min-width: 0;
	margin: 0;
	padding: 0 12px 0 36px;
	background: #fff;
	border: 1px solid #cfcfcf;
	border-right: 0;
	border-radius: 3px 0 0 3px;
	box-sizing: border-box;
	font-size: 13px;
	color: #1b1b1b;
	-webkit-appearance: none;
	appearance: none;
}

.mt-footer .mt-footer__input:focus {
	outline: none;
	border-color: #8a8a8a;
}

.mt-footer .mt-footer__input::placeholder {
	color: #9a9a9a;
}

.mt-footer button.mt-footer__submit {
	height: 40px;
	margin: 0;
	padding: 0 20px;
	background-color: #2a2a2a;
	border: 0;
	border-radius: 0 3px 3px 0;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 40px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .18s;
}

.mt-footer button.mt-footer__submit:hover {
	background-color: #111;
	color: #fff;
}

.mt-footer__payments {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 9px;
	margin-top: 16px;
}

.mt-footer__pay {
	display: flex;
	align-items: center;
	line-height: 0;
}

.mt-footer__pay svg {
	display: block;
}

/* ---- ③ 版权条 ---- */
.mt-footer__bottom {
	background: #f7f7f7;
	border-top: 1px solid #e8e8e8;
	padding: 15px 0 17px;
}

.mt-footer__copy {
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: #6d6d6d;
	text-align: center;
}

/* ============================================
 * 首页「全部商品」区块（theme terry/theme01）
 * 数据来源：Cms/block/home/Index::getAllProducts()
 * 商品条目价格复用 category/price 组件的 .c_price 结构
 * ============================================ */
.home-products {
	margin: 48px auto 0;
	max-width: 1200px;
	padding: 0 20px;
}

.home-products__head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 20px;
}

.home-products__title {
	border-bottom: 2px solid #2a2a2a;
	font-size: 22px;
	font-weight: 700;
	margin: 0;
	padding-bottom: 8px;
}

.home-products__count {
	color: #8a8a8a;
	font-size: 13px;
}

.home-products__grid {
	display: grid;
	gap: 24px 16px;
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.home-products__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.home-products__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.home-product {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.home-product:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

.home-product__imgwrap {
	display: block;
	padding: 12px;
}

.home-product__img {
	display: block;
	height: auto;
	width: 100%;
}

.home-product__name {
	font-size: 13px;
	line-height: 1.5;
	margin: 0 12px;
	max-height: 40px;
	overflow: hidden;
}

.home-product__name a {
	color: #333;
	text-decoration: none;
}

.home-product__name a:hover {
	color: #c00;
}

/* 价格区沿用 category/price 组件输出，只做间距归位 */
.home-product .c_price {
	margin: 8px 12px 14px;
}

.home-product .c_price .price {
	color: #c00;
	font-size: 15px;
	font-weight: 700;
}

.home-product .c_price .special_price {
	color: #999;
	font-size: 12px;
	text-decoration: line-through;
}

.home-products__pager {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 28px;
}

.home-products__page {
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #333;
	cursor: pointer;
	font-size: 13px;
	min-width: 32px;
	padding: 6px 10px;
	text-align: center;
	text-decoration: none;
}

.home-products__page:hover {
	border-color: #2a2a2a;
}

.home-products__page.is-current {
	background: #2a2a2a;
	border-color: #2a2a2a;
	color: #fff;
	cursor: default;
}

.home-products__empty {
	color: #8a8a8a;
	text-align: center;
}

/* ============================================
 * 登录页第三方登录按钮（Facebook / Google）
 * 模板：vendor/.../theme/base/front/customer/account/login.php
 * 图标为内联 SVG，不依赖 image_domain 与图片文件
 * ============================================ */
.account-login .fago_login {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
}

.social-login-btn {
	align-items: center;
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	color: #333;
	cursor: pointer;
	display: inline-flex;
	flex: 1 1 0;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	line-height: 1;
	min-width: 130px;
	padding: 10px 14px;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.social-login-btn:hover {
	background: #fafafa;
	border-color: #b5b5b5;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.social-login-btn:focus-visible {
	border-color: #2a2a2a;
	box-shadow: 0 0 0 2px rgba(42, 42, 42, .18);
	outline: none;
}

.social-login-btn__icon {
	display: inline-flex;
	height: 18px;
	line-height: 0;
	width: 18px;
}

.social-login-btn__icon svg {
	display: block;
	height: 18px;
	width: 18px;
}

.social-login-btn__text {
	white-space: nowrap;
}
