/* ==========================================================================
   Product Gallery Popup — Allo modal (single product only)
   Accent: #E62900 | Active thumb: rgba(37,99,235,.5)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Shell / overlay / z-index stacks
   -------------------------------------------------------------------------- */

.allo-gallery-popup[hidden] {
	display: none !important;
}

.allo-gallery-popup {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.allo-gallery-popup.is-open {
	display: flex;
}

.allo-gallery-popup .allo-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
}

.allo-gallery-popup .allo-modal-backdrop::before,
.allo-gallery-popup .allo-modal-backdrop::after {
	content: none !important;
	display: none !important;
}

.allo-gallery-popup .allo-modal {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1440px;
	height: 85vh;
	max-height: 800px;
	padding: 25px 32px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
	-webkit-user-select: none;
	user-select: none;
}

.allo-gallery-popup .allo-modal-thumbs,
.allo-gallery-popup .allo-thumbs-arrow,
.allo-gallery-popup .allo-stage-arrow,
.allo-gallery-popup .allo-modal-thumb,
.allo-gallery-popup .allo-modal-stage,
.allo-gallery-popup .allo-modal-stage-inner {
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.allo-gallery-popup .allo-modal img,
.allo-gallery-popup .allo-modal-thumb img,
.allo-gallery-popup .allo-modal-image {
	-webkit-user-drag: none;
	user-drag: none;
	-webkit-user-select: none;
	user-select: none;
	pointer-events: none;
}

body.tgp-lock {
	overflow: hidden !important;
}

/* Theme auth / cart above gallery (CSS loads only on single product) */
.mfp-bg,
.wd-popup-bg {
	z-index: 100060 !important;
}

.mfp-wrap,
.mfp-container {
	z-index: 100061 !important;
}

.mfp-content,
.mfp-content .popup-login-wrapper,
.mfp-content .wd-popup,
.wd-popup-holder {
	z-index: 100062 !important;
}

/* Mini-cart side only — NOT .wd-close-side (used by account dropdown overlay) */
.cart-widget-side,
.wd-cart-side,
.wd-side-cart,
.wd-dropdown-cart {
	z-index: 100070 !important;
}

/* --------------------------------------------------------------------------
   2. Header, close, tabs, hairline
   -------------------------------------------------------------------------- */

.allo-gallery-popup .allo-modal-close {
	position: absolute;
	top: 25px;
	right: 32px;
	left: auto;
	bottom: auto;
	z-index: 50;
	appearance: none;
	-webkit-appearance: none;
	float: none;
	inset-inline-start: auto;
	inset-inline-end: 32px;
	border: none !important;
	outline: none !important;
	background: transparent;
	box-shadow: none !important;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	padding: 0;
	margin: 0;
	color: #a3a3a3;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.2s ease, stroke 0.2s ease;
}

.allo-gallery-popup .allo-modal-close::-moz-focus-inner {
	border: 0 !important;
	padding: 0;
}

.allo-gallery-popup .allo-modal-close:hover {
	color: #000;
	background: transparent;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.allo-gallery-popup .allo-modal-close:focus,
.allo-gallery-popup .allo-modal-close:focus-visible,
.allo-gallery-popup .allo-modal-close:active {
	color: #a3a3a3;
	background: transparent;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.allo-gallery-popup .allo-modal-close:focus:hover,
.allo-gallery-popup .allo-modal-close:focus-visible:hover,
.allo-gallery-popup .allo-modal-close:active:hover {
	color: #000;
}

.allo-gallery-popup .allo-modal-close svg {
	display: block;
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	pointer-events: none;
	color: inherit;
	fill: none;
	stroke: currentColor;
}

.allo-gallery-popup .allo-modal-close svg path {
	stroke: currentColor;
	fill: none;
}

.allo-gallery-popup .allo-modal-header {
	flex: 0 0 auto;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	position: relative;
	z-index: 1;
	background: transparent;
}

.allo-gallery-popup .allo-modal-title,
.allo-gallery-popup #tgp-title {
	margin: 0;
	padding: 0 56px 0 0;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.35;
	color: #111;
	border-bottom: none;
	opacity: 1;
}

.allo-gallery-popup .allo-modal-tabs {
	display: flex;
	align-items: flex-end;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	gap: 28px;
	margin: 16px 0 0;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
}

.allo-gallery-popup .allo-modal-tab {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	border: none;
	border-radius: 0;
	outline: none;
	background: transparent;
	box-shadow: none;
	padding: 0 0 10px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: #737373;
	cursor: pointer;
	line-height: 1.2;
	text-decoration: none;
}

.allo-gallery-popup .allo-modal-tab:hover,
.allo-gallery-popup .allo-modal-tab:focus,
.allo-gallery-popup .allo-modal-tab:focus-visible {
	background: transparent;
	border: none;
	box-shadow: none;
	outline: none;
	color: #737373;
	text-decoration: none;
}

.allo-gallery-popup .allo-modal-tab.is-active {
	color: #E62900;
	font-weight: 500;
	background: transparent;
	box-shadow: none;
	border: none;
	border-bottom: 2px solid #E62900;
	margin-bottom: -1px;
	padding-bottom: 10px;
}

.allo-gallery-popup .allo-modal-tab.is-active:hover,
.allo-gallery-popup .allo-modal-tab.is-active:focus,
.allo-gallery-popup .allo-modal-tab.is-active:focus-visible {
	color: #E62900;
	background: transparent;
	border-bottom: 2px solid #E62900;
}

.allo-gallery-popup .allo-modal-tab[hidden] {
	display: none !important;
}

.allo-gallery-popup .allo-modal-body {
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	min-height: 0;
	margin: 0;
	overflow: hidden;
	padding: 12px 0 0;
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   3. Thumbnail column (arrows, cards, active soft-blue frame)
   -------------------------------------------------------------------------- */

.allo-gallery-popup .allo-modal-thumbs {
	width: 66px;
	min-width: 66px;
	max-width: 66px;
	flex: 0 0 66px;
	display: flex;
	flex-direction: column;
	align-items: center;
	align-self: stretch;
	min-height: 0;
	overflow: hidden;
	padding: 0;
	margin: 0;
	background: transparent;
	box-sizing: border-box;
}

.allo-gallery-popup .allo-thumbs-arrow {
	appearance: none;
	-webkit-appearance: none;
	border: none;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	background: transparent;
	box-shadow: none;
	width: 32px;
	height: 20px;
	padding: 0;
	color: #8c8c8c;
	cursor: pointer;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	font-size: 0;
	transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.allo-gallery-popup .allo-thumbs-arrow--up {
	margin: 0 0 16px;
}

.allo-gallery-popup .allo-thumbs-arrow--down {
	margin: 16px 0 0;
}

.allo-gallery-popup .allo-thumbs-arrow:hover:not(.is-disabled) {
	color: #2563eb;
}

.allo-gallery-popup .allo-thumbs-arrow--up:hover:not(.is-disabled) {
	transform: translateY(-2px);
}

.allo-gallery-popup .allo-thumbs-arrow--down:hover:not(.is-disabled) {
	transform: translateY(2px);
}

.allo-gallery-popup .allo-thumbs-arrow.is-disabled {
	opacity: 0.25;
	pointer-events: none;
	cursor: default;
	transform: none;
}

.allo-gallery-popup .allo-thumbs-arrow:focus,
.allo-gallery-popup .allo-thumbs-arrow:focus-visible {
	outline: none;
	box-shadow: none;
}

.allo-gallery-popup .allo-thumbs-arrow svg {
	display: block;
	width: 18px;
	height: 10px;
	flex-shrink: 0;
	pointer-events: none;
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
}

.allo-gallery-popup .allo-thumbs-arrow svg path {
	stroke: currentColor;
	stroke-width: 1.5;
	fill: none;
}

.allo-gallery-popup .allo-modal-thumbs-track {
	flex: 1 1 auto;
	min-height: 0;
	width: 66px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	overflow-y: auto;
	overflow-x: hidden;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	background: transparent;
	box-sizing: border-box;
}

.allo-gallery-popup .allo-modal-thumbs-track::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.allo-gallery-popup .allo-modal-thumb {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	min-width: 64px;
	max-width: 64px;
	height: 72px;
	min-height: 72px;
	max-height: 72px;
	flex: 0 0 72px;
	margin: 0;
	padding: 1px;
	border: 1px solid #e5e5e5;
	border-radius: 5px;
	background: #ffffff !important;
	background-color: #ffffff !important;
	box-shadow: none;
	cursor: pointer;
	box-sizing: border-box;
	overflow: hidden;
	opacity: 1;
	line-height: 0;
	font-size: 0;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.2s ease;
}

.allo-gallery-popup .allo-modal-thumb::before,
.allo-gallery-popup .allo-modal-thumb::after {
	content: none !important;
	display: none !important;
	background: none !important;
	box-shadow: none !important;
	border: none !important;
}

.allo-gallery-popup .allo-modal-thumb:hover,
.allo-gallery-popup .allo-modal-thumb.is-active,
.allo-gallery-popup .allo-modal-thumb.is-active:hover,
.allo-gallery-popup .allo-modal-thumb:focus,
.allo-gallery-popup .allo-modal-thumb:focus-visible {
	border: 1px solid rgba(37, 99, 235, 0.5);
	border-radius: 5px;
	box-shadow: none;
	padding: 1px;
	opacity: 1;
	outline: none;
	background: #ffffff !important;
	background-color: #ffffff !important;
}

.allo-gallery-popup .allo-modal-thumb img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center center;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Center stage (photo, zoom, side arrows)
   -------------------------------------------------------------------------- */

.allo-gallery-popup .allo-modal-stage {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	justify-content: center;
	position: relative;
	padding: 0 8px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	overflow: hidden;
	align-self: stretch;
}

.allo-gallery-popup .allo-modal-stage-inner {
	position: relative;
	width: 100%;
	max-width: 900px;
	height: 100%;
	min-height: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	cursor: crosshair;
	box-sizing: border-box;
	background: #fff;
	border: none;
	border-radius: 6px;
	box-shadow: inset 0 0 0 5px transparent;
	transition: box-shadow 0.2s ease;
	align-self: stretch;
}

.allo-gallery-popup .allo-modal-stage-inner:hover:not(.is-video-mode) {
	box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.1);
}

.allo-gallery-popup .allo-modal-stage-inner.is-video-mode {
	cursor: default;
	max-width: 100%;
}

.allo-gallery-popup .allo-modal-stage-inner.is-video-mode .allo-stage-arrow {
	display: none !important;
}

.allo-gallery-popup .allo-modal-stage-inner .allo-modal-image {
	width: auto;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
	margin: auto;
	transition: transform 0.15s ease-out;
	pointer-events: none;
	transform-origin: center center;
	will-change: transform;
}

.allo-gallery-popup .allo-modal-stage-inner .allo-modal-image[hidden],
.allo-gallery-popup .allo-modal-stage-inner.is-video-mode .allo-modal-image {
	display: none !important;
	visibility: hidden;
	width: 0;
	height: 0;
	max-width: 0;
	max-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	pointer-events: none;
}

.allo-gallery-popup .allo-stage-arrow {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 15;
	width: 40px;
	height: 64px;
	border-radius: 8px;
	background: rgba(189, 189, 189, 0.8);
	box-shadow: none;
	border: none;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	color: #fff;
	font-size: 0;
	line-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.allo-gallery-popup .allo-stage-arrow:hover {
	background: rgba(200, 200, 200, 0.95);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	color: #2563eb;
}

.allo-gallery-popup .allo-stage-arrow:focus,
.allo-gallery-popup .allo-stage-arrow:focus-visible {
	outline: none;
	box-shadow: none;
}

.allo-gallery-popup .allo-stage-arrow svg {
	display: block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	pointer-events: none;
	stroke: currentColor;
}

.allo-gallery-popup .allo-stage-arrow--prev {
	left: 14px;
	right: auto;
}

.allo-gallery-popup .allo-stage-arrow--next {
	right: 14px;
	left: auto;
}

.allo-gallery-popup .allo-stage-arrow[hidden] {
	display: none !important;
}

/* --------------------------------------------------------------------------
   5. Video player (full stage, no photo bleed)
   -------------------------------------------------------------------------- */

.allo-gallery-popup .allo-modal-video[hidden] {
	display: none !important;
	visibility: hidden;
	width: 0;
	height: 0;
	overflow: hidden;
	pointer-events: none;
}

.allo-gallery-popup .allo-modal-stage-inner.is-video-mode .allo-modal-video:not([hidden]) {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 580px;
	min-width: 0;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	z-index: 2;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.allo-gallery-popup .allo-modal-stage-inner.is-video-mode .allo-modal-video iframe {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 580px;
	min-height: 240px;
	border: none;
	border-radius: 8px;
	background: #000;
}

/* --------------------------------------------------------------------------
   6. Buy / price / credit / notify panel
   -------------------------------------------------------------------------- */

.allo-gallery-popup .allo-modal-buy {
	width: 280px;
	flex: 0 0 280px;
	align-self: stretch;
	padding: 0 0 0 8px;
	margin: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.allo-gallery-popup .allo-modal-price {
	font-size: 27px;
	font-weight: bold;
	color: #303030;
	text-align: center;
	margin-bottom: 15px;
	line-height: 1.2;
}

.allo-gallery-popup .allo-modal-price .woocommerce-Price-amount,
.allo-gallery-popup .allo-modal-price .amount,
.allo-gallery-popup .allo-modal-price bdi {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.allo-gallery-popup .allo-modal-btn {
	appearance: none;
	width: 100%;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
	text-align: center;
}

.allo-gallery-popup .allo-modal-btn--buy {
	background: #E62900;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 12px 0;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	transition: all 0.25s ease-in-out !important;
}

.allo-gallery-popup .allo-modal-btn--buy:hover {
	background-color: #c62300 !important;
	border-color: #c62300 !important;
	color: #ffffff !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 4px 12px rgba(198, 35, 0, 0.25) !important;
}

.allo-gallery-popup .allo-modal-btn--notify,
.allo-gallery-popup a.allo-modal-btn--notify {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 20px;
	margin: 0;
	box-sizing: border-box;
	background: #6393DF;
	color: #fff;
	border: none;
	border-radius: 5px;
	box-shadow: none;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.allo-gallery-popup .allo-modal-btn--notify:hover,
.allo-gallery-popup a.allo-modal-btn--notify:hover,
.allo-gallery-popup .allo-modal-btn--notify:focus,
.allo-gallery-popup a.allo-modal-btn--notify:focus {
	background: #5281cb;
	color: #fff;
	text-decoration: none;
	outline: none;
	box-shadow: none;
}

.allo-gallery-popup .allo-modal-btn--notify .wd-btn-text,
.allo-gallery-popup .allo-modal-btn--notify span {
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.allo-gallery-popup .allo-modal-btn--notify .wd-btn-icon,
.allo-gallery-popup .allo-modal-btn--notify i,
.allo-gallery-popup .allo-modal-btn--notify svg {
	display: none !important;
}

.allo-gallery-popup .allo-modal-btn--credit {
	background: #fff;
	color: #E62900;
	border: 1px solid #E62900;
	border-radius: 4px;
	padding: 8px 0;
	margin-top: 10px;
	font-size: 15px;
	font-weight: 500;
	text-transform: none;
	transition: all 0.25s ease-in-out !important;
}

.allo-gallery-popup .allo-modal-btn--credit:hover {
	background-color: #ffffff !important;
	border-color: #ec2900 !important;
	color: #ec2900 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 2px 10px rgba(236, 41, 0, 0.18) !important;
}

.allo-gallery-popup .allo-modal-btn[hidden],
.allo-gallery-popup a.allo-modal-btn--notify[hidden] {
	display: none !important;
}

/* --------------------------------------------------------------------------
   7. Mobile / tablet (< 1025px): hide custom popup — WoodMart PhotoSwipe only
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.allo-gallery-popup,
	.allo-modal-backdrop,
	.allo-gallery-popup .allo-modal-backdrop {
		display: none !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}

