.mqv-ig-card-container {
	margin-bottom: 30px;
	background: #ffffff;
	border: 1px solid #dbdbdb;
	border-radius: 4px;
	width: 100%;
	max-width: 470px; /* Keeps the vertical card from being too tall for the screen */
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/* Hide the WooCommerce expand icon as requested */
.woocommerce-product-gallery__trigger {
	display: none !important;
}

/* Instagram Image Wrap (Edge to edge) */
.mqv-preview-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	isolation: isolate;
}

.mqv-room-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	transition: opacity 0.6s ease-in-out;
}

.mqv-room-bg-light {
	z-index: 2;
	/* AI Alignment Nudges - adjust if furniture shifts during fade */
	background-position: var(--mqv-light-bg-pos-x, 50%) var(--mqv-light-bg-pos-y, 50%);
	transform: scale(var(--mqv-light-bg-zoom, 1.0));
}

.mqv-room-bg-default {
	z-index: 1;
}

.mqv-vinyl-preview {
	position: absolute;
	top: 40%; /* Centro visual ajustado para evitar techo */
	left: 50%;
	width: auto;
	max-width: 95%;
	aspect-ratio: auto;
	transform: translate(-50%, -50%);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
				height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
				opacity 0.3s ease,
				transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 10;
	animation: mqv-fade-in 0.6s ease-out;
}

