.berry-product-detail-page {
	--berry-detail-accent: #05a7c4;
	--berry-detail-text: #25292d;
	--berry-detail-muted: #687078;
	--berry-detail-border: #eceff1;
	--berry-detail-surface: #f8f9fa;
	background: #fff;
}

.berry-product-detail-page .wp-site-blocks > main {
	margin-block-start: 0 !important;
}

.berry-product-detail-page .wp-site-blocks > main > .wp-block-group.alignfull {
	padding: 32px 24px 64px !important;
}

.berry-product-detail-page .entry-content.wp-block-post-content {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.berry-product-detail-page .wp-block-post-title,
.berry-product-detail-page .entry-title {
	display: none !important;
}

.berry-product-detail-page .entry-content > .gift-product-detail,
.berry-product-detail-page .gift-product-detail {
	width: 100% !important;
	max-width: 1280px !important;
	margin: 0 auto !important;
	padding: 0;
	color: var(--berry-detail-text);
}

.berry-product-detail-page .gift-product-detail *,
.berry-product-detail-page .gift-product-detail *::before,
.berry-product-detail-page .gift-product-detail *::after {
	box-sizing: border-box;
}

.berry-product-detail-page .gift-product-layout {
	display: grid;
	grid-template-columns: 96px minmax(0, 600px) minmax(340px, 1fr);
	grid-template-areas:
		"thumbs main info"
		"thumbs meta info";
	gap: 0 24px;
	align-items: start;
	justify-content: center;
}

.berry-product-detail-page .gift-thumb-column {
	grid-area: thumbs;
	min-width: 0;
}

.berry-product-detail-page .gift-thumb-list {
	display: flex;
	flex-direction: column;
	gap: 11px;
	max-height: 448px;
	padding: 3px 10px 3px 4px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-gutter: stable;
	scrollbar-color: #cdd5d9 transparent;
	scrollbar-width: thin;
}

.berry-product-detail-page .gift-thumb-list::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

.berry-product-detail-page .gift-thumb-list::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: #cdd5d9;
}

.berry-product-detail-page .gift-thumb {
	flex: 0 0 auto;
	width: 80px;
	height: 80px;
	padding: 3px;
	overflow: hidden;
	border: 1px solid #dfe4e7;
	border-radius: 11px;
	background: #fff;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 140ms ease, opacity 140ms ease;
}

.berry-product-detail-page .gift-thumb:hover {
	border-color: #aeb9be;
	opacity: 0.88;
	transform: none;
}

.berry-product-detail-page .gift-thumb.is-active {
	padding: 2px;
	border: 2px solid var(--berry-detail-accent);
}

.berry-product-detail-page .gift-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 7px;
	background: #fff;
	object-fit: contain;
	object-position: center;
}

.berry-product-detail-page .gift-main-column {
	grid-area: main;
	width: 100%;
	min-width: 0;
	max-width: 600px;
}

.berry-product-detail-page .gift-main-image {
	position: relative;
	display: grid;
	width: 100%;
	min-height: 0;
	aspect-ratio: 1 / 1;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--berry-detail-border);
	border-radius: 18px;
	background: var(--berry-detail-surface);
	box-shadow: 0 8px 24px rgba(31, 42, 48, 0.04);
}

.berry-product-detail-page .gift-main-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: none;
	padding: 10px;
	border-radius: 17px;
	object-fit: contain;
}

.berry-product-detail-page .gift-carousel-button {
	position: absolute;
	top: 50%;
	display: grid;
	width: 40px;
	height: 40px;
	padding: 0;
	place-items: center;
	border: 1px solid #dfe4e7;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 3px 12px rgba(31, 42, 48, 0.08);
	color: var(--berry-detail-accent);
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.42;
	transform: translateY(-50%);
	transition: opacity 140ms ease, border-color 140ms ease;
}

.berry-product-detail-page .gift-main-image:hover .gift-carousel-button,
.berry-product-detail-page .gift-carousel-button:focus-visible {
	border-color: #c7d1d5;
	opacity: 0.94;
}

