/* ==========================================================================
   PRODUCT MODAL — Popup checkout with image zoom
   ========================================================================== */

.product-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 1rem;
}

.product-modal-overlay--open {
	opacity: 1;
	visibility: visible;
}

.product-modal {
	position: relative;
	background: #111;
	border: 1px solid rgba(255, 255, 255, 0.08);
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	transform: scale(0.95) translateY(10px);
	transition: transform 0.3s ease;
}

.product-modal-overlay--open .product-modal {
	transform: scale(1) translateY(0);
}

/* Close button */
.product-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #fff;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	transition: background 0.2s ease;
}

.product-modal__close:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* Image container with zoom */
.product-modal__image-wrap {
	position: relative;
	background: #0a0a0a;
	overflow: hidden;
	cursor: zoom-in;
	aspect-ratio: 1 / 1;
}

.product-modal__image-wrap--zoomed {
	cursor: zoom-out;
}

.product-modal__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
	transform-origin: center center;
}

.product-modal__image-wrap--zoomed .product-modal__image {
	transform: scale(2.5);
	transition: none;
}

/* Zoom hint */
.product-modal__zoom-hint {
	position: absolute;
	bottom: 0.75rem;
	left: 0.75rem;
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.4);
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.product-modal__image-wrap--zoomed .product-modal__zoom-hint {
	opacity: 0;
}

/* Product info panel */
.product-modal__info {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.product-modal__title {
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-size: 1.25rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-white, #f5f5f7);
	margin: 0;
	line-height: 1.2;
}

.product-modal__price {
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 1rem;
	color: var(--color-accent, #EAFF2B);
	letter-spacing: 0.02em;
}

.product-modal__description {
	font-size: 0.85rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
}

/* Size / variant selector */
.product-modal__variants {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.product-modal__variants-label {
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.4);
}

.product-modal__variants-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.product-modal__variant-btn {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: rgba(255, 255, 255, 0.7);
	padding: 0.5rem 1rem;
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 44px;
	min-height: 44px;
}

.product-modal__variant-btn:hover {
	border-color: rgba(255, 255, 255, 0.5);
	color: #fff;
}

.product-modal__variant-btn--active {
	border-color: var(--color-accent, #EAFF2B);
	color: var(--color-accent, #EAFF2B);
}

/* Buy button */
.product-modal__buy {
	display: block;
	width: 100%;
	padding: 1rem;
	background: var(--color-accent, #EAFF2B);
	color: var(--color-black, #000);
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-size: 1.1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	text-align: center;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: opacity 0.2s ease;
	min-height: 44px;
	margin-top: auto;
}

.product-modal__buy:hover {
	opacity: 0.85;
}

.product-modal__buy--sold-out {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.4);
	cursor: not-allowed;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
	.product-modal-overlay {
		padding: 0;
		align-items: flex-end;
	}

	.product-modal {
		grid-template-columns: 1fr;
		max-height: 95vh;
		border: none;
		width: 100%;
		max-width: 100%;
	}

	.product-modal__image-wrap {
		max-height: 45vh;
	}

	.product-modal__info {
		padding: 1.25rem;
	}

	.product-modal__title {
		font-size: 1rem;
	}

	.product-modal__close {
		top: 0.5rem;
		right: 0.5rem;
	}
}