.mqv-size-warning {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 11px;
	white-space: nowrap;
	z-index: 20;
	pointer-events: none;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes mqv-fade-in {
	0% { opacity: 0; }
	100% { opacity: 1; }
}

.mqv-vinyl-preview.is-inverted {
	transform: translate(-50%, -50%) scaleX(-1);
}

.mqv-vinyl-art,
.mqv-vinyl-sheen {
	position: absolute;
	inset: 0;
	mask-image: var(--mqv-vinyl-mask-image);
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-image: var(--mqv-vinyl-mask-image);
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

.mqv-vinyl-art {
	background: var(--mqv-selected-color, #111111);
	transition: background-color 0.4s ease;
}

.mqv-vinyl-sheen {
	background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.1) 100%);
	mix-blend-mode: screen;
	opacity: 0.5;
}

/* Instagram Footer */
.mqv-ig-footer {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Color Swatches Grid */
.mqv-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 5px;
}

.mqv-color-swatch {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid transparent;
	background-color: var(--mqv-swatch-color, #ccc);
	cursor: pointer;
	transition: transform 0.2s, border-color 0.2s;
	padding: 0;
}

.mqv-color-swatch:hover {
	transform: scale(1.1);
	border-color: #999;
}

.mqv-color-swatch.is-active,
.mqv-color-swatch.selected {
	border-color: #000;
	transform: scale(1.1);
	box-shadow: 0 0 0 2px #fff inset;
}

.mqv-color-swatch.is-disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.mqv-color-swatch-name {
	font-size: 0.9em;
	color: #666;
	margin-top: 8px;
	font-weight: 500;
}

.mqv-ig-actions {
	display: flex;
	align-items: center;
}

.mqv-ig-likes {
	font-size: 0.95rem;
	color: #262626;
}

.mqv-ig-bold {
	font-weight: 600;
}

/* Toggle Switch (Instagram style) */
.mqv-ig-toggle {
	position: relative;
	display: flex !important; /* Force flex */
	align-items: center;
	justify-content: flex-start;
	cursor: pointer;
	gap: 12px;
}

.mqv-ig-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.mqv-ig-toggle-pill {
	position: relative;
	width: 40px;
	height: 22px;
	background-color: #dbdbdb;
	border-radius: 34px;
	transition: .3s ease;
	flex-shrink: 0;
	margin-right: 12px !important;
	display: inline-block;
	vertical-align: middle;
}

.mqv-ig-toggle-pill:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 2px;
	bottom: 2px;
	background-color: white;
	border-radius: 50%;
	transition: .3s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mqv-ig-toggle input:checked + .mqv-ig-toggle-pill {
	background-color: #0095f6; /* Instagram Blue */
}

.mqv-ig-toggle input:checked + .mqv-ig-toggle-pill:before {
	transform: translateX(18px);
}

.mqv-ig-action-text {
	font-size: 0.95rem;
	font-weight: 600;
	color: #262626;
	user-select: none;
	display: inline-block;
	line-height: 22px; /* Match pill height */
}

.mqv-vinyl-art {
	background: var(--mqv-selected-color, #111111);
	transition: background-color 0.4s ease;
}

.mqv-vinyl-sheen {
	background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.1) 100%);
	mix-blend-mode: screen;
	opacity: 0.5;
}

@media (max-width: 767px) {
	.mqv-ig-card-container {
		border-left: none !important;
		border-right: none !important;
		border-radius: 0 !important;
		margin-left: -20px !important; /* Move it edge-to-edge on mobile */
		margin-right: -20px !important;
		width: calc(100% + 40px) !important;
		max-width: none !important;
	}

	.mqv-preview-wrap {
		aspect-ratio: 4 / 5 !important; /* More vertical space for immersion */
	}

	.mqv-ig-footer {
		padding: 15px 20px !important;
	}

	.mqv-ig-actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

.mqv-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 15px;
}

@media (max-width: 767px) {
	.mqv-color-swatches {
		gap: 8px;
	}
}

.mqv-color-swatch {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--mqv-swatch-color, #222222);
	outline: 2px solid transparent;
	outline-offset: 3px;
	box-shadow:
		inset 0 0 0 1px rgba(255,255,255,0.38),
		0 0 0 1px rgba(51, 37, 25, 0.08);
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, outline-color 0.18s ease;
}

.mqv-color-swatch:hover {
	transform: scale(1.24);
	box-shadow:
		inset 0 0 0 1px rgba(255,255,255,0.42),
		0 10px 18px rgba(40, 28, 20, 0.16);
}

.mqv-color-swatch.is-active {
	outline-color: rgba(47, 36, 25, 0.7);
	transform: scale(1.12);
}

.mqv-color-swatch.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.mqv-color-swatch-name {
	min-height: 22px;
	margin-top: 10px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	background: #f7f2eb;
	border: 1px solid rgba(61, 45, 31, 0.08);
	font-size: 0.9rem;
	line-height: 1.4;
	color: #3d2d1f;
	font-weight: 600;
}

.mqv-color-swatch-name::before {
	content: "";
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border-radius: 999px;
	background: var(--mqv-selected-color, #222222);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
	transition: background-color 0.4s ease;
}

.mqv-color-swatch-name.is-changing::before {
	animation: mqv-dot-fade 0.4s ease;
}

@keyframes mqv-dot-fade {
	0% { opacity: 1; }
	50% { opacity: 0.3; }
	100% { opacity: 1; }
}

/* Product Page Redesign - General Spacing */
.summary.entry-summary {
	line-height: 1.3 !important; /* Tighter line height for the whole summary */
}

.summary.entry-summary > * {
	margin-bottom: 10px !important; /* Tighter spacing between blocks */
}

.product_title {
	margin-top: 0 !important;
	margin-bottom: 5px !important;
	font-size: 1.6rem !important; /* Smaller title */
	letter-spacing: -0.01em;
}

.summary.entry-summary .price {
	margin-bottom: 12px !important;
	font-size: 1.3rem !important;
}

.woocommerce-product-details__short-description {
	margin-bottom: 15px !important;
	font-size: 0.95rem;
}

table.variations {
	margin-bottom: 8px !important;
}

table.variations tr {
	margin-bottom: 5px !important;
}

table.variations td.label {
	padding-top: 5px !important;
	padding-bottom: 2px !important;
}

table.variations td.value {
	padding-bottom: 8px !important;
}

/* Pago Seguro Section - Minimalist and Professional */
.merchant-payment-logos {
	margin-top: 15px !important;
	margin-bottom: 15px !important;
	padding: 8px 0 !important;
	border-top: 1px solid #eeeeee;
	border-bottom: 1px solid #eeeeee;
	max-width: 100%;
}

.merchant-payment-logos-title {
	margin-bottom: 6px !important;
}

.merchant-payment-logos-title strong {
	font-size: 0.75rem !important;
	color: #777 !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.merchant-payment-logos-images {
	display: flex !important;
	gap: 15px !important;
	align-items: center;
	justify-content: flex-start;
}

.merchant-payment-logos-images img {
	height: 18px !important; /* Slightly larger, matching text height */
	width: auto !important;
	opacity: 0.7;
	filter: grayscale(100%);
	transition: opacity 0.3s ease, filter 0.3s ease;
}

.merchant-payment-logos-images img:hover {
	opacity: 1;
	filter: grayscale(0%);
}

/* Custom Text Overlay */
.mqv-vinyl-preview {
	container-type: inline-size;
}

.mqv-custom-text-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--mqv-selected-color, #1a1a1a);
	font-size: 10cqw;
	font-weight: 700;
	text-align: center;
	pointer-events: none;
	z-index: 3;
	white-space: pre-wrap;
	width: 90%;
	word-break: break-word;
	font-family: inherit;
	line-height: 1.2;
	transition: color 0.3s ease;
}
