.woocommerce ul.products li.product {
	position: relative;
}

.cpa-icon-stack {
	position: absolute;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 20;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.woocommerce ul.products li.product:hover .cpa-icon-stack {
	opacity: 1;
	transform: translateY(0);
}

.cpa-position-top_right {
	top: 12px;
	right: 12px;
}

.cpa-position-top_left {
	top: 12px;
	left: 12px;
}

.cpa-position-bottom_right {
	right: 12px;
	bottom: 12px;
}

.cpa-position-bottom_left {
	left: 12px;
	bottom: 12px;
}

.cpa-icon {
	width: 38px;
	height: 38px;
	min-width: 38px;
	min-height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.96);
	color: #111;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cpa-icon:hover {
	background: #111;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.cpa-icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	display: block;
	pointer-events: none;
}

@media (max-width: 768px) {
	.cpa-icon-stack {
		opacity: 1;
		transform: none;
	}

	.cpa-icon {
		width: 36px;
		height: 36px;
		min-width: 36px;
		min-height: 36px;
	}
}

.cpa-icon-clicked {
	transform: scale(0.92);
}

/* === QUICK VIEW MODAL: FIXED PREMIUM LAYOUT === */

.cpa-qv-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

.cpa-qv-modal.active {
	opacity: 1;
	pointer-events: auto;
}

.cpa-qv-overlay {
	position: absolute;
	inset: 0;

	/* мягкий светлый фон */
	background: rgba(255, 255, 255, 0.35);

	/* размытие */
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);

	/* плавность */
	transition: all 0.25s ease;
}

.cpa-qv-box {
	position: relative;
	z-index: 2;
	width: min(1140px, 100%);
	height: min(88vh, 940px);
	max-height: min(88vh, 940px);
	overflow: hidden;
	padding: 0;
	background: rgba(255, 255, 255, 0.98);
	border-radius: 24px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.14);
	border: 1px solid rgba(255,255,255,0.55);
	transform: translateY(6px) scale(0.996);
	transition: transform 0.24s cubic-bezier(.22,.61,.36,1);
}

.cpa-qv-modal.active .cpa-qv-box {
	transform: translateY(0) scale(1);
}

.cpa-qv-body {
	height: 100%;
	min-height: 0;
}

