/**
 * 单品页 — 图库 + 摘要同置于一张大型卡片（Uiverse / MuhammadHasann 参考）
 */

body.ausbia-single-product-modern {
	--pdp-max: 1180px;
	--pdp-r: 16px;
	--pdp-r-lg: 18px;
	--pdp-gap: clamp(1.25rem, 3.5vw, 2rem);
	--pdp-text: hsl(0, 0%, 100%);
	--pdp-muted: hsl(0, 0%, 83%);
	--pdp-line: hsl(240, 9%, 17%);
	--pdp-ui-primary: hsl(266, 92%, 58%);
	--pdp-ui-black: hsl(240, 15%, 9%);
}

body.ausbia-single-product-modern .ausbia-pdp-shell {
	position: relative;
	padding-bottom: clamp(2rem, 5vw, 4rem);
}

body.ausbia-single-product-modern .ausbia-pdp-shell::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: min(50vh, 480px);
	background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(100, 60, 180, 0.18), transparent 60%);
	pointer-events: none;
	z-index: 0;
}

body.ausbia-single-product-modern #product.ausbia-pdp-product {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
}

body.ausbia-single-product-modern #product.ausbia-pdp-product::after {
	display: none !important;
}

body.ausbia-single-product-modern .ausbia-pdp-hero {
	padding: clamp(0.75rem, 2vw, 1.25rem) 0 clamp(1.25rem, 3vw, 2rem);
}

body.ausbia-single-product-modern .ausbia-pdp-inner {
	width: min(100%, var(--pdp-max));
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1rem, 4vw, 1.75rem);
	padding-right: clamp(1rem, 4vw, 1.75rem);
	box-sizing: border-box;
}

