/**
 * Product section styles: the two-column gallery and summary grid.
 */

.starterkit-product-content {
	padding: var(--product-section-padding-y, 30px) 0;
	position: relative;
}

.starterkit-product-content__grid {
	display: grid;
	grid-template-columns: minmax(0, var(--product-gallery-col, 1fr)) minmax(0, var(--product-summary-col, 1fr));
	gap: var(--product-column-gap, 40px);
	align-items: start;
}

.starterkit-product-content__summary-column {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.starterkit-product-content__summary-column > * {
	min-width: 0;
}

.starterkit-product-content__media-group,
.starterkit-product-content__summary-group {
	display: flex;
	min-width: 0;
	flex-direction: column;
	/* Group Block settings "Padding Vertical/Horizontal" (inline variables). */
	padding: var(--product-group-padding-y, 0px) var(--product-group-padding-x, 0px);
}

.starterkit-product-content__media-group > *,
.starterkit-product-content__summary-group > * {
	min-width: 0;
}

.starterkit-product-title,
.starterkit-product-price,
.starterkit-product-excerpt,
.starterkit-product-meta,
.starterkit-product-share,
.starterkit-buy-buttons {
	margin-bottom: var(--starterkit-block-mb, 0);
}

.starterkit-product-title .product_title,
.starterkit-product-title .entry-title {
	margin: 0;
	color: var(--starterkit-product-title-color, var(--color-primary, inherit));
	font-size: var(--starterkit-product-title-size, var(--h1-font-size-desktop, clamp(32px, 3vw, 46px)));
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
}

.starterkit-product-rating .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 !important;
	font-size: 15px;
}

.starterkit-product-rating .star-rating {
	width: auto;
	color: #f59e0b;
	letter-spacing: 1px;
}