.berry-product-detail-page .gift-prev {
	left: 12px;
}

.berry-product-detail-page .gift-next {
	right: 12px;
}

.berry-product-detail-page .gift-gallery-meta {
	grid-area: meta;
	padding-top: 15px;
	text-align: center;
}

.berry-product-detail-page .gift-image-note {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin: 0;
	color: var(--berry-detail-muted);
	font-size: 14px;
	line-height: 1.55;
}

.berry-product-detail-page .gift-carousel-counter {
	margin: 7px 0 0;
	color: #7a838a;
	font-size: 14px;
	line-height: 1.4;
}

.berry-product-detail-page .gift-product-info {
	position: sticky;
	top: 92px;
	grid-area: info;
	min-width: 0;
	padding: 30px;
	border: 1px solid var(--berry-detail-border);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(31, 42, 48, 0.055);
}

.berry-product-detail-page.admin-bar .gift-product-info {
	top: 124px;
}

.berry-product-detail-page .gift-product-title {
	margin: 0 0 20px;
	color: var(--berry-detail-text);
	font-size: clamp(26px, 2vw, 30px);
	font-weight: 680;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.berry-product-detail-page .gift-price {
	display: flex;
	min-width: 0;
	align-items: baseline;
	gap: 3px;
	margin: 0 0 20px;
	padding: 18px 20px;
	border-radius: 12px;
	background: #f1fbfd;
	color: var(--berry-detail-accent);
	font-weight: 700;
	line-height: 1.08;
	overflow-wrap: anywhere;
}

.berry-product-detail-page .gift-price-currency {
	flex: 0 0 auto;
	font-size: 24px;
	font-weight: 700;
}

.berry-product-detail-page .gift-price-currency:empty {
	display: none;
}

.berry-product-detail-page .gift-price-value {
	min-width: 0;
	font-size: clamp(40px, 3.2vw, 46px);
}

.berry-product-detail-page .gift-product-size {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	margin: 0;
	padding: 17px 0;
	border-block: 1px solid var(--berry-detail-border);
	color: #4f575d;
	font-size: 18px;
	line-height: 1.45;
}

.berry-product-detail-page .gift-product-size-label {
	white-space: nowrap;
}

.berry-product-detail-page .gift-product-size strong {
	min-width: 0;
	color: #33393e;
	font-size: 18px;
	font-weight: 600;
	text-align: left;
	word-break: keep-all;
	overflow-wrap: normal;
}

.berry-product-detail-page .gift-variant-grid {
	margin: 24px 0;
	color: #4f575d;
}

.berry-product-detail-page .gift-variant-grid h2 {
	margin: 0 0 13px;
	color: var(--berry-detail-text);
	font-size: 18px;
	font-weight: 680;
	line-height: 1.4;
}

.berry-product-detail-page .gift-feature-list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.berry-product-detail-page .gift-feature-list li {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr);
	gap: 9px;
	align-items: baseline;
	margin: 0;
	color: #50585e;
	font-size: 16px;
	line-height: 1.55;
}

.berry-product-detail-page .gift-feature-list li > span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--berry-detail-accent);
}

.berry-product-detail-page .gift-wechat-contact {
	display: flex;
	width: 100%;
	min-height: 56px;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 10px 14px;
	border-radius: 11px;
	background: var(--berry-detail-accent);
	color: #fff;
	font-size: 18px;
	line-height: 1.35;
	text-align: center;
	cursor: default;
	user-select: text;
}

.berry-product-detail-page .gift-wechat-icon {
	display: inline-flex;
	flex: 0 0 auto;
	margin-right: 4px;
}

.berry-product-detail-page .gift-wechat-icon svg {
	display: block;
}

.berry-product-detail-page .gift-wechat-contact strong {
	font-weight: 750;
}

.berry-product-detail-page .gift-product-intro {
	margin-top: 56px;
}

