/**
 * Product Detail app shell mapped from the AbayaStore SwiftUI design system.
 * Native WooCommerce markup remains the no-JavaScript fallback.
 */

.abayastore-product-experience {
	--abayastore-background: #fff;
	--abayastore-surface: #f7f7f8;
	--abayastore-surface-elevated: #fff;
	--abayastore-text: #1d1d1f;
	--abayastore-text-secondary: #6e6e73;
	--abayastore-separator: rgb(60 60 67 / 18%);
	--abayastore-brand: #874f29;
	--abayastore-brand-deep: #3c2313;
	--abayastore-accent: #d89339;
	--abayastore-tint: #fcf9f0;
	--abayastore-success: #248a3d;
	--abayastore-error: #d70015;
	--abayastore-radius-sm: 10px;
	--abayastore-radius-md: 14px;
	--abayastore-radius-lg: 20px;
	--abayastore-radius-xl: 28px;
	--abayastore-content: 1240px;
	background: var(--abayastore-background);
	color: var(--abayastore-text);
}

.abayastore-product-experience main,
.abayastore-product-experience .site-main,
.abayastore-product-experience .ast-container,
.abayastore-product-experience .ast-woocommerce-container {
	max-inline-size: none;
}

.abayastore-product-experience div.product {
	margin-inline: auto;
	max-inline-size: var(--abayastore-content);
	padding: clamp(16px, 3vw, 36px) clamp(16px, 4vw, 48px) 72px;
}

.abayastore-product-experience .woocommerce-breadcrumb {
	color: var(--abayastore-text-secondary);
	font-size: 0.78rem;
	margin: 0 auto 18px;
	max-inline-size: var(--abayastore-content);
	padding-inline: clamp(16px, 4vw, 48px);
}

.abayastore-product-shell {
	display: grid;
	gap: clamp(28px, 4vw, 64px);
	grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
}

.abayastore-product-shell::after {
	clear: both;
	content: "";
	display: table;
}

.abayastore-product-shell > .woocommerce-product-gallery,
.abayastore-product-shell > .summary {
	float: none !important;
	inline-size: 100% !important;
	margin: 0 !important;
}

.abayastore-product-shell > .woocommerce-product-gallery {
	align-self: start;
	min-inline-size: 0;
	position: sticky;
	inset-block-start: 24px;
}

.abayastore-product-shell .woocommerce-product-gallery__trigger {
	align-items: center;
	background: rgb(255 255 255 / 88%);
	border: 1px solid var(--abayastore-separator);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgb(0 0 0 / 8%);
	display: flex;
	block-size: 44px;
	inline-size: 44px;
	justify-content: center;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	z-index: 5;
}

.abayastore-product-shell .flex-viewport,
.abayastore-product-shell .woocommerce-product-gallery__wrapper {
	background: var(--abayastore-tint);
	border-radius: var(--abayastore-radius-xl);
}

.abayastore-product-shell .woocommerce-product-gallery__image {
	background: var(--abayastore-tint);
	min-block-size: clamp(440px, 58vw, 720px);
}

.abayastore-product-shell .woocommerce-product-gallery__image > a {
	align-items: center;
	display: flex;
	justify-content: center;
	min-block-size: clamp(440px, 58vw, 720px);
}

.abayastore-product-shell .woocommerce-product-gallery__image img {
	block-size: clamp(440px, 58vw, 720px) !important;
	inline-size: 100% !important;
	object-fit: contain;
	object-position: center;
}

.abayastore-product-shell .flex-control-thumbs {
	display: flex !important;
	gap: 10px;
	margin-block-start: 12px !important;
	overflow-x: auto;
	padding: 2px 2px 8px !important;
	scrollbar-width: thin;
}

.abayastore-product-shell .flex-control-thumbs li {
	flex: 0 0 72px;
	inline-size: 72px !important;
	margin: 0 !important;
}

.abayastore-product-shell .flex-control-thumbs img {
	background: var(--abayastore-tint);
	block-size: 84px;
	border: 2px solid transparent;
	border-radius: var(--abayastore-radius-sm);
	inline-size: 72px;
	object-fit: cover;
	opacity: 0.72;
}