.cpa-qv-content {
	display: grid;
	grid-template-columns: minmax(360px, 1.05fr) minmax(380px, 0.95fr);
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

.cpa-qv-gallery {
	height: 100%;
	min-height: 0;
	overflow: hidden;
	padding: 30px;
	border-right: 1px solid #e5e7eb;
	background: linear-gradient(180deg, #f8f9fa 0%, #f4f5f6 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.cpa-qv-main-image {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}

.cpa-qv-main-image img {
	width: 100%;
	height: auto;
	max-height: 62vh;
	object-fit: contain;
	border-radius: 18px;
	display: block;
}

.cpa-qv-thumbs {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 16px;
	justify-content: center;
	flex-shrink: 0;
}

.cpa-qv-thumb {
	width: 68px;
	height: 68px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	padding: 4px;
	cursor: pointer;
	overflow: hidden;
	transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.cpa-qv-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.cpa-qv-thumb:hover {
	transform: translateY(-1px);
	border-color: rgba(17, 17, 17, 0.2);
}

.cpa-qv-summary {
	height: 100%;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 34px 34px 30px;
	scrollbar-width: thin;
}

.cpa-qv-title {
	margin: 0 42px 12px 0;
	font-size: 30px;
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.cpa-qv-price {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 12px;
}

.cpa-qv-stock,
.cpa-qv-sku {
	margin-bottom: 10px;
	font-size: 14px;
	color: #6b7280;
}

.cpa-qv-excerpt {
	color: #6b7280;
	font-size: 15px;
	line-height: 1.72;
	margin: 14px 0;
}

.cpa-qv-purchase {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 18px 0;
	padding: 18px;
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	background: rgba(255,255,255,0.98);
	box-shadow: 0 10px 30px rgba(17, 17, 17, 0.04);
}

.cpa-qv-qty {
	width: 74px;
	height: 48px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	padding: 0 10px;
	font-size: 15px;
}

.cpa-qv-add-to-cart,
.cpa-qv-view-product {
	min-height: 44px;
	border-radius: 12px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

.cpa-qv-accordions {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}

.cpa-qv-accordion {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
	padding: 0;
}

.cpa-qv-acc-title {
	cursor: pointer;
	padding: 15px 16px;
	font-size: 14px;
	font-weight: 600;
	position: relative;
}

.cpa-qv-acc-title::after {
	content: "+";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	line-height: 1;
	color: #6b7280;
}

.cpa-qv-accordion.is-open .cpa-qv-acc-title::after {
	content: "–";
}

.cpa-qv-acc-content {
	display: none;
	padding: 0 16px 16px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.65;
}

.cpa-qv-accordion.is-open .cpa-qv-acc-content {
	display: block;
}

.cpa-qv-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	min-height: 38px !important;
	max-width: 38px !important;
	max-height: 38px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.94) !important;
	color: #111 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	z-index: 20;
	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
	line-height: 1 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.cpa-qv-close svg {
	width: 15px !important;
	height: 15px !important;
	display: block !important;
	flex: 0 0 15px !important;
}

.cpa-qv-close:hover {
	background: #111 !important;
	color: #fff !important;
	transform: scale(1.04);
}



/* CLOSE BUTTON */

.cpa-qv-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	max-height: 34px !important;
	padding: 0 !important;
	margin: 0 !important;

	display: flex !important;
	align-items: center;
	justify-content: center;

	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255,255,255,0.96) !important;
	color: #111 !important;

	box-shadow: 0 6px 16px rgba(0,0,0,0.12);
	cursor: pointer;
	z-index: 10;
	line-height: 1 !important;
	appearance: none;
}

.cpa-qv-close svg {
	width: 15px !important;
	height: 15px !important;
	display: block;
	stroke: currentColor;
	pointer-events: none;
}

.cpa-qv-close:hover {
	background: #111 !important;
	color: #fff !important;
	transform: scale(1.04);
}

.cpa-qv-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.cpa-qv-image img {
	width: 100%;
	height: auto;
}

.cpa-qv-title {
	font-size: 22px;
	margin-bottom: 10px;
}

.cpa-qv-price {
	font-size: 18px;
	margin-bottom: 10px;
}

@media (max-width: 768px) {
	.cpa-qv-content {
		grid-template-columns: 1fr;
	}
}

/* Эффект размытия фона при открытой модалке */
.cpa-qv-modal.active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Затемнение */
    background-color: rgba(0, 0, 0, 0.5); 
    /* ТОТ САМЫЙ ЭФФЕКТ: Размытие фона */
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); /* Для Safari */
    
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* GALLERY */

.cpa-qv-gallery {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cpa-qv-main-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.cpa-qv-thumbs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.cpa-qv-thumb {
	width: 60px;
	cursor: pointer;
}

.cpa-qv-thumb img {
	width: 100%;
	border-radius: 6px;
}

/* PURCHASE */

.cpa-qv-purchase {
	display: flex;
	gap: 10px;
	margin: 15px 0;
}

.cpa-qv-qty {
	width: 60px;
	padding: 6px;
}

/* ACCORDION */

.cpa-qv-accordion {
	border-top: 1px solid #eee;
	padding: 10px 0;
}

.cpa-qv-acc-title {
	font-weight: 600;
	cursor: pointer;
}

.cpa-qv-acc-content {
	display: none;
	margin-top: 8px;
}

/* AI */

.cpa-qv-ai-placeholder {
	margin-top: 20px;
	padding: 10px;
	background: #f6f7f7;
	border-radius: 6px;
	font-size: 13px;
}

.cpa-qv-box {
	max-height: 90vh;
	overflow: hidden;
}

.cpa-qv-content {
	max-height: calc(90vh - 48px);
	overflow: hidden;
}

.cpa-qv-summary {
	max-height: calc(90vh - 48px);
	overflow-y: auto;
	padding-right: 8px;
}

.cpa-qv-gallery {
	position: sticky;
	top: 0;
	align-self: start;
}

.cpa-qv-accordions {
	display: grid;
	gap: 10px;
	margin-top: 18px;
}

.cpa-qv-accordion {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
}

.cpa-qv-accordion summary {
	list-style: none;
	cursor: pointer;
	padding: 15px 16px;
	font-size: 14px;
	font-weight: 600;
	position: relative;
}

.cpa-qv-accordion summary::-webkit-details-marker {
	display: none;
}

.cpa-qv-accordion summary::after {
	content: "+";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
	line-height: 1;
	color: #6b7280;
}

.cpa-qv-accordion[open] summary::after {
	content: "–";
}

.cpa-qv-accordion-content {
	padding: 0 16px 16px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.65;
}

.cpa-qv-attributes {
	display: grid;
	gap: 10px;
}

.cpa-qv-attr-row,
.cpa-qv-meta-row {
	display: grid;
	grid-template-columns: minmax(110px, 140px) 1fr;
	gap: 10px;
	padding-top: 4px;
}

.cpa-qv-attr-label,
.cpa-qv-meta-label {
	color: #111;
	font-weight: 600;
}

.cpa-qv-attr-value,
.cpa-qv-meta-value {
	color: #6b7280;
}

.cpa-qv-trust {
	display: grid;
	gap: 10px;
	padding: 16px 18px;
	background: #f6f7f8;
	border-radius: 18px;
	border: 1px solid rgba(17,17,17,0.04);
	margin: 16px 0;
}

.cpa-qv-trust-item {
	color: #374151;
	font-size: 13px;
	line-height: 1.55;
}

.cpa-qv-actions-row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 12px;
}

.cpa-qv-view-product {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	border-radius: 14px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #111;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cpa-qv-view-product:hover {
	background: #111;
	color: #fff;
	border-color: #111;
	text-decoration: none;
}

body.cpa-qv-open {
	overflow: hidden !important;
	touch-action: none;
}

.cpa-qv-modal.active {
	overscroll-behavior: contain;
}

.cpa-qv-box {
	overscroll-behavior: contain;
}

.cpa-qv-summary {
	overflow-y: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

.cpa-qv-summary::-webkit-scrollbar {
	width: 8px;
}

.cpa-qv-summary::-webkit-scrollbar-track {
	background: transparent;
}

.cpa-qv-summary::-webkit-scrollbar-thumb {
	background: rgba(17, 17, 17, 0.18);
	border-radius: 999px;
}

.cpa-qv-summary::-webkit-scrollbar-thumb:hover {
	background: rgba(17, 17, 17, 0.28);
}

/* Quick View add to cart row */
.cpa-qv-buy form.cart {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
	flex-wrap: nowrap !important;
	margin: 0 !important;
}

.cpa-qv-buy form.cart .quantity {
	margin: 0 !important;
	flex: 0 0 auto !important;
}

.cpa-qv-buy form.cart .qty {
	width: 78px !important;
	height: 48px !important;
	border-radius: 12px !important;
}

.cpa-qv-buy form.cart .single_add_to_cart_button {
	height: 48px !important;
	min-height: 48px !important;
	padding: 0 22px !important;
	border-radius: 14px !important;
	white-space: nowrap !important;
	flex: 1 1 auto !important;
}

@media (max-width: 640px) {
	.cpa-qv-buy form.cart {
		flex-wrap: wrap !important;
	}

	.cpa-qv-buy form.cart .quantity,
	.cpa-qv-buy form.cart .single_add_to_cart_button {
		width: 100% !important;
		flex: 1 1 100% !important;
	}
}

.cpa-qv-summary {
	scroll-behavior: smooth;
	scrollbar-gutter: stable;
	will-change: scroll-position;
}

.cpa-qv-summary * {
	-webkit-font-smoothing: antialiased;
}

/* Smooth modal animation */

.cpa-qv-modal {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.cpa-qv-modal.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.cpa-qv-overlay {
	opacity: 0;
	transition: opacity 0.22s ease;
}

.cpa-qv-modal.is-ready .cpa-qv-overlay {
	opacity: 1;
}

.cpa-qv-box {
	opacity: 0;
	transform: translateY(8px) scale(0.985);
	transition:
		opacity 0.24s cubic-bezier(.22,.61,.36,1),
		transform 0.24s cubic-bezier(.22,.61,.36,1);
	will-change: opacity, transform;
}

.cpa-qv-modal.is-ready .cpa-qv-box {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.cpa-qv-modal.is-leaving .cpa-qv-overlay {
	opacity: 0;
}

.cpa-qv-modal.is-leaving .cpa-qv-box {
	opacity: 0;
	transform: translateY(6px) scale(0.99);
}