/**
 * 全站自适应 / 多端兼容
 * 断点约定：1450 / 1100 / 1024 / 768 / 640 / 480
 */

/* ── 全局媒体与溢出 ── */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

iframe {
	max-width: 100%;
}

.site-main iframe,
.site-main embed,
.site-main video {
	max-width: 100%;
}

.site-main .alignleft,
.site-main .alignright {
	max-width: 100%;
}

@media (max-width: 640px) {
	.site-main img.alignleft,
	.site-main .alignleft,
	.site-main img.alignright,
	.site-main .alignright {
		float: none;
		display: block;
		margin: 0 auto 1em;
	}
}

/* 编辑器宽表：限制宽度，避免撑破布局 */
.site-main table {
	max-width: 100%;
}

.wp-block-table,
.table-scroll {
	display: block;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* 长单词 / URL 换行 */
.site-main,
.site-footer,
.float-contact__text,
.search-result-excerpt {
	overflow-wrap: anywhere;
	word-wrap: break-word;
}

/* ── 导航安全区 ── */
@supports (padding: env(safe-area-inset-top)) {
	#nav {
		padding-left: env(safe-area-inset-left);
		padding-right: env(safe-area-inset-right);
	}
}

/* ── 页脚 ── */
@media (max-width: 1024px) {
	.site-footer .footer-brand__logo img {
		max-width: 160px;
		height: auto;
	}

	.site-footer .footer-cta__title {
		font-size: clamp(22px, 4vw, 32px);
	}
}

@media (max-width: 768px) {
	.site-footer .footer-cta__btn {
		width: 100%;
		justify-content: center;
	}

	.site-footer .footer-bottom {
		gap: 12px;
	}

	.site-footer .footer-sitemap-link {
		white-space: nowrap;
	}
}

/* ── 浮动通讯：小屏缩小触控区，避免挡内容 ── */
@media (max-width: 480px) {
	.float-contact {
		transform: translateY(-50%) scale(0.92);
		transform-origin: right center;
	}

	.float-contact__link:hover .float-contact__text,
	.float-contact__link:focus-visible .float-contact__text {
		width: min(265px, calc(100vw - 64px));
	}
}

/* ── 内页 Banner ── */
@media (max-width: 768px) {
	#page-banner .banner-content {
		padding-left: 16px;
		padding-right: 16px;
	}

	.breadcrumb-nav {
		font-size: 11px;
		gap: 6px;
		margin-bottom: 12px;
	}
}

/* ── 分页按钮 ── */
@media (max-width: 640px) {
	.pagination .page-numbers a,
	.pagination .page-numbers span,
	.navigation.pagination .page-numbers {
		min-width: 36px;
		height: 36px;
		font-size: 13px;
	}
}

/* ── 搜索结果 ── */
@media (max-width: 640px) {
	.site-search {
		padding: 40px 0;
	}

	.search-result-item {
		padding: 18px 16px;
	}

	.search-result-item .entry-title {
		font-size: 18px;
	}

	.search-inline-form {
		flex-direction: column;
		max-width: 100%;
	}

	.search-inline-form button {
		width: 100%;
		height: 44px;
	}
}

/* ── 联系页 ── */
@media (max-width: 640px) {
	.site-page-contact .contact-form-block__form input.wpcf7-submit,
	.site-page-contact .contact-form-block__form .wpcf7-submit {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.site-page-contact .contact-form-captcha {
		grid-template-columns: minmax(0, 1fr) 110px;
	}

	.site-page-contact .contact-map__frame iframe,
	.site-page-contact .contact-map__frame img {
		min-height: 240px;
	}
}

/* ── 产品 / 案例详情翻页 ── */
@media (max-width: 640px) {
	.site-single-products .prod-detail-pager,
	.site-single-projects .proj-detail-pager {
		flex-direction: column;
		gap: 12px;
	}

	.site-single-products .prod-detail-pager__btn,
	.site-single-projects .proj-detail-pager__btn {
		width: 100%;
		min-width: 0;
	}
}

/* ── 产品详情图库：平板/手机流体 + 竖排改横滑 ── */
@media (max-width: 1100px) {
	.site-single-products .prod-detail-hero__grid,
	.site-single-products .prod-gallery,
	.site-single-products .prod-gallery__stage,
	.site-single-products .prod-detail-info {
		min-width: 0;
		max-width: 100%;
	}
}

@media (max-width: 768px) {
	.site-single-products .prod-gallery {
		display: flex;
		flex-direction: column;
		grid-template-columns: none;
		gap: 12px;
		width: 100%;
		max-width: 100%;
	}

	.site-single-products .prod-gallery__stage {
		order: 1;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0;
		height: auto !important;
		aspect-ratio: 1 / 1;
	}

	.site-single-products .prod-gallery__thumbs-wrap {
		order: 2;
		width: 100%;
		height: auto;
		min-width: 0;
	}

	.site-single-products .prod-gallery__thumbs {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
		height: auto;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
	}

	.site-single-products .prod-gallery__thumb {
		flex: 0 0 72px;
		width: 72px;
		height: 72px;
		min-width: 72px;
	}

	.site-single-products .prod-detail-info__quote {
		width: 100%;
		max-width: 100%;
	}

	.site-single-products .prod-detail-info__title {
		font-size: clamp(24px, 7vw, 34px);
	}
}

/* ── 板块内间距：PC 80/96/100 → 手机 40 ── */
@media (max-width: 768px) {
	.site-front .products-block,
	.site-front .workflow-block,
	.site-front .about-block,
	.site-front .why-block,
	.site-front .oem-detail-block,
	.site-front .ws-block,
	.site-front .conv-block,
	.site-front .partner-block {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.site-front .faq-block {
		padding-top: 40px;
		padding-bottom: 0;
	}

	.site-page-about .intro-block,
	.site-page-about .advantages-block,
	.site-page-about .gallery-block,
	.site-page-about .process-block {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.site-archive-products .prod-archive,
	.site-archive-projects .proj-archive,
	.site-search {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.site-single-products .prod-detail-hero,
	.site-single-products .prod-detail-bott,
	.site-single-products .prod-related {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.site-front .products-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}

	.site-front .products-head-logo img,
	.site-front .workflow-head-logo img,
	.site-front .conv-head-logo img,
	.site-front .faq-head-logo img {
		height: 56px;
		width: auto;
		max-width: 140px;
		object-fit: contain;
	}

	.site-front .product-title-bar h3 {
		font-size: 15px;
	}

	.site-front .container {
		padding-left: 16px;
		padding-right: 16px;
	}
}

@media (max-width: 480px) {
	.site-front .products-grid {
		grid-template-columns: 1fr;
	}

	.site-front .why-strip {
		grid-template-columns: 1fr 1fr;
		row-gap: 24px;
	}

	.site-front .btn-primary,
	.site-front .btn-outline {
		width: 100%;
		justify-content: center;
	}
}

/* ── Sitemap ── */
@media (max-width: 640px) {
	.site-page-sitemap .sitemap-panel {
		padding: calc(32px + var(--nav-height)) 0 48px;
	}

	.site-page-sitemap .sitemap-section__title {
		font-size: 20px;
	}
}
