:root {
	font-size: 14px;
	--wpc-prcu-primary: #4a00b2;
	--wpc-prcu-color-bg: #1c1c1c;
	--wpc-prcu-color-bg-rgb: 28, 28, 28;
	--wpc-prcu-color-text: #e3e3e3;
	--wpc-prcu-color-text-rgb: 227, 227, 227;
	--wpc-prcu-color-bg-rgb: 11, 11, 11;
	--wpc-prcu-color-link: #000;
	--wpc-prcu-color-link-hover: #131313;
	--wpc-prcu-padding-sides: .2vw;
	--wpc-prcu-padding-row: 1vh;
	--wpc-prcu-color-row-border: #f0f0f0;
	--wpc-prcu-color-bg-row-hover: #f0f0f0;
	--wpc-prcu-color-text-alt: #000;
	--wpc-prcu-image-gap: 2vw;
	--wpc-prcu-image-gap-large: 2vw;
	--wpc-prcu-img-size: 10vh;
	--wpc-prcu-img-size-large: 20vw;
}

[data-wpc-theme="dark"] {
	--wpc-prcu-color-bg-row-hover: #1B1C22;
	--wpc-table-hover-bg: #1B1C22;
}

*,
::before,
::after {
	-webkit-tap-highlight-color: transparent;
}

.cmt-prcu-row,
.cell,
.preview__item,
button,
label,
input {
	-webkit-tap-highlight-color: transparent;
	outline: none;
}

.oh {
	position: relative;
	overflow: hidden;
}

.oh__inner {
	will-change: transform;
	display: inline-block;
	/*min-width: 7em;*/
}

.text-truncate {
	width: 8em;
}


/* Page Loader 
.woocommerce-js.loading::before,
.woocommerce-js.loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.woocommerce-js.loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--wpc-prcu-color-bg);
}

.woocommerce-js.loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--wpc-prcu-color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5,0.5,1);
	}
}*/

.wpcmt-customizer a {
	text-decoration: none;
	color: var(--wpc-prcu-color-link);
	outline: none;
	cursor: pointer;
}

.hover-line {
	overflow: hidden;
	position: relative;
}

.hover-line::before {
	content: '';
	height: 1px;
	width: 100%;
	background: currentColor;
	position: absolute;
	top: 92%;
	transition: transform 0.3s;
	transform-origin: 0% 50%;
}

.hover-line:hover::before {
	transform: scaleX(0);
	transform-origin: 100% 50%;
}

a:hover {
	text-decoration: none;
	color: var(--wpc-prcu-color-link-hover);
	outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

a:focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	background: transparent;
}

a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
	background: transparent;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.unbutton:focus {
	outline: none;
}

.frame {
	width: 100%;
	padding: 3rem var(--wpc-prcu-padding-sides);
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: auto auto auto;
	grid-template-areas: 'title' 'prevdemo' 'sponsor';
	justify-content: start;
	grid-row-gap: 1rem;
	align-items: end;
	justify-items: start;
}

.frame__title {
	grid-area: title;
	display: flex;
	line-height: 1;
}

.frame__title-main {
	font-size: 1.953rem;
	margin: 0;
	font-weight: 400;
	font-family: neue-haas-grotesk-display, sans-serif;
	text-transform: none;
}

.frame__title-back {
	position: relative;
	display: flex;
	align-items: flex-end;
}

.frame__title-back span {
	display: none;
}

.frame__title-back svg {
	fill: currentColor;
}

.frame__prevdemo {
	grid-area: prevdemo;
}

.intro {
	padding: 1rem var(--wpc-prcu-padding-sides) 3rem;
}

.intro p {
	max-width: 860px;
}

.cover {
	background: rgba(var(--wpc-prcu-color-bg-rgb), 0.96);
	width: 100%;
	height: 0;
	opacity: 0;
	pointer-events: none;
	z-index: 14;
	position: fixed;
	left: 0;
	will-change: height, top;
}

