/**
 * Product Sheet — shell styles (C3.2.1).
 *
 * @package PasionGift_App
 */

.pasiongift-app__overlay.is-product-sheet-active {
	pointer-events: auto;
}

body.pg-product-sheet-active {
	overflow: hidden;
	overscroll-behavior: none;
}

.pasiongift-app__main.pg-product-sheet-scroll-lock {
	overflow: hidden !important;
	overscroll-behavior: none;
	touch-action: none;
}

.pg-product-sheet {
	position: fixed;
	inset: 0;
	z-index: calc(var(--pg-z-overlay) + 1);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	width: 100%;
	max-width: 100dvw;
	height: 100vh;
	height: 100dvh;
	pointer-events: none;
	box-sizing: border-box;
}

.pg-product-sheet.is-visible {
	pointer-events: auto;
}

.pg-product-sheet__backdrop {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: rgb(15 15 20 / 0.48);
	opacity: 0;
	cursor: pointer;
	transition: opacity var(--pg-transition-overlay) var(--pg-transition-ease);
}

.pg-product-sheet.is-visible .pg-product-sheet__backdrop {
	opacity: 1;
}

.pg-product-sheet.is-closing .pg-product-sheet__backdrop {
	opacity: 0;
}

.pg-product-sheet__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--pg-max-width);
	max-height: min(92dvh, 44rem);
	margin-inline: auto;
	background-color: var(--pg-color-surface);
	border-radius: 1rem 1rem 0 0;
	box-shadow: var(--pg-shadow-md);
	transform: translateY(100%);
	transition: transform var(--pg-transition-overlay) var(--pg-transition-ease);
	overflow: hidden;
	box-sizing: border-box;
}

.pg-product-sheet.is-visible .pg-product-sheet__panel {
	transform: translateY(0);
}

.pg-product-sheet.is-closing .pg-product-sheet__panel {
	transform: translateY(100%);
}

.pg-product-sheet__header {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	min-height: 2.5rem;
	padding: 0.5rem 0.75rem 0.25rem;
}

.pg-product-sheet__handle {
	width: 2.5rem;
	height: 0.25rem;
	border-radius: 999px;
	background-color: var(--pg-color-border);
}

.pg-product-sheet__close {
	position: absolute;
	top: 0.375rem;
	right: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--pg-color-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.pg-product-sheet__close:focus-visible {
	outline: 2px solid var(--pg-color-accent);
	outline-offset: 2px;
}

.pg-product-sheet__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	padding: 0;
}

.pg-product-sheet__content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}

.pg-product-sheet__status {
	margin: 0;
	padding: 2rem 1rem;
	font-family: var(--pg-font-family);
	font-size: var(--pg-font-size-sm);
	line-height: var(--pg-line-height-snug);
	text-align: center;
	color: var(--pg-color-text-muted);
}

.pg-product-sheet__status--error {
	color: var(--pg-color-danger, #b42318);
}

.pg-product-sheet__content[hidden] {
	display: none !important;
}

.pg-product-sheet-layout {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

.pg-product-sheet-layout__main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	overflow: hidden;
}

.pg-product-sheet-layout__summary {
	flex-shrink: 0;
}

.pg-product-sheet-layout__gallery {
	flex-shrink: 0;
}

.pg-product-sheet-layout--gallery-expanded .pg-product-sheet-layout__gallery,
.pg-product-sheet-layout--gallery-collapsed .pg-product-sheet-layout__gallery {
	overflow: hidden;
}

.pg-product-sheet-layout__scroll {
	position: relative;
	flex: 1 1 auto;
	min-height: 6.5rem;
	min-width: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.pg-product-sheet-layout__scroll.has-overflow::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	height: 2.75rem;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		transparent,
		var(--pg-color-surface)
	);
}

.pg-product-sheet-layout__footer {
	position: sticky;
	bottom: 0;
	z-index: 2;
	flex-shrink: 0;
	margin-top: auto;
}

@media (min-width: 768px) {
	.pg-product-sheet__panel {
		max-width: min(100%, 28rem);
		margin-inline: auto;
		border-radius: 1rem 1rem 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pg-product-sheet__backdrop,
	.pg-product-sheet__panel {
		transition: none;
	}
}