.abayastore-product-shell .flex-control-thumbs img.flex-active {
	border-color: var(--abayastore-accent);
	opacity: 1;
}

.abayastore-product-shell > .summary {
	align-self: start;
	background: var(--abayastore-surface-elevated);
	border: 1px solid var(--abayastore-separator);
	border-radius: var(--abayastore-radius-xl);
	box-shadow: 0 14px 44px rgb(60 35 19 / 7%);
	padding: clamp(22px, 3vw, 36px);
	position: sticky;
	inset-block-start: 24px;
}

.abayastore-product-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-block-end: 2px;
}

.abayastore-icon-button {
	align-items: center;
	background: var(--abayastore-surface);
	border: 1px solid var(--abayastore-separator);
	border-radius: 999px;
	color: var(--abayastore-text);
	cursor: pointer;
	display: inline-flex;
	font-size: 1.15rem;
	block-size: 44px;
	inline-size: 44px;
	justify-content: center;
	padding: 0;
}

.abayastore-product-heading-meta {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-block-end: 10px;
}

.abayastore-product-category {
	color: var(--abayastore-accent);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
}

.abayastore-stock-badge {
	align-items: center;
	background: color-mix(in srgb, var(--abayastore-success) 9%, transparent);
	border-radius: 999px;
	color: var(--abayastore-success);
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 650;
	gap: 6px;
	min-block-size: 30px;
	padding-inline: 10px;
}

.abayastore-stock-badge > span {
	background: currentColor;
	border-radius: 50%;
	block-size: 7px;
	inline-size: 7px;
}

.abayastore-stock-badge.is-out-of-stock {
	background: color-mix(in srgb, var(--abayastore-error) 8%, transparent);
	color: var(--abayastore-error);
}