/* ========== 巨型卡片（参考 Uiverse .card）========== */
body.ausbia-single-product-modern .ausbia-pdp-mega-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	border-radius: 1rem;
	background-color: hsla(240, 15%, 9%, 1);
	background-image: radial-gradient(at 88% 40%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
		radial-gradient(at 49% 30%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
		radial-gradient(at 14% 26%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
		radial-gradient(at 0% 64%, hsla(263, 93%, 56%, 0.45) 0px, transparent 85%),
		radial-gradient(at 41% 94%, hsla(284, 100%, 84%, 0.3) 0px, transparent 85%),
		radial-gradient(at 100% 99%, hsla(306, 100%, 57%, 0.38) 0px, transparent 85%);
	box-shadow: 0px -16px 24px 0px rgba(255, 255, 255, 0.18) inset;
	border: 1px solid var(--pdp-line);
	overflow: hidden;
	isolation: isolate;
}

body.ausbia-single-product-modern .ausbia-pdp-mega-card__border {
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	z-index: 0;
	inset: 0;
	width: 100%;
	height: 100%;
	background-image: linear-gradient(0deg, hsl(0, 0%, 100%) -50%, hsl(0, 0%, 40%) 100%);
	border-radius: inherit;
}

body.ausbia-single-product-modern .ausbia-pdp-mega-card__border::before {
	content: "";
	pointer-events: none;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 200%;
	height: 10rem;
	margin: 0;
	transform: translate(-50%, -50%);
	transform-origin: center center;
	background-image: linear-gradient(
		0deg,
		hsla(0, 0%, 100%, 0) 0%,
		hsl(277, 95%, 60%) 40%,
		hsl(277, 95%, 60%) 60%,
		hsla(0, 0%, 40%, 0) 100%
	);
	animation: ausbia-pdp-card-border-rotate 8s linear infinite;
}

@keyframes ausbia-pdp-card-border-rotate {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

body.ausbia-single-product-modern .ausbia-pdp-mega-card__inner {
	position: relative;
	z-index: 2;
	width: calc(100% - 2px);
	margin: 1px;
	min-width: 0;
	border-radius: calc(1rem - 1px);
	padding: clamp(1rem, 2.2vw, 1.35rem);
	background-color: hsla(240, 15%, 9%, 0.96);
	background-image: radial-gradient(at 88% 40%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
		radial-gradient(at 49% 30%, hsla(240, 15%, 9%, 1) 0px, transparent 85%),
		radial-gradient(at 0% 64%, hsla(263, 93%, 56%, 0.25) 0px, transparent 85%),
		radial-gradient(at 100% 99%, hsla(306, 100%, 57%, 0.22) 0px, transparent 85%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45) inset;
}

/* ========== 双栏 ========== */
body.ausbia-single-product-modern .ausbia-pdp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(260px, 1fr);
	gap: var(--pdp-gap);
	align-items: start;
}

@media (max-width: 900px) {
	body.ausbia-single-product-modern .ausbia-pdp-layout {
		grid-template-columns: 1fr;
	}
}

/* ========== 图库（卡片内）========== */
body.ausbia-single-product-modern .ausbia-pdp-media {
	min-width: 0;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame {
	position: relative;
	padding: 0;
	border-radius: var(--pdp-r-lg);
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--pdp-line);
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .woocommerce-product-gallery {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	opacity: 1 !important;
	border-radius: calc(var(--pdp-r-lg) - 4px);
	overflow: hidden;
	min-height: min(70vw, 400px);
	background: rgba(0, 0, 0, 0.35);
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .woocommerce-product-gallery .flex-viewport {
	border-radius: inherit;
	min-height: 0 !important;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .woocommerce-product-gallery img:not(.zoomImg) {
	opacity: 1 !important;
	object-fit: contain;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .flex-control-thumbs {
	margin-top: 0.75rem !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .flex-control-thumbs li {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .flex-control-thumbs img {
	width: 52px !important;
	height: 52px !important;
	object-fit: cover;
	border-radius: 10px;
	border: 2px solid transparent;
	opacity: 0.88;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame .flex-control-thumbs .flex-active img,
body.ausbia-single-product-modern .ausbia-pdp-media-frame .flex-control-thumbs img:hover {
	border-color: var(--pdp-ui-primary);
	box-shadow: 0 0 0 1px rgba(167, 76, 240, 0.45);
	opacity: 1;
}

body.ausbia-single-product-modern .ausbia-pdp-media-frame > span.onsale {
	position: absolute;
	top: 0.85rem;
	left: 0.85rem;
	z-index: 5;
	min-height: 2.6rem;
	min-width: 2.6rem;
	line-height: 2.6rem;
	border-radius: 999px;
	font-weight: 800;
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: linear-gradient(135deg, hsl(306, 100%, 57%), hsl(277, 95%, 50%)) !important;
	color: #fff !important;
	box-shadow: 0 8px 24px rgba(167, 76, 240, 0.45);
}

/* ========== 摘要（卡片内右栏，参考标题区 + 分割线）========== */
body.ausbia-single-product-modern .ausbia-pdp-detail {
	position: relative;
	min-width: 0;
	padding: 0.25rem 0 0;
	background: transparent;
	border: none;
	box-shadow: none;
}

@media (min-width: 901px) {
	body.ausbia-single-product-modern .ausbia-pdp-detail {
		position: sticky;
		top: calc(var(--ast-header-height, 72px) + 1rem);
		align-self: start;
		max-height: calc(100vh - var(--ast-header-height, 72px) - 2rem);
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

body.ausbia-single-product-modern .ausbia-pdp-detail .summary.entry-summary {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	color: var(--pdp-text);
}

body.ausbia-single-product-modern .ausbia-pdp-detail .summary.entry-summary > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

body.ausbia-single-product-modern .ausbia-pdp-detail .summary.entry-summary > * + * {
	margin-top: 1rem !important;
}

body.ausbia-single-product-modern .summary .woocommerce-breadcrumb {
	order: -1;
	font-size: 0.7rem;
	color: var(--pdp-muted);
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--pdp-line);
	margin-bottom: 0.25rem !important;
}

body.ausbia-single-product-modern .summary .woocommerce-breadcrumb a {
	color: hsl(277, 95%, 70%);
	text-decoration: none;
}

/* 参考 .card_title */
body.ausbia-single-product-modern .summary .product_title {
	font-size: clamp(1.05rem, 2.4vw, 1.35rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.25;
	color: var(--pdp-text) !important;
}

/* 参考 .card_paragraph */
body.ausbia-single-product-modern .woocommerce-product-details__short-description {
	margin-top: 0.25rem !important;
	max-width: 92%;
	font-size: 0.8rem;
	line-height: 1.55;
	color: var(--pdp-muted) !important;
	padding: 0 !important;
	border: none !important;
}

/* 参考 hr.line：放在评分下缘 */
body.ausbia-single-product-modern .summary .woocommerce-product-rating {
	padding-bottom: 0.75rem;
	margin-bottom: 0.15rem !important;
	border-bottom: 0.1rem solid var(--pdp-line);
}

body.ausbia-single-product-modern .summary .star-rating {
	color: var(--pdp-ui-primary);
}

/* 价格 */
body.ausbia-single-product-modern .summary p.price,
body.ausbia-single-product-modern .summary span.price,
body.ausbia-single-product-modern .summary .price {
	display: block;
	padding: 0.85rem 1rem;
	border-radius: var(--pdp-r);
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--pdp-line);
	font-size: clamp(1.2rem, 2.5vw, 1.55rem) !important;
	font-weight: 700;
	color: var(--pdp-text) !important;
}

body.ausbia-single-product-modern .summary p.price del,
body.ausbia-single-product-modern .summary span.price del {
	font-size: 0.6em !important;
	opacity: 0.55;
	color: var(--pdp-muted) !important;
}

/* 简短说明若在价格前，与标题间距已由 *+* 控制 */

/* 参考 .card__list：短描述内 ul */
body.ausbia-single-product-modern .woocommerce-product-details__short-description ul {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

body.ausbia-single-product-modern .woocommerce-product-details__short-description ul li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: var(--pdp-text);
}

body.ausbia-single-product-modern .woocommerce-product-details__short-description ul li::before {
	content: "";
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	margin-top: 0.1rem;
	border-radius: 50%;
	background: var(--pdp-ui-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2314141f'%3E%3Cpath fill-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z'/%3E%3C/svg%3E");
	background-size: 0.75rem 0.75rem;
	background-repeat: no-repeat;
	background-position: center;
}

/* 加购：参考 .button */
body.ausbia-single-product-modern .summary form.cart {
	padding: 0.75rem 0 0;
	margin-top: 0.5rem !important;
	border: none;
	background: transparent;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.65rem 0.75rem;
}

body.ausbia-single-product-modern .summary form.cart .quantity {
	margin: 0 !important;
}

body.ausbia-single-product-modern .summary form.cart .quantity .qty {
	min-height: 44px;
	min-width: 3.25rem;
	border-radius: 10px;
	border: 1px solid var(--pdp-line);
	background: rgba(0, 0, 0, 0.45);
	color: var(--pdp-text);
	text-align: center;
	font-weight: 600;
}

body.ausbia-single-product-modern .summary form.cart .button.alt,
body.ausbia-single-product-modern .summary form.cart button.single_add_to_cart_button,
body.ausbia-single-product-modern .summary form.cart button[type="submit"]:not(.minus):not(.plus) {
	cursor: pointer;
	flex: 1 1 200px;
	min-height: 44px;
	padding: 0.5rem 1.25rem !important;
	width: 100%;
	max-width: 100%;
	font-size: 0.8rem !important;
	font-weight: 600 !important;
	color: var(--pdp-text) !important;
	border: 0 !important;
	border-radius: 9999px !important;
	background-image: linear-gradient(0deg, rgba(94, 58, 238, 1) 0%, rgba(197, 107, 240, 1) 100%) !important;
	box-shadow: inset 0 -2px 25px -4px hsl(0, 0%, 100%);
	transition: transform 0.15s ease, filter 0.15s ease;
}

body.ausbia-single-product-modern .summary form.cart .button.alt:hover,
body.ausbia-single-product-modern .summary form.cart button.single_add_to_cart_button:hover {
	transform: translateY(-1px);
	filter: brightness(1.06);
}

body.ausbia-single-product-modern .summary table.variations {
	width: 100% !important;
}

body.ausbia-single-product-modern .summary table.variations tr {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

body.ausbia-single-product-modern .summary table.variations th.label {
	width: 100% !important;
	text-align: left !important;
	padding: 0 !important;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--pdp-muted) !important;
	border: none !important;
}

body.ausbia-single-product-modern .summary table.variations td.value {
	width: 100% !important;
	padding: 0 !important;
	border: none !important;
}

body.ausbia-single-product-modern .summary table.variations select {
	width: 100% !important;
	min-height: 44px;
	border-radius: 10px !important;
	border: 1px solid var(--pdp-line) !important;
	background: rgba(0, 0, 0, 0.45) !important;
	color: var(--pdp-text) !important;
}

body.ausbia-single-product-modern .summary .single_variation_wrap .woocommerce-variation-price {
	font-size: 1.05rem !important;
	font-weight: 700;
}

body.ausbia-single-product-modern .summary .product_meta {
	font-size: 0.75rem;
	color: var(--pdp-muted);
	padding-top: 0.75rem;
	border-top: 1px solid var(--pdp-line);
}

body.ausbia-single-product-modern .summary .product_meta a {
	color: hsl(277, 95%, 70%);
}

/* ========== 下方区块 ========== */
body.ausbia-single-product-modern .ausbia-pdp-below {
	position: relative;
	padding: clamp(1rem, 2vw, 1.5rem) 0 2rem;
	border-top: 1px solid var(--pdp-line);
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, transparent 45%);
}

body.ausbia-single-product-modern .ausbia-pdp-below .ausbia-pdp-inner {
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 3vw, 2.25rem);
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs,
body.ausbia-single-product-modern .ausbia-pdp-below section.related,
body.ausbia-single-product-modern .ausbia-pdp-below section.upsells {
	width: 100%;
	margin: 0 !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0 0 1rem !important;
	padding: 0 !important;
	border: none !important;
	border-bottom: 1px solid var(--pdp-line) !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs::before {
	display: none !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs li {
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.65rem 1rem !important;
	margin-bottom: -1px;
	border-radius: 0 !important;
	background: transparent !important;
	border: none !important;
	border-bottom: 3px solid transparent !important;
	color: var(--pdp-muted) !important;
	font-weight: 600;
	font-size: 0.85rem;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs li.active a,
body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-tabs ul.tabs li a:hover {
	color: var(--pdp-text) !important;
	border-bottom-color: var(--pdp-ui-primary) !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below .woocommerce-Tabs-panel {
	padding-top: 0.35rem;
	font-size: 0.9rem;
	line-height: 1.7;
	color: var(--pdp-muted);
}

body.ausbia-single-product-modern .ausbia-pdp-below section.related > h2,
body.ausbia-single-product-modern .ausbia-pdp-below section.upsells > h2 {
	font-size: clamp(1rem, 2.2vw, 1.25rem) !important;
	font-weight: 700;
	color: var(--pdp-text) !important;
	margin: 0 0 0.85rem !important;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--pdp-line);
}

body.ausbia-single-product-modern .ausbia-pdp-below section.related ul.products,
body.ausbia-single-product-modern .ausbia-pdp-below section.upsells ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem !important;
	margin: 0 !important;
}

body.ausbia-single-product-modern .ausbia-pdp-below section.related ul.products::before,
body.ausbia-single-product-modern .ausbia-pdp-below section.upsells ul.products::before {
	display: none !important;
}

body.ausbia-single-product-modern .summary form.cart .quantity,
body.ausbia-single-product-modern .summary form.cart .quantity *,
body.ausbia-single-product-modern .summary form.cart input.qty,
body.ausbia-single-product-modern .summary form.cart .single_add_to_cart_button,
body.ausbia-single-product-modern .summary form.cart button.single_add_to_cart_button {
	pointer-events: auto !important;
}

@media (prefers-reduced-motion: reduce) {
	body.ausbia-single-product-modern .ausbia-pdp-mega-card__border::before {
		animation: none;
	}

	body.ausbia-single-product-modern .summary form.cart .button.alt:hover,
	body.ausbia-single-product-modern .summary form.cart button.single_add_to_cart_button:hover {
		transform: none;
	}
}