.starterkit-product-price .price,
:is(.woocommerce, .woocommerce-page) div.product .starterkit-product-price .price {
	display: flex;
	align-items: baseline;
	justify-content: var(--starterkit-product-price-justify, flex-start);
	flex-wrap: wrap;
	gap: var(--starterkit-product-price-gap, 9px);
	margin: 0;
	color: var(--starterkit-product-price-color, #242424);
	font-size: var(--starterkit-product-price-size, 25px);
	font-weight: var(--starterkit-product-price-weight, 650);
	line-height: 1.25;
}

.starterkit-product-price .price del,
:is(.woocommerce, .woocommerce-page) div.product .starterkit-product-price .price del {
	color: var(--starterkit-product-regular-price-color, #6b7280);
	font-size: 0.72em;
	font-weight: 400;
}

.starterkit-product-price .price ins,
:is(.woocommerce, .woocommerce-page) div.product .starterkit-product-price .price ins {
	color: var(--starterkit-product-price-color, inherit);
	text-decoration: none;
}

.starterkit-product-price .screen-reader-text {
	display: none !important;
}

.starterkit-product-content:has([data-starterkit-product-block="price"]) .woocommerce-variation-price,
.starterkit-product-content:has(.starterkit-product-price) .woocommerce-variation-price {
	display: none !important;
}

.woocommerce-variation-price .price,
:is(.woocommerce, .woocommerce-page) div.product .woocommerce-variation-price .price {
	color: var(--starterkit-product-price-color, #242424);
}

.woocommerce-variation-price .price del,
:is(.woocommerce, .woocommerce-page) div.product .woocommerce-variation-price .price del {
	color: var(--starterkit-product-regular-price-color, #6b7280);
}

.woocommerce-variation-price .price ins,
:is(.woocommerce, .woocommerce-page) div.product .woocommerce-variation-price .price ins {
	color: var(--starterkit-product-price-color, inherit);
}

.starterkit-product-excerpt,
.starterkit-product-excerpt p {
	margin: 0;
	color: #4b5563;
	font-size: 16px;
	line-height: 1.65;
}

.starterkit-product-meta .product_meta,
.starterkit-product-share {
	color: var(--starterkit-product-meta-color, var(--color-secondary, #6b7280));
	font-size: var(--starterkit-product-meta-font-size, 14px);
	line-height: 1.6;
}

.starterkit-product-meta .product_meta,
.starterkit-product-meta[data-layout="stacked"] .product_meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.starterkit-product-meta .product_meta > span,
.starterkit-product-meta[data-layout="stacked"] .product_meta > span {
	display: block;
}

.starterkit-product-meta[data-layout="inline"] .product_meta {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.starterkit-product-meta[data-layout="inline"] .product_meta > span {
	display: inline;
}

.starterkit-product-meta .product_meta a {
	color: inherit;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.starterkit-product-meta .product_meta a:hover {
	color: #111827;
}

.starterkit-product-meta[data-show-sku="false"] .sku_wrapper {
	display: none !important;
}

.starterkit-product-meta[data-show-categories="false"] .posted_in {
	display: none !important;
}

.starterkit-product-meta[data-show-tags="false"] .tagged_as {
	display: none !important;
}

.starterkit-product-meta[data-layout="inline"][data-divider="dot"] .product_meta > span:not(:last-child)::after {
	content: "•";
	margin-left: 14px;
	color: #9ca3af;
}

.starterkit-product-meta[data-layout="inline"][data-divider="pipe"] .product_meta > span:not(:last-child)::after {
	content: "|";
	margin-left: 14px;
	color: #d1d5db;
}

.starterkit-product-meta[data-layout="inline"][data-divider="slash"] .product_meta > span:not(:last-child)::after {
	content: "/";
	margin-left: 14px;
	color: #d1d5db;
}

/* Product Sharing Block */
.starterkit-product-share {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: #4b5563;
}

.starterkit-product-share[data-alignment="left"] {
	justify-content: flex-start;
}
.starterkit-product-share[data-alignment="center"] {
	justify-content: center;
}
.starterkit-product-share[data-alignment="right"] {
	justify-content: flex-end;
}

.starterkit-product-share[data-label-position="above"] {
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}
.starterkit-product-share[data-label-position="above"][data-alignment="center"] {
	align-items: center;
}
.starterkit-product-share[data-label-position="above"][data-alignment="right"] {
	align-items: flex-end;
}

.starterkit-product-share__label {
	font-weight: 500;
	color: #374151;
	white-space: nowrap;
}

.starterkit-product-share__items {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--starterkit-share-gap, 10px);
}

.starterkit-product-share__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--starterkit-share-icon-color, var(--color-secondary, #6b7280));
	cursor: pointer;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
	line-height: 1;
}
.starterkit-product-share__btn:hover {
	transform: translateY(-1px);
}

.starterkit-product-share[data-icon-size="small"] .starterkit-product-share__btn svg {
	width: 16px;
	height: 16px;
}
.starterkit-product-share[data-icon-size="small"] .starterkit-product-share__btn {
	width: 28px;
	height: 28px;
}

.starterkit-product-share .starterkit-product-share__btn svg,
.starterkit-product-share[data-icon-size="medium"] .starterkit-product-share__btn svg {
	width: 18px;
	height: 18px;
}
.starterkit-product-share .starterkit-product-share__btn,
.starterkit-product-share[data-icon-size="medium"] .starterkit-product-share__btn {
	width: 34px;
	height: 34px;
}

.starterkit-product-share[data-icon-size="large"] .starterkit-product-share__btn svg {
	width: 22px;
	height: 22px;
}
.starterkit-product-share[data-icon-size="large"] .starterkit-product-share__btn {
	width: 40px;
	height: 40px;
}

.starterkit-product-share[data-icon-style="clean"] .starterkit-product-share__btn {
	border-radius: 4px;
}
.starterkit-product-share[data-icon-style="clean"] .starterkit-product-share__btn:hover {
	color: #111827;
	background-color: #f3f4f6;
}

.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--facebook {
	color: #1877f2;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--x {
	color: #000000;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--pinterest {
	color: #e60023;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--whatsapp {
	color: #25d366;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--email {
	color: #4b5563;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn--copy {
	color: #2563eb;
}
.starterkit-product-share[data-icon-style="brand"] .starterkit-product-share__btn:hover {
	opacity: 0.8;
}

.starterkit-product-share[data-icon-style="circle"] .starterkit-product-share__btn {
	border-radius: 9999px;
	border: 1px solid #e5e7eb;
	background-color: #ffffff;
}
.starterkit-product-share[data-icon-style="circle"] .starterkit-product-share__btn:hover {
	border-color: #9ca3af;
	color: #111827;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.starterkit-product-share[data-icon-style="square"] .starterkit-product-share__btn {
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	background-color: #f9fafb;
}
.starterkit-product-share[data-icon-style="square"] .starterkit-product-share__btn:hover {
	border-color: #9ca3af;
	background-color: #ffffff;
	color: #111827;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.starterkit-product-share__tooltip {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 500;
	color: #ffffff;
	background-color: #111827;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 10;
}
.starterkit-product-share__tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #111827;
}
.starterkit-product-share__btn.is-copied .starterkit-product-share__tooltip {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.woocommerce div.product .starterkit-product-form--live form.cart,
.woocommerce div.product form.cart,
.starterkit-product-form--live form.cart,
.starterkit-product-form--live .variations_form {
	margin: 0 !important;
}

.woocommerce div.product .starterkit-product-form--live form.cart::before,
.woocommerce div.product .starterkit-product-form--live form.cart::after,
.starterkit-product-form--live form.cart::before,
.starterkit-product-form--live form.cart::after {
	content: none !important;
	display: none !important;
}

/* Product form (options, quantity, CTAs) is styled by the Buy Buttons block: blocks/buy-buttons/style.css. */

.starterkit-product-content :where(button, a, input, select):focus-visible {
	outline: 3px solid #005bd3;
	outline-offset: 3px;
}

/* Layout variants */
.starterkit-product-content--layout-50-50 .starterkit-product-content__grid {
	grid-template-columns: 1fr 1fr;
}

.starterkit-product-content--layout-60-40 .starterkit-product-content__grid {
	grid-template-columns: 1.5fr 1fr;
}

.starterkit-product-content--layout-40-60 .starterkit-product-content__grid {
	grid-template-columns: 1fr 1.5fr;
}

/* Gallery position variants */
.starterkit-product-content--gallery-right .starterkit-product-content__grid {
	grid-template-columns: minmax(0, var(--product-summary-col, 1fr)) minmax(0, var(--product-gallery-col, 1fr));
}

.starterkit-product-content--gallery-right .starterkit-product-content__gallery-column {
	order: 2;
}

.starterkit-product-content--gallery-right .starterkit-product-content__summary-column {
	order: 1;
}

/* Sticky summary: section settings "Sticky Offset Top" and "Stay below sticky header".
 * `--sk-sticky-header-offset` is set on :root by the site-header script while it sticks. */
.starterkit-product-content--sticky-summary .starterkit-product-content__summary-column {
	position: sticky;
	top: calc(var(--sk-sticky-header-offset, 0px) + var(--product-sticky-offset, 30px));
	/* Follows a scroll-up header as it slides in and out. */
	transition: top 0.25s ease;
}

.starterkit-product-content--sticky-ignore-header .starterkit-product-content__summary-column {
	top: var(--product-sticky-offset, 30px);
}

/* Columns internal styling */
.starterkit-product-content__gallery-column,
.starterkit-product-content__summary-column {
	min-width: 0;
}

/* Ensure WooCommerce legacy float/48% widths and margins do not collapse theme gallery and summary columns */
.woocommerce div.product .starterkit-product-content div.images,
.woocommerce-page div.product .starterkit-product-content div.images,
:is(.woocommerce, .woocommerce-page) div.product div.images,
.starterkit-product-content__gallery-column .woocommerce-product-gallery,
.starterkit-product-content__gallery-column .starterkit-gallery,
.starterkit-product-content__gallery-column .images {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-bottom: 0 !important;
}

.woocommerce div.product .starterkit-product-content div.summary,
.woocommerce-page div.product .starterkit-product-content div.summary,
:is(.woocommerce, .woocommerce-page) div.product div.summary,
.starterkit-product-content__summary-column .summary {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-bottom: 0 !important;
}

/* The canonical Product Content breakpoint is 768px. */
@media (max-width: 767px) {
	.starterkit-product-content__grid {
		grid-template-columns: 1fr !important;
		gap: 20px;
	}

	.starterkit-product-content--gallery-right .starterkit-product-content__gallery-column {
		order: 1;
	}

	.starterkit-product-content--gallery-right .starterkit-product-content__summary-column {
		order: 2;
	}

	.starterkit-product-content--sticky-summary .starterkit-product-content__summary-column {
		position: static;
	}

	.starterkit-product-content {
		padding: 0 0 var(--product-section-padding-y, 24px);
	}

	/* Mobile group padding: vertical falls back to desktop; horizontal stays 0 unless
	 * a mobile value is set, so it does not stack with the container gutter. */
	.starterkit-product-content__media-group,
	.starterkit-product-content__summary-group {
		padding: var(--product-group-padding-y-mobile, var(--product-group-padding-y, 0px)) var(--product-group-padding-x-mobile, 0px);
	}

	.starterkit-product-content__summary-column {
		gap: 16px;
	}

	.starterkit-product-title .product_title,
	.starterkit-product-title .entry-title {
		font-size: min(var(--starterkit-product-title-size, 32px), 32px);
	}

	.starterkit-product-content {
		padding: var(--product-section-padding-y-mobile, var(--product-section-padding-y, 20px)) 0;
	}

	.starterkit-product-content__grid {
		gap: var(--product-column-gap-mobile, var(--product-column-gap, 24px));
	}

	.starterkit-product-title,
	.starterkit-product-price,
	.starterkit-product-excerpt,
	.starterkit-product-meta,
	.starterkit-product-share,
	.starterkit-buy-buttons {
		margin-bottom: var(--starterkit-block-mb-mobile, var(--starterkit-block-mb, 0));
	}

	.starterkit-product-price .price,
	:is(.woocommerce, .woocommerce-page) div.product .starterkit-product-price .price {
		gap: var(--starterkit-product-price-gap-mobile, var(--starterkit-product-price-gap, 6px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.starterkit-product-content--sticky-summary .starterkit-product-content__summary-column {
		transition: none;
	}
}
