/* 字型設定 - 與主樣式文件保持一致 */
* {
    font-family: 'Noto Sans TC', 'Taipei Sans TC Beta', 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    text-align: left; /* 確保對齊為主 */
}

/* 聯絡我們標籤頁樣式 */
.contact-tabs {
	position: relative;
	width: 100vw;
	height: auto;
	min-height: 100vh;
	overflow: hidden;
	margin: 0;
	padding: 0;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	margin-top: 0;
	margin-bottom: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.contact-tabs-background {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
}

.contact-tabs-layout {
	display: grid;
	grid-template-columns: 3fr 7fr; /* 左 30% / 右 70% */
	gap: 24px;
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px 20px 20px;
	background: transparent;
	margin-top: 0;
	margin-bottom: 0;
}

.contact-tabs-right {
	background: rgba(255, 255, 255, 0.96);
	padding: 16px 20px;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 520px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.contact-tabs-left {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center; /* 水平置中 */
	justify-content: center; /* 垂直置中 */
}

.contact-form-text {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-bottom: 8px; /* 与下方按钮保持间距 */
	transform: translateX(-150px); /* 电脑端向左移动30px */
}

.contact-form-text-img {
	max-width: 100%;
	width: 72%; /* 調整為原本的 80% */
	height: auto;
	display: block;
}

.contact-cta { 
	display: flex; 
	justify-content: center; 
	width: 100%; 
	transition: all 0.3s ease;
}

.contact-cta-link {
	display: block;
	text-decoration: none;
	width: 100%;
	transition: all 0.3s ease;
}

/* 桌面端按钮容器 hover 效果 */
.contact-cta:hover {
	transform: translateY(-2px);
}

.contact-cta.second:hover {
	transform: translateY(-2px);
}

.contact-cta-img {
	max-width: 100%;
	width: 64%; /* 調整為原本的 80% */
	height: auto;
	display: block;
	transition: all 0.3s ease;
	cursor: pointer;
}

/* 桌面端 hover 特效 */
.contact-cta-link:hover .contact-cta-img {
	transform: translateY(-8px) scale(1.05);
	filter: brightness(1.05);
}

.contact-cta-link:active .contact-cta-img {
	transform: translateY(-4px) scale(1.02);
	transition: all 0.1s ease;
}

/* 桌面版優化 - 確保與footer無空白 */
@media (min-width: 769px) {
	.contact-tabs {
		margin-bottom: 0 !important;
		padding-bottom: 0 !important;
	}
	
	.contact-tabs-layout {
		margin-bottom: 0 !important;
		padding-bottom: 20px !important;
	}
}

.contact-tabs-nav {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	border-bottom: 1px solid #ddd;
	padding-bottom: 12px;
	margin-bottom: 16px;
}

.contact-tabs .tab-item {
	appearance: none;
	border: none;
	background: transparent;
	padding: 8px 0;
	font-size: 16px;
	color: #333;
	cursor: pointer;
	position: relative;
}

.contact-tabs .tab-item.active::after {
	content: '';
	display: block;
	position: absolute;
	left: 0;
	bottom: -13px;
	width: 180px;
	height: 5px;
	background: #2a63a6;
}

/* 确保电脑端的选中效果保持不变 */
.contact-tabs .tab-item.active {
	background: transparent;
	color: #333;
	border: none;
	font-weight: normal;
	box-shadow: none;
	transform: none;
}

.contact-tabs-panels .tab-panel {
	display: none;
}

.contact-tabs-panels .tab-panel.active {
	display: block;
}

/* 門市卡片小方塊版型 */
.contact-store-grid {
	/* 桌機版：改為單行橫向滑動的卡片列 */
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	justify-content: flex-start;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 16px;
	-webkit-overflow-scrolling: touch;
}

.contact-store-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* 桌機端預設一行約 4 張卡片 */
	flex: 0 0 25%;
	max-width: 25%;
	scroll-snap-align: start;
}

.contact-store-card {
	background: #ffffff;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
	width: 100%;
	/* 讓卡片維持正方形，小螢幕會自動縮放 */
	aspect-ratio: 1 / 1;
	overflow: hidden;
	align-self: stretch;
}

.contact-store-title {
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #1f3556;
	text-align: center;
	white-space: nowrap;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #ffffff;
	border: 1px solid #2a63a6;
	border-radius: 4px;
	padding: 4px 8px;
	display: block;
	box-sizing: border-box;
}

.contact-store-map-embed {
	width: 100%;
	height: 100%;
}

.contact-store-map-embed iframe {
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
}

.contact-store-empty {
	font-size: 14px;
	color: #555;
	margin: 4px 0;
}

/* 行動版左右切換按鈕（預設桌機隱藏） */
.contact-store-nav {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 10px;
}

.contact-store-nav-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #2a63a6;
	background: #2a63a6;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	box-shadow: 0 2px 4px rgba(0,0,0,0.12);
	transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-store-nav-btn:hover {
	background: #1f4c86;
	color: #ffffff;
	box-shadow: 0 3px 6px rgba(0,0,0,0.18);
	transform: translateY(-1px);
}

.contact-store-nav-btn:active {
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.contact-store-nav-icon {
	display: inline-block;
	font-size: 20px;
	line-height: 1;
	transform: translateY(-1px); /* 微調垂直置中 */
}

.contact-address {
	font-size: 18px;
	margin: 12px 0 16px 0;
	color: #333;
}

.contact-info-item {
	margin-bottom: 8px;
	line-height: 1.5;
}

.contact-info-item:last-child {
	margin-bottom: 0;
}

.contact-map-wrapper {
	/* 桌機版：再略放大一些，讓視覺寬度更貼近上方灰色底線 */
	width: 108%;
	max-width: none;
	margin: 0 -4%;
}

.contact-map-wrapper iframe {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 行動裝置端優化 */
@media (max-width: 768px) {
	/* 鎖死行動裝置左右滾軸 */
	html, body {
		overflow-x: hidden;
		position: relative;
		width: 100%;
		max-width: 100vw;
	}
	
	.contact-tabs {
		margin: 0;
		padding: 0;
		height: auto;
		min-height: auto;
		width: 100vw;
		margin-left: calc(-50vw + 50%);
		margin-right: calc(-50vw + 50%);
		padding-bottom: 20px;
	}
	
	/* 商品單頁：刻意與「購買指南」拉開距離 */
	.single-product .contact-tabs {
		margin-top: 60px;
	}
	
	.contact-tabs-background {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.contact-tabs-layout {
		grid-template-columns: 1fr; /* 直向排列 */
		gap: 16px; /* 进一步减少间距 */
		padding: 12px;
		background: transparent;
		margin: 0;
		margin-top: 0;
	}

	.contact-tabs-left {
		order: 1; /* 确保在行动装置端显示在最上方 */
		gap: 10px; /* 进一步减少按钮间距 */
		padding: 12px 0;
		position: relative;
	}

	.contact-tabs-right {
		order: 2; /* 确保在行动裝置端顯示在下方 */
		max-height: none;
		overflow: visible;
		box-shadow: none;
		padding: 12px 10px;
	}

	.contact-form-text {
		transform: translateX(0); /* 行动装置端重置位移，回到居中位置 */
		margin-bottom: 8px;
		position: relative;
		z-index: 1;
	}

	.contact-form-text-img {
		width: 44%; /* 調整為原本的 80% */
		max-width: 200px;
	}

	.contact-cta {
		width: 75%;
		max-width: 240px;
		position: relative;
		z-index: 1;
	}

	.contact-cta-img {
		width: 80%; /* 調整為原本的 80% */
		transition: all 0.15s ease;
	}

	.contact-info-item {
		margin-bottom: 8px;
		font-size: 13px;
		line-height: 1.4;
	}

	.contact-info-item strong {
		color: #2a63a6;
		font-weight: 600;
	}

	/* 行動裝置：放大並置中門市名稱，寬度對齊地圖卡片 */
	.contact-store-title {
		font-size: 16px;
		margin-bottom: 10px;
		width: 100%;
		white-space: normal;
		text-overflow: clip;
		background: #ffffff;
		border: 1px solid #2a63a6;
		border-radius: 4px;
		padding: 6px 12px;
		display: block;
		box-sizing: border-box;
	}

	.contact-info-item a {
		color: #2a63a6;
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.contact-info-item a:hover {
		color: #1a4a8a;
		text-decoration: underline;
	}

	.contact-cta-img:hover {
		transform: translateY(-1px) scale(1.01);
	}

	/* 觸控優化 */
	.contact-cta-img:active {
		transform: translateY(0) scale(0.99);
		transition: all 0.1s ease;
	}

	.contact-tabs-nav {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		padding: 0 0 12px 0;
		border-bottom: 1px solid #e0e0e0;
		margin-bottom: 16px;
	}

	.contact-tabs-panels {
		max-height: none;
		overflow: visible;
	}

	/* 行動裝置：顯示左右切換按鈕 */
	.contact-store-nav {
		display: flex;
	}

	/* 行動裝置：一次只顯示一張卡片，其餘隱藏，透過左右鍵切換 */
	.contact-store-grid {
		display: block;
		overflow: hidden;
	}

	.contact-store-item {
		display: none;
		flex: none;
		max-width: 100%;
	}

	.contact-store-item.is-active {
		display: block;
	}

	.contact-store-card {
		font-size: 11px;
	}

	.contact-tabs .tab-item {
		flex: 1;
		min-width: 0;
		padding: 10px 8px;
		font-size: 13px;
		font-weight: 500;
		text-align: center;
		border-radius: 6px;
		background: transparent;
		transition: all 0.2s ease;
		border: 1px solid #e0e0e0;
		min-height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		word-break: break-word;
		color: #666;
		position: relative;
		overflow: hidden;
	}

	.contact-tabs .tab-item:hover {
		background: #f8f9fa;
		border-color: #2a63a6;
		color: #2a63a6;
	}

	.contact-tabs .tab-item.active {
		background: linear-gradient(135deg, #4a90e2 0%, #2a63a6 100%) !important;
		color: white !important;
		border-color: #2a63a6 !important;
		font-weight: 700 !important;
		box-shadow: 0 2px 8px rgba(42, 99, 166, 0.3) !important;
		transform: translateY(-1px) !important;
	}

	.contact-tabs .tab-item.active::after {
		display: none; /* 移除桌面端的下劃線 */
	}

	/* 觸控優化 */
	.contact-tabs .tab-item:active {
		transform: scale(0.98);
	}

	/* 确保按钮文字不会换行 */
	.contact-tabs .tab-item span {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.contact-address {
		font-size: 13px;
		margin: 12px 0 16px 0;
		padding: 12px;
		background: #ffffff;
		border-radius: 6px;
		border-left: 3px solid #2a63a6;
		line-height: 1.4;
		box-shadow: 0 1px 2px rgba(0,0,0,0.08);
	}

	.contact-map-wrapper {
		border-radius: 6px;
		max-width: 100%; /* 行動裝置地圖維持滿版寬度 */
		width: 100%;
		margin: 0 auto; /* 水平置中整個地圖容器 */
		overflow: hidden;
		box-shadow: 0 1px 4px rgba(0,0,0,0.08);
	}

	.contact-map-wrapper iframe {
		border-radius: 6px;
		height: 200px;
		display: block;       /* 讓 iframe 成為可置中的區塊元素 */
		margin: 0 auto;       /* 保險：若未來調整寬度 < 100%，仍維持置中 */
		transition: transform 0.15s ease;
	}

	.contact-map-wrapper:hover iframe {
		transform: scale(1.005);
	}
}

/* 超小螢幕優化 */
@media (max-width: 480px) {
	/* 鎖死小螢幕行動裝置左右滾軸 */
	html, body {
		overflow-x: hidden;
		position: relative;
		width: 100%;
		max-width: 100vw;
	}
	
	.contact-tabs {
		margin: 0;
		padding: 0;
		width: 100vw;
		margin-left: calc(-50vw + 50%);
		margin-right: calc(-50vw + 50%);
		padding-bottom: 15px;
	}

	.contact-tabs-layout {
		padding: 8px;
		background: transparent;
		margin: 0;
		gap: 12px;
		margin-top: 0;
	}

	.contact-tabs-left {
		padding: 8px 0;
		gap: 6px;
	}

	.contact-form-text-img {
		width: 48%; /* 調整為原本的 80% */
		max-width: 160px;
	}

	.contact-cta {
		width: 80%;
		max-width: 200px;
	}

	.contact-tabs-nav {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		padding: 0 0 8px 0;
		margin-bottom: 12px;
	}

	/* 超小螢幕：同樣一次只顯示一張卡片 */
	.contact-store-grid {
		display: block;
		overflow: hidden;
	}

	.contact-store-item {
		display: none;
		flex: none;
		max-width: 100%;
	}

	.contact-store-item.is-active {
		display: block;
	}

	.contact-store-card {
		font-size: 11px;
	}

	.contact-tabs .tab-item {
		flex: 1;
		min-width: 0;
		padding: 8px 6px;
		font-size: 12px;
		min-height: 36px;
		border-radius: 4px;
		font-weight: 500;
		background: transparent;
		border: 1px solid #e0e0e0;
		color: #666;
		transition: all 0.2s ease;
	}

	.contact-tabs .tab-item:hover {
		background: #f8f9fa;
		border-color: #2a63a6;
		color: #2a63a6;
	}

	.contact-tabs .tab-item.active {
		background: linear-gradient(135deg, #4a90e2 0%, #2a63a6 100%) !important;
		color: white !important;
		border-color: #2a63a6 !important;
		font-weight: 700 !important;
		box-shadow: 0 2px 6px rgba(42, 99, 166, 0.3) !important;
	}

	.contact-tabs .tab-item span {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.contact-address {
		font-size: 12px;
		padding: 10px;
		margin: 8px 0 12px 0;
		line-height: 1.3;
	}

	.contact-info-item {
		margin-bottom: 6px;
		font-size: 12px;
	}

	/* 超小螢幕再微調門市名稱尺寸，避免過大 */
	.contact-store-title {
		font-size: 15px;
		width: 100%;
		background: #ffffff;
		border: 1px solid #2a63a6;
		border-radius: 4px;
		padding: 5px 10px;
		display: block;
		box-sizing: border-box;
	}

	.contact-map-wrapper iframe {
		height: 160px;
		border-radius: 4px;
	}

	.contact-map-wrapper {
		border-radius: 4px;
		width: 100%;
		max-width: 100%;
		margin: 0 auto; /* 超小螢幕保持水平置中 */
		box-shadow: 0 1px 2px rgba(0,0,0,0.06);
	}
}

/* 動畫效果 */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 中等屏幕优化 */
@media (min-width: 481px) and (max-width: 768px) {
	.contact-tabs-nav {
		gap: 10px;
	}

	.contact-tabs .tab-item {
		padding: 12px 10px;
		font-size: 14px;
		min-height: 44px;
	}
}

/* 确保在极小屏幕上也能正常显示 */
@media (max-width: 360px) {
	.contact-tabs-nav {
		gap: 4px;
	}

	.contact-tabs .tab-item {
		padding: 6px 4px;
		font-size: 11px;
		min-height: 32px;
		border-radius: 3px;
	}

	.contact-tabs .tab-item span {
		font-size: 11px;
	}
}