.abayastore-product-shell .product_title {
	color: var(--abayastore-text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
	font-size: clamp(1.8rem, 3.2vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1.08;
	margin: 0 0 14px;
}

.abayastore-product-shell .woocommerce-product-rating {
	align-items: center;
	display: flex;
	float: none;
	font-size: 0.82rem;
	gap: 8px;
	margin: 0 0 12px;
}

.abayastore-product-shell .star-rating {
	color: var(--abayastore-accent);
	margin: 0;
}

.abayastore-product-shell .price {
	align-items: baseline;
	color: var(--abayastore-text) !important;
	display: flex;
	flex-wrap: wrap;
	font-size: clamp(1.3rem, 2vw, 1.65rem) !important;
	font-weight: 700;
	gap: 8px;
	margin: 0 0 16px !important;
}

.abayastore-product-shell .price del {
	color: var(--abayastore-text-secondary);
	font-size: 0.82em;
	font-weight: 500;
	opacity: 0.75;
}

.abayastore-product-shell .price ins {
	background: transparent;
	color: var(--abayastore-brand);
	text-decoration: none;
}

.abayastore-product-shell .woocommerce-product-details__short-description {
	color: var(--abayastore-text-secondary);
	font-size: 0.98rem;
	line-height: 1.65;
	margin-block: 0 24px;
}

.abayastore-options-introduction {
	border-block-start: 1px solid var(--abayastore-separator);
	padding-block-start: 22px;
}

.abayastore-options-introduction h2 {
	color: var(--abayastore-text);
	font-size: 1.08rem;
	margin: 0 0 5px;
}

.abayastore-options-introduction p {
	color: var(--abayastore-text-secondary);
	font-size: 0.83rem;
	line-height: 1.45;
	margin: 0;
}

.abayastore-option-groups {
	display: grid;
	gap: 22px;
	margin-block-start: 22px;
}

.abayastore-option-group {
	border: 0;
	margin: 0;
	min-inline-size: 0;
	padding: 0;
}

.abayastore-option-group legend {
	align-items: center;
	display: flex;
	inline-size: 100%;
	justify-content: space-between;
	margin-block-end: 11px;
	padding: 0;
}

.abayastore-option-group__title {
	color: var(--abayastore-text);
	font-size: 0.92rem;
	font-weight: 650;
}

.abayastore-option-group__value {
	color: var(--abayastore-brand);
	font-size: 0.78rem;
	font-weight: 650;
}

.abayastore-option-group__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.abayastore-option-chip {
	align-items: center;
	background: var(--abayastore-surface-elevated);
	border: 1px solid var(--abayastore-separator);
	border-radius: var(--abayastore-radius-sm);
	color: var(--abayastore-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.87rem;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	min-block-size: 44px;
	padding: 7px 15px;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.abayastore-option-chip:hover:not(:disabled) {
	border-color: var(--abayastore-brand);
	transform: translateY(-1px);
}

.abayastore-option-chip.is-selected {
	background: var(--abayastore-brand);
	border-color: var(--abayastore-brand);
	color: #fff;
}

.abayastore-option-chip:disabled {
	cursor: not-allowed;
	opacity: 0.34;
	text-decoration: line-through;
}

.abayastore-option-chip.is-color {
	border-radius: 999px;
	padding-inline: 7px 14px;
}

.abayastore-option-swatch {
	background: var(--abayastore-swatch);
	border: 1px solid rgb(0 0 0 / 16%);
	border-radius: 50%;
	block-size: 27px;
	box-shadow: 0 0 0 3px var(--abayastore-surface-elevated);
	inline-size: 27px;
}

.abayastore-option-chip.is-selected .abayastore-option-swatch {
	box-shadow: 0 0 0 3px var(--abayastore-brand);
}

.abayastore-option-groups__footer {
	display: flex;
	justify-content: flex-end;
}

.abayastore-reset-options {
	background: transparent;
	border: 0;
	color: var(--abayastore-brand);
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
	padding: 6px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.abayastore-product-enhanced .abayastore-native-variations,
.abayastore-product-enhanced .is-product-flow-trigger,
.abayastore-product-enhanced form.cart .single_add_to_cart_button,
.abayastore-product-enhanced form.cart .reset_variations {
	display: none !important;
}

.abayastore-product-shell form.cart {
	margin-block: 0 !important;
}

.abayastore-product-shell .single_variation_wrap {
	margin-block-start: 18px;
}

.abayastore-product-shell .woocommerce-variation-description,
.abayastore-product-shell .woocommerce-variation-availability {
	color: var(--abayastore-text-secondary);
	font-size: 0.85rem;
}

.abayastore-product-shell .woocommerce-variation-price {
	margin-block-end: 10px;
}

.abayastore-product-shell .quantity {
	float: none !important;
	margin: 0 !important;
}

.abayastore-quantity-control {
	align-items: center;
	background: var(--abayastore-surface);
	border: 1px solid var(--abayastore-separator);
	border-radius: 999px;
	display: inline-flex;
	gap: 2px;
	padding: 3px;
}

.abayastore-quantity-control button {
	align-items: center;
	background: var(--abayastore-surface-elevated);
	border: 0;
	border-radius: 50%;
	color: var(--abayastore-text);
	cursor: pointer;
	display: flex;
	font-size: 1.15rem;
	block-size: 38px;
	inline-size: 38px;
	justify-content: center;
	padding: 0;
}

.abayastore-quantity-control input.qty {
	appearance: textfield;
	background: transparent;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--abayastore-text);
	font-variant-numeric: tabular-nums;
	block-size: 38px;
	inline-size: 48px !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: center;
}

.abayastore-product-shell .product_meta {
	border-block-start: 1px solid var(--abayastore-separator);
	color: var(--abayastore-text-secondary);
	display: grid;
	font-size: 0.76rem;
	gap: 5px;
	margin-block-start: 22px;
	padding-block-start: 18px;
}

.abayastore-product-action {
	backdrop-filter: blur(24px) saturate(160%);
	background: rgb(255 255 255 / 88%);
	border-block-start: 1px solid var(--abayastore-separator);
	box-shadow: 0 -12px 36px rgb(0 0 0 / 7%);
	inset-block-end: 0;
	inset-inline: 0;
	padding: 11px max(16px, env(safe-area-inset-right)) max(11px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	position: fixed;
	z-index: 9998;
}

.abayastore-product-action[hidden] {
	display: none;
}

.abayastore-product-action__inner {
	align-items: center;
	display: grid;
	gap: clamp(18px, 4vw, 44px);
	grid-template-columns: minmax(130px, auto) minmax(240px, 480px);
	justify-content: end;
	margin-inline: auto;
	max-inline-size: var(--abayastore-content);
}

.abayastore-product-action__total {
	display: grid;
	gap: 1px;
}

.abayastore-product-action__total > span {
	color: var(--abayastore-text-secondary);
	font-size: 0.72rem;
}

.abayastore-product-action__total strong {
	color: var(--abayastore-text);
	font-size: 1rem;
	font-variant-numeric: tabular-nums;
}

.abayastore-product-action__total del {
	display: none;
}

.abayastore-product-action__total ins {
	background: transparent;
	text-decoration: none;
}

.abayastore-primary-action {
	align-items: center;
	background: var(--abayastore-brand-deep);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 0.94rem;
	font-weight: 650;
	gap: 14px;
	justify-content: center;
	min-block-size: 50px;
	padding-inline: 22px;
}

.abayastore-primary-action > span:last-child {
	font-size: 1.15rem;
}

.abayastore-primary-action:disabled {
	cursor: not-allowed;
	opacity: 0.42;
}

.abayastore-product-action__status {
	color: var(--abayastore-success);
	font-size: 0.72rem;
	margin: 4px auto 0;
	max-inline-size: var(--abayastore-content);
	min-block-size: 1em;
	text-align: end;
}

.abayastore-product-action__status.is-error {
	color: var(--abayastore-error);
}

.abayastore-product-enhanced {
	padding-block-end: 88px;
}

.abayastore-product-experience .woocommerce-tabs,
.abayastore-product-experience .related.products,
.abayastore-product-experience .up-sells.products {
	clear: both;
	margin-block-start: clamp(42px, 7vw, 82px);
}

.abayastore-product-experience .woocommerce-tabs {
	background: var(--abayastore-surface);
	border: 1px solid var(--abayastore-separator);
	border-radius: var(--abayastore-radius-lg);
	padding: clamp(20px, 3vw, 34px);
}

.abayastore-product-experience .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 0 !important;
}

.abayastore-product-experience .woocommerce-tabs ul.tabs::before,
.abayastore-product-experience .woocommerce-tabs ul.tabs li::before,
.abayastore-product-experience .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

.abayastore-product-experience .woocommerce-tabs ul.tabs li {
	background: var(--abayastore-surface-elevated) !important;
	border: 1px solid var(--abayastore-separator) !important;
	border-radius: 999px !important;
	margin: 0 !important;
	padding: 0 15px !important;
}

.abayastore-product-experience .woocommerce-tabs ul.tabs li.active {
	background: var(--abayastore-brand) !important;
	border-color: var(--abayastore-brand) !important;
}

.abayastore-product-experience .woocommerce-tabs ul.tabs li.active a {
	color: #fff !important;
}

.abayastore-product-experience .woocommerce-tabs .panel {
	color: var(--abayastore-text-secondary);
	line-height: 1.75;
}

.abayastore-product-experience .related.products > h2,
.abayastore-product-experience .up-sells.products > h2 {
	color: var(--abayastore-text);
	font-size: clamp(1.4rem, 2.4vw, 2rem);
	letter-spacing: -0.025em;
	margin-block-end: 22px;
}

.abayastore-product-experience .related.products ul.products,
.abayastore-product-experience .up-sells.products ul.products {
	display: grid;
	gap: clamp(14px, 2vw, 24px);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.abayastore-product-experience ul.products li.product {
	background: var(--abayastore-surface-elevated);
	border: 1px solid var(--abayastore-separator);
	border-radius: var(--abayastore-radius-lg);
	inline-size: auto !important;
	margin: 0 !important;
	overflow: hidden;
	padding: 8px 8px 16px !important;
}

.abayastore-product-experience ul.products li.product img {
	aspect-ratio: 4 / 5;
	background: var(--abayastore-tint);
	border-radius: var(--abayastore-radius-md);
	inline-size: 100%;
	object-fit: cover;
}

.abayastore-product-experience ul.products li.product .woocommerce-loop-product__title,
.abayastore-product-experience ul.products li.product .price,
.abayastore-product-experience ul.products li.product .ast-woo-product-category {
	margin-inline: 8px;
}

.abayastore-product-enhanced .abayastore-product-shell > .summary .ast-woo-product-category {
	display: none;
}

.abayastore-product-experience ul.products li.product .button {
	background: var(--abayastore-brand-deep);
	border-radius: 999px;
	color: #fff;
	inline-size: calc(100% - 16px);
	margin: 10px 8px 0;
	min-block-size: 44px;
	text-align: center;
}

.abayastore-product-experience :is(button, a, input, select):focus-visible {
	outline: 3px solid color-mix(in srgb, var(--abayastore-accent) 72%, #fff);
	outline-offset: 3px;
}

@media (max-width: 921px) {
	.abayastore-product-shell {
		grid-template-columns: minmax(0, 1fr) minmax(310px, 0.92fr);
		gap: 28px;
	}

	.abayastore-product-experience .related.products ul.products,
	.abayastore-product-experience .up-sells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.abayastore-product-experience div.product {
		padding: 12px 14px 56px;
	}

	.abayastore-product-experience .woocommerce-breadcrumb {
		display: none;
	}

	.abayastore-product-shell {
		display: block;
	}

	.abayastore-product-shell > .woocommerce-product-gallery {
		position: relative;
		inset: auto;
	}

	.abayastore-product-shell .flex-viewport,
	.abayastore-product-shell .woocommerce-product-gallery__wrapper {
		border-radius: var(--abayastore-radius-lg);
	}

	.abayastore-product-shell .woocommerce-product-gallery__image,
	.abayastore-product-shell .woocommerce-product-gallery__image > a {
		min-block-size: min(122vw, 590px);
	}

	.abayastore-product-shell .woocommerce-product-gallery__image img {
		block-size: min(122vw, 590px) !important;
	}

	.abayastore-product-shell .flex-control-thumbs li {
		flex-basis: 58px;
		inline-size: 58px !important;
	}

	.abayastore-product-shell .flex-control-thumbs img {
		block-size: 70px;
		inline-size: 58px;
	}

	.abayastore-product-shell > .summary {
		border: 0;
		border-radius: 0;
		box-shadow: none;
		margin-block-start: 18px !important;
		padding: 10px 2px 24px;
		position: relative;
		inset: auto;
	}

	.abayastore-product-toolbar {
		position: absolute;
		inset-block-start: 6px;
		inset-inline-end: 2px;
	}

	.abayastore-product-heading-meta {
		padding-inline-end: 54px;
	}

	.abayastore-product-shell .product_title {
		font-size: clamp(1.65rem, 8vw, 2.2rem);
		padding-inline-end: 50px;
	}

	.abayastore-product-action {
		padding-block-start: 9px;
	}

	.abayastore-product-action__inner {
		gap: 12px;
		grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
		justify-content: stretch;
	}

	.abayastore-primary-action {
		min-block-size: 48px;
		padding-inline: 16px;
	}

	.abayastore-product-action__status {
		max-block-size: 18px;
		overflow: hidden;
		text-align: center;
	}

	.abayastore-product-experience .woocommerce-tabs,
	.abayastore-product-experience .related.products,
	.abayastore-product-experience .up-sells.products {
		margin-block-start: 44px;
	}

	.abayastore-product-experience .woocommerce-tabs {
		border-radius: var(--abayastore-radius-md);
		padding: 18px 14px;
	}
}

@media (max-width: 420px) {
	.abayastore-product-experience .related.products ul.products,
	.abayastore-product-experience .up-sells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.abayastore-option-chip {
		font-size: 0.8rem;
		padding-inline: 12px;
	}

	.abayastore-product-action__total strong {
		font-size: 0.88rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.abayastore-product-experience *,
	.abayastore-product-experience *::before,
	.abayastore-product-experience *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

@media (forced-colors: active) {
	.abayastore-option-chip.is-selected,
	.abayastore-primary-action,
	.abayastore-stock-badge {
		border: 2px solid currentColor;
	}
}