.content {
	position: relative;
	/*z-index: 100;*/
	z-index: 11;
	border-bottom: 1px solid rgba(var(--wpc-prcu-color-bg-rgb), .4);

	/* Long list handling */
	max-height: 90vh;
	overflow-y: auto;
	overscroll-behavior-y: contain;
	scrollbar-width: thin;
	/*scrollbar-color: rgba(255, 255, 255, 0.2) transparent;*/
	scrollbar-color: #dde4d948 transparent;
	scrollbar-color: var(--wpc-prcu-color-text) transparent;
	scrollbar-color: rgba(var(--wpc-prcu-color-text-rgb), 0.12) rgba(var(--wpc-prcu-color-bg-rgb), 0.2);
	/* thumb track */
}

.content {
	position: sticky;
	top: 20px;
	/* Offset from the top of the browser window */
	max-height: calc(100vh - 40px);
	/* Keeps the block within the viewport */
	overflow-y: auto;
	/* Allows scrolling inside the customization box if items exceed screen height */
}

/* Respect WordPress Admin Bar offset if user is logged in */
.admin-bar .content {
	top: 52px;
	/* 32px WP Admin Bar + 20px padding */
	max-height: calc(100vh - 72px);
}


.content::-webkit-scrollbar {
	width: 6px;
}

.content::-webkit-scrollbar-track {
	background: transparent;
}

.content::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
}

.content::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.4);
}

.cmt-prcu-row {
	z-index: 1;
	color: var(--wpc-prcu-color-text);
	display: grid;
	position: relative;
	cursor: pointer;
	grid-template-rows: minmax(var(--wpc-prcu-img-size), auto);
	grid-template-columns: auto 1fr;
	grid-column-gap: 0;
	align-items: center;
	padding: var(--wpc-prcu-padding-row) var(--wpc-prcu-padding-sides);
	padding-bottom: 0;
	border-top: 1px solid var(--wpc-prcu-color-row-border);
	transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
}

.layout-dir-vertical .cmt-prcu-row {
	display: block;
}

.layout-dir-vertical .cell__title,
.layout-dir-vertical .preview__item-title {
	white-space: normal;
	margin-bottom: .2em;
}

.layout-dir-vertical .cell--images {
	margin-left: 0;
}


.cmt-prcu-row .cmt-prcu-display-column {
	display: flex;
	flex-direction: column;
}

.cmt-prcu-row:hover {
	background-color: var(--wpc-prcu-color-bg-row-hover);
}

.cmt-prcu-row--current {
	z-index: 11;
	transition: border-color 0.3s ease-out;
}

.cell {
	position: relative;
}

.cell__title,
.preview__item-title {
	margin: 0;
	position: relative;
	font-weight: 400;
	line-height: normal;
	white-space: nowrap;
}

.preview__item-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
}

h1.cell__title {
	font-size: clamp(2rem, 4vw, 2.75rem);
}

h2.cell__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
}

h3.cell__title,
.tippy-box h3 {
	/*font-size: clamp(1.25rem, 2.5vw, 1.75rem);*/
	font-size: clamp(1.12rem, 1.1rem + 1.2vw, 1.60rem);
}

h4.cell__title {
	font-size: clamp(1.1rem, 2vw, 1.5rem);
}

h5.cell__title {
	font-size: clamp(1rem, 1.5vw, 1.25rem);
}

