/*
Theme Name: 浆果有礼
Description: 浆果有礼网站专用子主题
Author: syx0218
Template: twentytwentyfive
Version: 1.1.26
Text Domain: jiangguo-gift
*/

body.page .wp-block-post-title,
body.page .entry-title {
	display: none !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.home .wp-block-image img,
body.blog .wp-block-image img {
	width: 100%;
	height: auto;
}

body.home .gift-icon-gallery .jg-home-icon-link,
body.blog .gift-icon-gallery .jg-home-icon-link {
	position: relative;
	display: block;
	color: inherit;
}

body.home .gift-icon-gallery .jg-home-icon-link::after,
body.blog .gift-icon-gallery .jg-home-icon-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 46px;
}

body.home .gift-icon-gallery .jg-home-icon-link img,
body.blog .gift-icon-gallery .jg-home-icon-link img {
	cursor: pointer;
	transition: transform 180ms ease;
}

body.home .gift-icon-gallery .jg-home-icon-link:hover img,
body.blog .gift-icon-gallery .jg-home-icon-link:hover img {
	transform: scale(1.04);
}

/* 二级目录页（中秋大列表 / 单品合集空白页）主题色 */
body.jg-catalog-shell .berry-catalog {
	--orange: #05a7c4;
}

body.jg-catalog-shell .jg-catalog-home {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	margin: 0 auto 18px 0 !important;
	align-self: start;
	justify-self: start;
	padding: 10px 18px 10px 14px;
	border: 1.5px solid #05a7c4;
	border-radius: 999px;
	background: #fff;
	color: #05a7c4 !important;
	box-shadow: 0 8px 20px rgba(5, 167, 196, 0.12);
	font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	font-size: 15px;
	font-weight: 650;
	letter-spacing: 0.04em;
	line-height: 1;
	text-decoration: none !important;
	transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

body.jg-catalog-shell .jg-catalog-home-icon {
	display: block;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
}

body.jg-catalog-shell .jg-catalog-home:hover {
	background: #05a7c4;
	color: #fff !important;
	box-shadow: 0 10px 24px rgba(5, 167, 196, 0.22);
	transform: translateY(-1px);
}

body.jg-catalog-shell .jg-catalog-home:active {
	transform: translateY(0) scale(0.98);
}

body.jg-catalog-shell .jg-catalog-home:focus-visible {
	outline: 3px solid rgba(5, 167, 196, 0.35);
	outline-offset: 3px;
}

@media (max-width: 600px) {
	body.jg-catalog-shell .jg-catalog-home {
		margin: 0 auto 14px 0 !important;
		padding: 9px 14px 9px 12px;
		font-size: 14px;
	}
}

body.jg-catalog-shell .berry-catalog .berry-filter-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body.jg-catalog-shell .berry-catalog .berry-search-box {
	border-color: #05a7c4;
	box-shadow: 0 7px 24px rgba(5, 167, 196, 0.08);
}

body.jg-catalog-shell .berry-catalog .berry-search-button {
	background: #05a7c4;
}

body.jg-catalog-shell .berry-catalog .berry-search-button:hover {
	background: #0493ad;
}

body.jg-catalog-shell .berry-catalog .berry-product-price {
	color: #05a7c4;
}

body.jg-catalog-shell .berry-catalog a.berry-product-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

body.jg-catalog-shell .berry-catalog a.berry-product-link .berry-product-image {
	cursor: pointer;
}

body.jg-catalog-shell .berry-catalog .berry-product-image:not(:has(img)) {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #eef3f5;
	border: 1.5px dashed #b7d6dd;
}

body.jg-catalog-shell .berry-catalog .berry-product-image:not(:has(img))::after {
	content: "待上架";
	color: #8aa0a6;
	font-size: 14px;
	font-weight: 560;
}

body.jg-can-edit-catalog .berry-catalog .berry-product-image:not(:has(img)) {
	cursor: pointer;
}

body.jg-can-edit-catalog .berry-catalog .berry-product-image:not(:has(img))::after {
	content: "点击插入主图";
	color: #05a7c4;
}

body.jg-catalog-shell .jg-card-edit-detail {
	display: inline-block;
	margin-top: 6px;
	padding: 4px 0;
	color: #05a7c4 !important;
	font-size: 13px;
	font-weight: 650;
	text-decoration: none !important;
}

body.jg-catalog-shell .jg-card-edit-detail:hover {
	text-decoration: underline !important;
}

body.single-jg_product .jg-product-detail,
body.page-template-product-detail .jg-product-detail {
	--orange: #05a7c4;
}

body.single-jg_product .jg-product-price,
body.page-template-product-detail .jg-product-price {
	margin: 8px 0 28px;
	color: var(--orange, #05a7c4);
	font-size: 28px;
	font-weight: 720;
	text-align: center;
}

body.single-jg_product .jg-product-gallery,
body.single-jg_product .wp-block-gallery.jg-product-gallery,
body.page-template-product-detail .jg-product-gallery,
body.page-template-product-detail .wp-block-gallery.jg-product-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
}

body.single-jg_product .jg-product-gallery .wp-block-image,
body.single-jg_product .wp-block-gallery.jg-product-gallery .wp-block-image,
body.page-template-product-detail .jg-product-gallery .wp-block-image,
body.page-template-product-detail .wp-block-gallery.jg-product-gallery .wp-block-image {
	margin: 0 !important;
}

body.single-jg_product .jg-product-gallery img,
body.single-jg_product .wp-block-gallery.jg-product-gallery img,
body.page-template-product-detail .jg-product-gallery img,
body.page-template-product-detail .wp-block-gallery.jg-product-gallery img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 12px;
	background: #f5f5f5;
}

@media (max-width: 820px) {
	body.single-jg_product .jg-product-gallery,
	body.single-jg_product .wp-block-gallery.jg-product-gallery,
	body.page-template-product-detail .jg-product-gallery,
	body.page-template-product-detail .wp-block-gallery.jg-product-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	body.single-jg_product .jg-product-gallery,
	body.single-jg_product .wp-block-gallery.jg-product-gallery,
	body.page-template-product-detail .jg-product-gallery,
	body.page-template-product-detail .wp-block-gallery.jg-product-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	body.single-jg_product .jg-product-price,
	body.page-template-product-detail .jg-product-price {
		font-size: 22px;
	}
}

/* 全站图片水印（首页除外：节日图标 ::after 用于显示分类文字） */
body:not(.home) :is(
	figure.wp-block-image,
	figure.berry-product-image,
	a.berry-product-image,
	.gift-main-image,
	.gift-product-intro-grid figure,
	.berry-pd2-item,
	.wp-block-post-featured-image
):has(img) {
	position: relative;
}

body:not(.home) :is(
	figure.wp-block-image,
	figure.berry-product-image,
	a.berry-product-image,
	.gift-main-image,
	.gift-product-intro-grid figure,
	.berry-pd2-item,
	.wp-block-post-featured-image
):has(img)::after {
	content: "浆果有礼";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	padding: 6px 16px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.22);
	color: rgba(255, 255, 255, 0.88);
	font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	font-size: clamp(14px, 3.5vw, 24px);
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}

/* 商品集合页：缩略图小，水印缩小 */
body.jg-catalog-shell :is(
	figure.berry-product-image,
	a.berry-product-image
):has(img)::after {
	font-size: clamp(9px, 1.8vw, 11px);
	padding: 2px 6px;
	letter-spacing: 0.04em;
}