.berry-product-detail-page .gift-product-intro h2 {
	position: relative;
	margin: 0 0 26px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--berry-detail-border);
	color: var(--berry-detail-text);
	font-size: clamp(26px, 2.2vw, 30px);
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
}

.berry-product-detail-page .gift-product-intro h2::after {
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 54px;
	height: 3px;
	border-radius: 999px;
	background: var(--berry-detail-accent);
	content: "";
}

.berry-product-detail-page .gift-product-intro-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.berry-product-detail-page .gift-product-intro-grid figure {
	min-width: 0;
	margin: 0;
}

.berry-product-detail-page .gift-product-intro-grid img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

@media (max-width: 1050px) {
	.berry-product-detail-page .gift-product-layout {
		grid-template-columns: 96px minmax(0, 600px);
		grid-template-areas:
			"thumbs main"
			"thumbs meta"
			"info info";
		gap: 0 22px;
	}

	.berry-product-detail-page .gift-product-info {
		position: static;
		width: 100%;
		margin-top: 32px;
	}
}

@media (max-width: 782px) {
	.berry-product-detail-page.admin-bar .gift-product-info {
		top: auto;
	}
}

@media (max-width: 700px) {
	.berry-product-detail-page .wp-site-blocks > main > .wp-block-group.alignfull {
		padding: 24px 15px 48px !important;
	}

	.berry-product-detail-page .gift-product-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"main"
			"thumbs"
			"meta"
			"info";
		gap: 0;
	}

	.berry-product-detail-page .gift-main-column {
		max-width: none;
	}

	.berry-product-detail-page .gift-main-image {
		border-radius: 14px;
	}

	.berry-product-detail-page .gift-main-image img {
		padding: 7px;
		border-radius: 13px;
	}

	.berry-product-detail-page .gift-carousel-button {
		width: 38px;
		height: 38px;
		font-size: 25px;
		opacity: 0.72;
	}

	.berry-product-detail-page .gift-prev {
		left: 8px;
	}

	.berry-product-detail-page .gift-next {
		right: 8px;
	}

	.berry-product-detail-page .gift-thumb-column {
		margin-top: 14px;
	}

	.berry-product-detail-page .gift-thumb-list {
		flex-direction: row;
		gap: 10px;
		max-height: none;
		padding: 3px 4px 8px;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-gutter: auto;
		scroll-snap-type: x proximity;
	}

	.berry-product-detail-page .gift-thumb {
		width: 68px;
		height: 68px;
		scroll-snap-align: start;
	}

	.berry-product-detail-page .gift-gallery-meta {
		padding-top: 9px;
	}

	.berry-product-detail-page .gift-product-info {
		margin-top: 24px;
		padding: 22px 18px;
		border-radius: 15px;
		box-shadow: none;
	}

	.berry-product-detail-page .gift-product-title {
		margin-bottom: 16px;
		font-size: clamp(22px, 6.4vw, 24px);
	}

	.berry-product-detail-page .gift-price {
		padding: 16px 17px;
	}

	.berry-product-detail-page .gift-price-currency {
		font-size: 22px;
	}

	.berry-product-detail-page .gift-price-value {
		font-size: clamp(36px, 10vw, 40px);
	}

	.berry-product-detail-page .gift-product-size {
		grid-template-columns: 82px minmax(0, 1fr);
		gap: 10px;
		font-size: 17px;
	}

	.berry-product-detail-page .gift-product-size strong {
		font-size: 17px;
	}

	.berry-product-detail-page .gift-wechat-contact {
		min-height: 54px;
		padding-inline: 10px;
		font-size: clamp(16px, 4.6vw, 18px);
		white-space: nowrap;
	}

	.berry-product-detail-page .gift-wechat-icon svg {
		width: 22px;
		height: 22px;
	}

	.berry-product-detail-page .gift-product-intro {
		margin-top: 50px;
	}

	.berry-product-detail-page .gift-product-intro-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

@media (min-width: 701px) and (max-width: 1050px) {
	.berry-product-detail-page .gift-product-intro-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