h6.cell__title {
	font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

h7.cell__title {
	font-size: clamp(0.8rem, 1vw, 1rem);
}

div.cell__title,
span.cell__title,
p.cell__title {
	font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.cell__title--switch {
	/*font-family: lores-22-serif, sans-serif;
	font-family: var(--global-body-font-family);
	font-weight: 700;*/
	color: var(--global-palette2);
}

.cell__title {
	display: grid;
	grid-template-rows: 100% 100%;
}

.cell--images {
	display: flex;
	align-items: center;
	gap: var(--wpc-prcu-image-gap);
	justify-content: flex-start;
	margin-left: auto;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	/*scrollbar-color: rgba(0, 0, 0, 0.2) transparent;*/
	-ms-overflow-style: none;
	padding-bottom: .4rem;
	/* give slight breathing room for hover & scrollbar */
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.cell--images::-webkit-scrollbar {
	height: 6px;
}

.cell--images::-webkit-scrollbar-track {
	background: transparent;
}

.cell--images::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2);
	border-radius: 10px;
}

.cell--images::-webkit-scrollbar-thumb:hover {
	background-color: rgba(0, 0, 0, 0.4);
}

/*
.cell--images {
	gap: calc(var(--wpc-prcu-image-gap) - 1vh);
}*/

.cell__img {
	width: var(--wpc-prcu-img-size);
	display: grid;
	position: relative;
	grid-template-columns: 100%;
	grid-template-rows: auto auto;
	/*will-change: transform, opacity;
	opacity: 1;*/
	flex-shrink: 0;
	scroll-snap-align: start;
	padding: 0 .4vh;
	/*width: 10vh;*/
	/*transition: padding 200ms cubic-bezier(0.4, 0, 0.2, 1);*/
}

/*
.wpcomet-customizer .cmt-prcu-row:hover .cell__img {
	padding: 0;
}

.wpcomet-customizer .cmt-prcu-row:hover .cell--images {
	gap: var(--wpc-prcu-image-gap);
}*/

.cell__img-inner {
	aspect-ratio: var(--wpc-thumb-aspect, 1);
	width: 100%;
	border-radius: calc(var(--wpc-prcu-image-gap) / 3);
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

/* Use a highly specific selector to override aggressive WooCommerce themes (like Kadence) that apply height: auto to .woocommerce img */
.woocommerce .cmt-prcu-option .cell__img-inner img,
.woocommerce-page .cmt-prcu-option .cell__img-inner img,
.cell__img-inner img {
	width: 100%;
	height: 100%;
	object-fit: var(--wpc-thumb-bg-size, cover);
	object-position: var(--wpc-thumb-bg-pos, 50% 50%);
	border-radius: inherit;
	display: block;
	/*transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);*/
	transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	max-width: none;
	max-height: none;
}

/*
.cmt-prcu-option input[type="radio"]:checked+.draw img {
	width: auto;
	height: 120%;
}*/

.cmt-prcu-option:hover .draw img,
.cmt-prcu-option:focus-within .draw img,
.cmt-prcu-option input[type="radio"]:checked+.draw img {
	/*transform: scale(1.1);*/
	width: auto;
	height: 150%;
}



.cell__img-title {
	max-width: 100%;
	font-size: 1rem;
	font-weight: 300;
	color: var(--wpc-prcu-color-text-alt);
	margin: 0;
	height: 0;
	opacity: 0;
	white-space: nowrap;
	will-change: opacity, transform;

	display: none;
}

.page-footer {
	padding: 10vw 10vw 5vw;
}

.page-footer__text {
	max-width: 860px;
	margin: 1.5rem auto;
	line-height: 1.5;
}

.page-footer__credits {
	padding-top: 10vh;
	text-align: center;
}

.preview {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 200;
}

.preview__close {
	position: absolute;
	top: 0;
	right: 0;
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
	padding: 2rem;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
	font-family: sans-serif;
	background: var(--wpc-prcu-primary);
	z-index: 14;
}

.admin-bar .preview__close--show {
	top: 32px;
}

.preview__close--show {
	pointer-events: auto;
	opacity: 1;
}

.preview__nav {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	/* Let clicks pass through the container */
	z-index: 100;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.preview__close--show~.preview__nav {
	opacity: 1;
}

.preview__nav-btn {
	pointer-events: auto;
	/* Re-enable clicks on buttons */
	width: 48px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	font-size: 24px;
	border: none;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background 0.2s, transform 0.2s;
}

.preview__nav-btn:hover {
	background: rgba(0, 0, 0, 0.8);
}

.preview__nav-prev {
	border-radius: 0 8px 8px 0;
}

.preview__nav-next {
	border-radius: 8px 0 0 8px;
}

.preview__item {
	width: 100%;
	height: 100%;
	display: grid;
	/*align-items: center;*/
	justify-items: center;
	align-content: center;
	grid-gap: 2vh;
	height: 0;
	opacity: 0;
	overflow: hidden;
}

.preview__item .grid {
	max-height: 88vh;
	/*overflow-y: auto;
	overflow-x: hidden;*/
}

.preview__item-title {
	align-self: self-end;
}


.preview__item--current {
	pointer-events: auto;
	height: 100vh;
	opacity: 1;
}

.preview__item-header {
	max-width: 88%;
}

.preview__item-title {
	/*font-family: lores-22-serif, sans-serif;*/
	font-weight: 700;
	font-size: clamp(1.563rem, 6vw, 3.815rem);
}

.grid {
	position: relative;
	display: grid;
	width: 100%;
	grid-gap: var(--wpc-prcu-image-gap-large);
	justify-content: center;
	justify-items: center;
	--wpc-prcu-img-size: var(--wpc-prcu-img-size-large);
	grid-template-columns: repeat(auto-fill, minmax(28vw, 1fr));
	grid-auto-rows: auto;
	/*max-height: 70vh;*/
	/*overflow-y: auto;*/
	padding: 10px;
}

.grid .cell__img {
	width: 100%;
}

.grid .tippy-content h3 {
	font-size: clamp(1.24rem, 1.4vw, 1.66rem);
}

.cell__img {
	cursor: pointer;
}

.preview__item-title {
	text-align: center;
}

.customization-type--write_in .cell__img {
	width: auto;
}

.grid .cell__img[data-type="write_in"] {
	width: auto;
}

/*
.grid:has(label[data-type="write_in"]) {
	grid-template-columns: auto;
	background-color: #f0f8ff;
  border: 2px dashed #0073aa;
}*/

.cmt-prcu-row[data-dependencies] {
	transition: all 0.3s ease-in-out !important;
}

.cmt-dependency-hidden {
	opacity: 0 !important;
	visibility: hidden !important;
	max-height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
	transform: translateX(-20px) scale(0.95) !important;
	/* Slide + slight scale */
	pointer-events: none !important;
	border: none !important;
}

.cmt-dependency-disabled {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
}

.cmt-dependency-disabled * {
	pointer-events: none !important;
}

.cmt-dependency-visible {
	opacity: 1 !important;
	visibility: visible !important;
	max-height: 1000px !important;
	transform: translateX(0) scale(1) !important;
	/* Final position + normal scale */
	pointer-events: all !important;
}

.cmt-google-gallery-btn {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.04);
	padding: 8px 16px;
	border-radius: 6px;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 13px;
}

.preview__item .cmt-upload-wrapper {
	bottom: -10%;
}

.cmt-upload-btn {
	font-size: .96rem;
	padding: .4em .8em;
}

.cmt-view-controls-bottom {
	position: absolute;
	bottom: 2rem;
	width: 90%;
	left: 5%;
	display: flex;
	padding: 1em;
	align-items: center;
	justify-content: space-around;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.orwrap {
	display: flex;
	gap: 1rem;
}

.layout-dir-horizontal .cmt-prcu-row .cell--text {
	margin-right: 1vw;
}

.layout-dir-horizontal .cell--images {
	padding-right: 0;
}

@media (max-width: 768px) {
	.tippy-box {
		line-height: 1;
	}

	.tippy-content {
		padding: 0.6rem 1.2rem;
	}

	.tippy-box p {
		margin: .5rem 0;
	}

	:root {
		--wpc-prcu-image-gap-large: 4vw;
		--wpc-prcu-img-size-large: 42vw;
	}

	.preview__item {
		overflow-y: scroll;
	}
}

@media screen and (min-width: 61em) {
	.frame {
		grid-template-rows: auto;
		grid-template-areas: 'title prevdemo sponsor';
		grid-template-columns: auto auto 1fr;
		grid-column-gap: 2rem;
	}

	:root {
		--wpc-prcu-padding-sides: 1.2rem;
		--wpc-prcu-padding-row: .2rem;
		--wpc-prcu-img-size: 10vh;
		--wpc-prcu-img-size-large: 12vw;
		/*--wpc-prcu-image-gap: 1vw*/
		--wpc-prcu-image-gap: .5rem;
	}

	.grid {
		grid-template-columns: repeat(auto-fill, minmax(var(--wpc-prcu-img-size), 1fr));
		/*grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));*/

		/*grid-template-rows: repeat(2,var(--wpc-prcu-img-size));*/
	}

	.customization-mode--logotype .grid {
		grid-template-columns: subgrid;
	}

	/*
	.grid {
		max-width: 1200px;
	}*/
	.preview__item {
		/*max-width: 1200px;*/
		margin: 0 auto;
	}
}

@media screen and (min-width: 1921px) {
	.frame {
		grid-column-gap: 2rem;
	}

	/*
	:root {
		--wpc-prcu-padding-sides: 1.2rem;
		--wpc-prcu-padding-row: .6rem;
		--wpc-prcu-img-size: 8vw;
		--wpc-prcu-img-size-large: 12vw;
	}*/

	.grid {
		max-width: 1720px;
	}
}

@media screen and (min-width: 2196px) {
	.preview__item {
		max-width: 88%;
	}
}

@media screen and (min-width: 2496px) {
	.grid {
		max-width: 1996px;
	}
}

/* -----------------------------------------------------------------------
   Fabric.js Live Preview Canvas
   ----------------------------------------------------------------------- */
.cmt-preview-canvas-wrap {
	position: relative;
	width: 100%;
	/* Height is driven by JS canvas resize; the lower bound prevents collapse */
	min-height: 200px;
	margin-bottom: 1rem;
	overflow: hidden;
	border-radius: 6px;
	background: transparent;
}

.cmt-preview-canvas-wrap canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

/* Hide the wrap when there are no layers to show (JS adds this class) */
.cmt-preview-canvas-wrap.cmt-preview--empty {
	display: none;
}

/* -----------------------------------------------------------------------
   Sticky Bottom Search Bar Styles (Glassmorphism)
   ----------------------------------------------------------------------- */
.cmt-sticky-search-container {
	position: sticky;
	top: 0;
	width: 100%;
	z-index: 9;
	padding: 15px 20px;
}

.cmt-sticky-search-wrapper {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(155, 155, 155, 0.6);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
	padding: 0 1em;
	width: 100%;
	transition: all 0.3s ease;
}

.glassmorph {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cmt-sticky-search-wrapper:focus-within {
	/*background: rgba(255, 255, 255, 0.9);*/
	background: rgba(122, 122, 122, 0.4);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	border-color: rgba(230, 57, 70, 0.3);
}

.cmt-sticky-search-wrapper .search-icon {
	color: #6c757d;
	margin-right: 12px;
}

.cmt-sticky-search-wrapper input {
	flex-grow: 1;
	border: none;
	background: transparent;
	color: #333;
	outline: none;
}

.cmt-sticky-search-wrapper input::placeholder {
	color: #888;
}

.cmt-sticky-search-clear {
	background: none;
	border: none;
	color: #888;
	cursor: pointer;
	padding: 4px;
	margin-left: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

.cmt-sticky-search-clear:hover {
	color: #e63946;
}

/* -----------------------------------------------------------------------
   Grouping Filtering Pills Styles
   ----------------------------------------------------------------------- */
/* Adjust based on header height */
/*
.cmt-prcu-groups-wrapper {
	position: sticky;
	top: 55px;
	z-index: 2;
	background: #f8f9fa;
	border-bottom: 1px solid #ededed;
}*/

.cmt-prcu-groups-scroll {
	display: flex;
	overflow-x: auto;
	padding: 12px 15px;
	gap: 10px;
	scrollbar-width: none;
	/* Firefox */
	-ms-overflow-style: none;
	/* IE/Edge */
}

.cmt-prcu-groups-scroll::-webkit-scrollbar {
	display: none;
	/* Chrome/Safari */
}

.cmt-group-pill {
	white-space: nowrap;
	padding: 6px 16px;
	border-radius: 20px;
	/*
	background: #fff;
	border: 1px solid #dee2e6;
	color: #495057;
	font-size: 14px;
	font-weight: 500;*/
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/*
.cmt-group-pill:hover {
	background: #f1f3f5;
	border-color: #ced4da;
}*/

.cmt-group-pill.is-active {
	background: var(--wpc-prcu-primary);
	color: var(--wpc-prcu-text);
	/*border-color: #2b2d42;*/
	box-shadow: 0 2px 4px rgba(43, 45, 66, 0.2);
}

/* Filtering animation */
.cmt-prcu-row {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.cmt-group-hidden {
	display: none !important;
	opacity: 0;
	transform: scale(0.95);
}

.wpcomet-customizer {
	position: relative;
}

/* =======================================================================
   Layout Overhaul: Universal UX (Desktop Sticky & Mobile Snapshot)
   ======================================================================= */

/* --- Mobile View (< 992px) --- */
@media screen and (max-width: 991px) {

	/* Keep the preview canvas at the top naturally */
	.cmt-preview-canvas-wrap {
		display: flex !important;
		flex-direction: column;
		max-height: 80vh;
		/* Max 50% screen height */
		margin-bottom: 20px;
	}

	/* Sticky Top Snapshot Header (Hidden until scrolled) */
	.cmt-sticky-snapshot {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		background: rgba(var(--wpc-prcu-color-bg-rgb), 0.95);
		backdrop-filter: blur(10px);
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
		z-index: 11;
		/*padding: 10px 15px;*/
		transform: translateY(-100%);
		transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		display: flex;
	}

	.cmt-snapshot-content {
		padding: 1vh 2vh;
	}

	.admin-bar .cmt-sticky-snapshot {
		top: 32px;
	}

	@media screen and (max-width: 782px) {
		.admin-bar .cmt-sticky-snapshot {
			top: 46px;
		}
	}

	.cmt-sticky-snapshot.is-visible {
		transform: translateY(0);
	}

	.cmt-snapshot-thumb {
		position: relative;
		/*width: 50px;
		height: 50px;
		border-radius: 6px;
		margin-right: 15px;	
		background: var(--wpc-prcu-color-bg-row-hover);
		border: 1px solid var(--wpc-prcu-color-row-border);	*/
		overflow: hidden;
		flex-shrink: 0;
		cursor: pointer;
		height: 10vh;
	}

	.woocommerce .cmt-sticky-snapshot .cmt-snapshot-thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		aspect-ratio: 12/9;
		object-position: center 25%;

	}

	.cmt-snapshot-expand-icon {
		position: absolute;
		left: -2px;
		background: rgba(0, 0, 0, 0.24);
		color: #fff;
		font-size: 20px;
		opacity: .80;
		line-height: 1;
		display: inline-block;
		bottom: 0px;
		padding: 2px 2px;
		width: 24px;
		height: 24px;
		text-align: center;
		border-radius: 4px;
		/*background: red;*/
	}

	.cmt-snapshot-content {
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex: 1;
	}

	.cmt-snapshot-info {
		display: flex;
		flex-direction: column;
	}

	.cmt-snapshot-title {
		font-size: 13px;
		font-weight: 600;
		color: var(--wpc-prcu-color-text);
		margin-bottom: 2px;
		display: -webkit-box;
		line-clamp: 1;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.cmt-snapshot-price {
		font-size: 14px;
		font-weight: 700;
		color: var(--wpc-prcu-primary, #4a00b2);
	}

	.cmt-snapshot-action {
		display: flex;
		gap: 8px;
		align-items: center;
	}

	.cmt-snapshot-action .btn {
		padding: 6px 12px;
		font-size: 12px;
		border-radius: 4px;
	}

	/* Sticky Bottom Cart Footer (Hidden until triggered) */
	.cmt-sticky-footer {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		background: var(--wpc-prcu-color-bg);
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
		/*z-index: 9998;*/
		z-index: 10;
		transform: translateY(100%);
		transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		padding: 10px 15px 15px;
		border-top-left-radius: 16px;
		border-top-right-radius: 16px;
		display: flex;
		flex-direction: column;
	}

	.cmt-sticky-footer.is-visible {
		transform: translateY(0);
	}

	.cmt-footer-drag-handle {
		display: flex;
		justify-content: center;
		padding-bottom: 12px;
		cursor: pointer;
		position: absolute;
		text-align: center;
		width: 100%;
		left: 0;
	}

	.cmt-drag-pill {
		width: 36px;
		height: 5px;
		background: var(--wpc-prcu-color-text);
		opacity: 0.3;
		border-radius: 4px;
	}

	.cmt-sticky-footer-inner {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.cmt-footer-total {
		display: flex;
		flex-direction: column;
	}

	.cmt-footer-label {
		font-size: 12px;
		color: var(--wpc-prcu-color-text);
		opacity: 0.7;
	}

	.cmt-footer-price {
		font-size: 18px;
		font-weight: 700;
		color: var(--wpc-prcu-color-text);
	}

	#cmt-mobile-add-to-cart-trigger {
		background: var(--wpc-prcu-primary, #000);
		color: var(--wpc-prcu-text, #fff);
		font-weight: bold;
		padding: 10px 16px;
		border-radius: 6px;
		border: none;
		white-space: nowrap;
		flex-shrink: 0;
	}

	.cmt-sticky-footer-inner #cmt-inline-search-container {
		flex: 1;
		margin: 0 10px;
		padding: 0 !important;
	}

	.cmt-sticky-footer-inner #cmt-inline-search-container .search-input {
		padding: 6px 12px;
		font-size: 13px;
		height: 36px;
		border-radius: 6px;
		background: rgba(var(--wpc-prcu-color-bg-rgb), 0.88);
		border: 1px solid var(--wpc-prcu-color-row-border);
		color: var(--wpc-prcu-color-text);
		width: 100%;
	}

	.cmt-footer-expanded-content {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
	}

	.cmt-sticky-footer.is-expanded .cmt-footer-expanded-content {
		max-height: 60vh;
		overflow-y: auto;
		padding-top: 15px;
		margin-top: 15px;
		border-top: 1px solid var(--wpc-prcu-color-row-border);
	}

	/* Fullscreen Modal Override for Canvas */
	.cmt-preview-fullscreen {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		z-index: 999999 !important;
		background: var(--wpc-prcu-color-bg) !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 20px !important;
		animation: cmtPreviewFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	}

	@keyframes cmtPreviewFadeIn {
		from {
			opacity: 0;
			transform: scale(0.95) translateY(20px);
		}

		to {
			opacity: 1;
			transform: scale(1) translateY(0);
		}
	}

	/*
	.cmt-preview-fullscreen .cmt-view-controls {
		margin-top: 40px;
		 Space for close button 
	}*/

	/* Disable the internal scrollbar on mobile so the window scrolls natively 
	   and the IntersectionObserver correctly detects the canvas leaving the viewport */
	section.content {
		max-height: none !important;
		overflow: visible !important;
		position: static !important;
	}

	/*
	.cmt-sticky-search-container {
		display: none !important;
	}*/

	.cmt-prcu-row {
		padding: .6vh 0 0 0;
	}
}

/* --- Desktop Layout --- */
@media screen and (min-width: 992px) {

	/* Hide mobile-only sticky elements */
	.cmt-sticky-snapshot,
	.cmt-sticky-footer {
		display: none !important;
	}

	.cmt-fullscreen-close-btn {
		position: absolute;
		top: 15px;
		right: 15px;
		z-index: 1000000;
		font-size: 36px;
		background: rgba(var(--wpc-prcu-color-bg-rgb), 0.7);
		border-radius: 50%;
		width: 40px;
		height: 40px;
		line-height: 40px;
		text-align: center;
		border: none;
		cursor: pointer;
		color: var(--wpc-prcu-color-text);
	}

	/* WooCommerce replaces the left gallery with our canvas */
	/* Make the Canvas sticky on the left side 
	.cmt-preview-canvas-wrap {
		position: sticky;
		top: 20px;
		height: calc(100vh - 40px);
		display: flex;
		flex-direction: column;
		justify-content: center;
	}*/

	.preview__item--current.customization-mode--logotype #cmt-preview-wrap.cmt-preview-canvas-wrap,
	.preview__item--current.customization-type--upload #cmt-preview-wrap.cmt-preview-canvas-wrap {
		/*display: block;*/
		position: relative;
		max-width: none;
		min-width: 0;
		/*width: 100%;*/
	}

	/* Fix: Ensure view controls don't get squeezed out by overflow:hidden */
	.cmt-view-controls {
		flex-shrink: 0 !important;
		z-index: 10;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
	}

	/* The right side (customizations list) should NOT have a clamped max-height, 
	   otherwise it creates an internal scrollbar rather than scrolling with the page */
	section.content {
		max-height: none !important;
		overflow: visible !important;
		position: relative !important;
		top: auto !important;
	}
}

/* Hide duplicate upload wrapper when in expanded view */
.preview__item .grid>.cmt-upload-wrapper:not(.cmt-expanded-upload-card) {
	display: none !important;
}


.grid {
	display: grid;
	gap: 1rem;
}

/* ==========================================
   MOBILE: Always 2 columns
   ========================================== */
.grid {
	grid-template-columns: repeat(2, 1fr);
}

/* ==========================================
   TABLET (768px and up)
   ========================================== */
@media (min-width: 768px) {
	.grid {
		grid-template-columns: repeat(5, 1fr);
	}

	/* 1, 2, or 3 items total: 30% width each & centered */
	.grid:not(:has(> :nth-child(4))) {
		grid-template-columns: repeat(auto-fit, minmax(0, 30%));
		justify-content: center;
		/* <--- Centers the columns */
	}
}

/* ==========================================
   DESKTOP (1024px and up)
   ========================================== */
@media (min-width: 1024px) {
	.grid {
		/*grid-template-columns: repeat(6, 1fr);*/
		grid-template-columns: repeat(auto-fit, minmax(0, 16%));
	}

	/* 1, 2, or 3 items total: 25% width each & centered */
	.grid:not(:has(> :nth-child(4))) {
		grid-template-columns: repeat(auto-fit, minmax(0, 25%));
		justify-content: center;
		/* <--- Centers the columns */
	}
}

@media (min-width: 2400px) {
	.grid {
		/*grid-template-columns: repeat(6, 1fr);*/
		grid-template-columns: repeat(auto-fit, minmax(0, 12%));
	}

	/* 1, 2, or 3 items total: 25% width each & centered */
	.grid:not(:has(> :nth-child(4))) {
		grid-template-columns: repeat(auto-fit, minmax(0, 20%));
	}
}


@media (orientation: landscape) and (height <=480px),
(width <=480px) {
	.woocommerce .joinchat {
		display: none;
		right: auto;
		left: 4rem;
		bottom: 4rem;
		z-index: 8;
	}
}

/* -----------------------------------------
   Collapsible Upload Drawer
----------------------------------------- */
.cmt-expanded-upload-card.drawer-expanded,
.cmt-expanded-upload-card.drawer-collapsed {
	position: absolute;
	bottom: 0 !important;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 450px;
	border-radius: 20px 20px 0 0;
	z-index: 99;
	padding: 0 !important;
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cmt-expanded-upload-card.drawer-collapsed {
	transform: translate(-50%, calc(100% - 60px));
}

.cmt-expanded-upload-card .drawer-content {
	transition: opacity 0.2s ease;
	opacity: 1;
}

/*
.cmt-expanded-upload-card.drawer-collapsed .drawer-content {
    opacity: 0;
    pointer-events: none;
}*/

.cmt-expanded-upload-card .drawer-chevron {
	transition: transform 0.3s ease;
}

.cmt-expanded-upload-card.drawer-collapsed .drawer-chevron {
	transform: rotate(180deg);
}