/*
Theme Name: IRUFA
Theme URI: https://irufa.com
Author: IRUFA
Author URI: https://irufa.com
Description: IRUFA Industrial Group - 高端骨科护理产品 WordPress 主题
Version: 1.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: irufa
*/

/*
 * 主要样式由 css/index.css 提供（与原始 HTML 完全一致）。
 * 本文件仅包含 WordPress 块编辑器所需的覆盖样式。
 */

/* 重置块模板间隙 */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* 块编辑器链接按钮样式兼容 */
.buttonLine .wp-element-button,
a.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 34px;
	gap: 12px;
	border: 1px solid #22c96f;
	border-radius: 999px;
	background: transparent;
	color: #22c96f;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	transition: color 0.28s, background 0.28s, transform 0.28s, box-shadow 0.28s;
}

.buttonLine .wp-element-button:hover,
.buttonLine .wp-element-button:focus,
a.wp-element-button:hover,
a.wp-element-button:focus {
	color: #fff;
	background: #22c96f;
	box-shadow: 0 14px 30px rgba(242, 122, 26, 0.22);
	transform: translateY(-2px);
}

/* 块编辑器按钮 class 兼容 */
.FeaturedProducts .tabBar .wp-element-button.active {
	border-color: #22c96f;
	color: #fff;
	background: #22c96f;
}

.ProductDetailContent .productDetailTabs .wp-element-button.active,
.ProductDetailContent .productDetailTabs .wp-element-button:hover {
	color: #007a3d;
}

.ProductFilter .item .wp-element-button.active,
.ProductFilter .item .wp-element-button:hover {
	border-color: #22c96f;
	color: #fff;
	background: #22c96f;
}

/* 文章详情内容区 */
.single-post .ProductDetailContent {
	padding: 60px 0 90px;
}

/* 新闻详情图片切换相册 */
.NewsArticle .articleMedia.newsGallerySwitcher {
	height: auto;
	overflow: visible;
	border-radius: 0;
	background: transparent;
}

.newsGalleryStage {
	position: relative;
	height: 420px;
	overflow: hidden;
	border-radius: 24px;
	background: #f2f2f2;
}

.NewsArticle .newsGalleryStage > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.18s ease;
}

.newsGalleryPrev,
.newsGalleryNext {
	position: absolute;
	top: 50%;
	display: grid;
	width: 42px;
	height: 42px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: #22c96f;
	font-size: 27px;
	line-height: 1;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
	transform: translateY(-50%);
	cursor: pointer;
	transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.newsGalleryPrev { left: 14px; }
.newsGalleryNext { right: 14px; }

.newsGalleryPrev:hover,
.newsGalleryNext:hover,
.newsGalleryPrev:focus-visible,
.newsGalleryNext:focus-visible {
	background: #22c96f;
	color: #fff;
	transform: translateY(-50%) scale(1.06);
}

.newsGalleryCounter {
	position: absolute;
	right: 14px;
	bottom: 14px;
	padding: 6px 11px;
	border-radius: 999px;
	background: rgba(8, 28, 17, 0.72);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.newsGalleryThumbs {
	display: flex;
	justify-content: safe center;
	gap: 10px;
	margin-top: 12px;
	padding: 2px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.newsGalleryThumbs button {
	width: 70px;
	height: 56px;
	padding: 0;
	flex: 0 0 70px;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #f2f2f2;
	cursor: pointer;
	opacity: 0.62;
	transition: border-color 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
}

.newsGalleryThumbs button.active,
.newsGalleryThumbs button:hover,
.newsGalleryThumbs button:focus-visible {
	border-color: #22c96f;
	opacity: 1;
	transform: translateY(-2px);
}

.NewsArticle .newsGalleryThumbs img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1200px) {
	.newsGalleryStage { height: 320px; }
}

@media (max-width: 600px) {
	.newsGalleryPrev,
	.newsGalleryNext {
		width: 38px;
		height: 38px;
	}

	.newsGalleryPrev { left: 10px; }
	.newsGalleryNext { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.NewsArticle .newsGalleryStage > img,
	.newsGalleryPrev,
	.newsGalleryNext,
	.newsGalleryThumbs button {
		transition: none;
	}
}

/* 编辑器 iframe 内部左右边距（所有 post type） */
.is-root-container,
.editor-styles-wrapper,
.block-editor-writing-flow {
	padding-left: 12px !important;
	padding-right: 12px !important;
}
