/* =============================================================
   Queeny Product Grid Luxury — Styles
   ============================================================= */

/* ---- Grid layout ---- */
.queeny-product-grid-luxury {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

/* ---- Card base ---- */
.queeny-product-card {
	position: relative;
	background: #fff;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	display: flex;
	flex-direction: column;
}

/* ---- Card hover effects ---- */
.queeny-card-hover-lift .queeny-product-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.queeny-card-hover-shadow .queeny-product-card:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.queeny-card-hover-border .queeny-product-card {
	border: 2px solid transparent;
}
.queeny-card-hover-border .queeny-product-card:hover {
	border-color: #333;
}
.queeny-card-hover-scale .queeny-product-card:hover {
	transform: scale(1.02);
}

/* ---- Image container (V3.1 — aspect-ratio natif CSS) ---- */
.queeny-product-image {
	position: relative;
	overflow: hidden;
}

/*
 * Conteneur de l'image : aspect-ratio défini par Elementor (control image_aspect_ratio).
 * Fallback : 4/5 (portrait). Si une hauteur fixe est définie via image_height_px,
 * Elementor injecte height + aspect-ratio:auto qui prend le dessus.
 */
.queeny-product-img-link {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5; /* défaut portrait — remplacé par Elementor */
}

/* Les deux images occupent toujours 100 % du conteneur */
.queeny-product-img-link .queeny-product-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover; /* défaut — remplacé par Elementor (control image_object_fit) */
	transition: transform 0.4s ease, opacity 0.4s ease;
}
.queeny-product-img-link .queeny-secondary-img {
	opacity: 0;
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Image hover — zoom */
.queeny-image-hover-zoom .queeny-product-img-link:hover .queeny-primary-img {
	transform: scale(1.08);
}

/* Image hover — fade to secondary */
.queeny-image-hover-fade .queeny-product-img-link:hover .queeny-primary-img,
.queeny-image-hover-slide .queeny-product-img-link:hover .queeny-primary-img {
	opacity: 0;
}
.queeny-image-hover-fade .queeny-product-img-link:hover .queeny-secondary-img,
.queeny-image-hover-slide .queeny-product-img-link:hover .queeny-secondary-img {
	opacity: 1;
}

/* Image hover — slide (secondary slides up) */
.queeny-image-hover-slide .queeny-secondary-img {
	transform: translateY(10px);
}
.queeny-image-hover-slide .queeny-product-img-link:hover .queeny-secondary-img {
	transform: translateY(0);
}

/* ---- Badges (sale / new / trending) ---- */
.queeny-product-badges {
	position: absolute;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* Badge position classes on wrapper */
.queeny-badge-pos-top-left  .queeny-product-badges { top: 10px; left: 10px; }
.queeny-badge-pos-top-right .queeny-product-badges { top: 10px; right: 10px; }
.queeny-badge-pos-bottom-left  .queeny-product-badges { bottom: 10px; left: 10px; }
.queeny-badge-pos-bottom-right .queeny-product-badges { bottom: 10px; right: 10px; }

.queeny-badge {
	display: inline-block;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.4;
}

/* Badge style classes */
.queeny-badge-style-rounded .queeny-badge { border-radius: 4px; }
.queeny-badge-style-pill    .queeny-badge { border-radius: 50px; }

/* Default badge colours */
.queeny-sale-badge         { background: #e74c3c; color: #fff; }
.queeny-new-badge-indicator { background: #2c2c2c; color: #fff; }
.queeny-trending-badge     { background: #f39c12; color: #fff; }
/* Brand badge — independent absolute positioning */
.queeny-brand-badge {
	position: absolute;
	z-index: 3;
	top: 10px;
	right: 10px;
	background: #6c757d;
	color: #fff;
}

/* ---- Discount circle badge ---- */
.queeny-sale-indicator {
	position: absolute;
	z-index: 3;
	top: 10px;
	right: 10px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #e74c3c;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
	line-height: 1.2;
}

/* ---- Category badge (on image) ---- */
.queeny-category-badge {
	position: absolute;
	z-index: 3;
	bottom: 10px;
	left: 10px;
	display: inline-block;
	padding: 2px 10px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	background: rgba(255, 255, 255, 0.92);
	color: #333;
	border-radius: 2px;
}

/* ---- Quick actions overlay ---- */
.queeny-quick-actions {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 4;
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
	transform: translateY(calc(-50% + 8px));
}
.queeny-product-card:hover .queeny-quick-actions {
	opacity: 1;
	transform: translateY(-50%);
}

.queeny-quick-action {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #333;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	padding: 0;
}
.queeny-quick-action:hover {
	background: #333;
	color: #fff;
	transform: scale(1.1);
}
.queeny-quick-action svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}
.queeny-quick-action.added {
	color: #e74c3c;
}

/* ---- Product content ---- */
.queeny-product-content {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1; /* occupe tout l'espace restant de la carte */
}

/* Le footer toujours en bas quelle que soit la hauteur du texte */
.queeny-product-footer {
	margin-top: auto;
}

/* Content alignment */
.queeny-content-align-center .queeny-product-content {
	align-items: center;
	text-align: center;
}
.queeny-content-align-center .queeny-product-categories {
	justify-content: center;
}
.queeny-content-align-center .queeny-product-footer {
	justify-content: center;
}
.queeny-content-align-right .queeny-product-content {
	align-items: flex-end;
	text-align: right;
}
.queeny-content-align-right .queeny-product-categories {
	justify-content: flex-end;
}
.queeny-content-align-right .queeny-product-footer {
	justify-content: flex-end;
}

/* ---- Rating ---- */
.queeny-product-rating {
	display: flex;
	align-items: center;
	gap: 6px;
}
.queeny-product-stars {
	display: flex;
	gap: 2px;
}
.queeny-product-stars .star {
	width: 14px;
	height: 14px;
	color: #f0c040;
	flex-shrink: 0;
}
.queeny-product-stars .star.empty {
	color: #ddd;
}
.queeny-rating-text {
	font-size: 12px;
	color: #999;
}

/* ---- Brand ---- */
.queeny-product-brand {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #999;
}
.queeny-product-brand-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}
.queeny-product-brand-link:hover {
	color: #333;
}

/* ---- Title ---- */
.queeny-product-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
}
.queeny-product-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}
.queeny-product-title a:hover {
	color: #555;
}

/* ---- Subtitle ---- */
.queeny-product-subtitle {
	margin: 0;
	font-size: 13px;
	color: #888;
	line-height: 1.55;
}

/* ---- Price ---- */
.queeny-product-price {
	font-size: 15px;
	font-weight: 600;
	color: #222;
}
.queeny-product-price del {
	color: #aaa;
	font-weight: 400;
	margin-right: 4px;
}
.queeny-product-price ins {
	text-decoration: none;
	color: #e74c3c;
}

/* ---- Categories links ---- */
.queeny-product-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.queeny-product-category-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	background: #f2f2f2;
	color: #555;
	border-radius: 2px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.queeny-product-category-badge:hover {
	background: #333;
	color: #fff;
}

/* ---- Footer: cart + view details ---- */
.queeny-product-footer {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-top: 8px;
}

/* Add to cart button */
a.queeny-cart-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	background: #222;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	white-space: nowrap;
}
a.queeny-cart-btn:hover {
	background: #444;
	color: #fff;
}
a.queeny-cart-btn.added {
	background: #27ae60;
}

/* View details link */
.queeny-view-details {
	font-size: 13px;
	color: #555;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	line-height: 1.2;
	transition: color 0.2s ease;
	white-space: nowrap;
}
.queeny-view-details:hover {
	color: #222;
}

/* ---- No products message ---- */
.queeny-no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	color: #888;
	font-size: 15px;
}

/* ---- Category filter tabs ---- */
.queeny-product-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}
.queeny-filter-btn {
	padding: 7px 18px;
	background: transparent;
	border: 1px solid #ddd;
	color: #555;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	border-radius: 2px;
}
.queeny-filter-btn:hover,
.queeny-filter-btn.active {
	background: #222;
	color: #fff;
	border-color: #222;
}

/* ---- Pagination ---- */
.queeny-pagination {
	display: flex;
	margin-top: 36px;
}
.queeny-pagination ul {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.queeny-pagination ul li a,
.queeny-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #ddd;
	color: #333;
	font-size: 14px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	border-radius: 2px;
}
.queeny-pagination ul li a:hover {
	background: #555;
	color: #fff;
	border-color: #555;
}
.queeny-pagination ul li span:not(.dots) {
	background: #222;
	color: #fff;
	border-color: #222;
}
.queeny-pagination ul li span.dots {
	border: none;
	min-width: auto;
}

/* Load more */
.queeny-loadmore-wrap {
	justify-content: center;
}
.queeny-load-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 32px;
	background: transparent;
	color: #333;
	font-size: 14px;
	border: 1px solid #333;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease;
	border-radius: 2px;
}
.queeny-load-more-btn:hover {
	background: #333;
	color: #fff;
}
.queeny-load-more-btn:disabled {
	opacity: 0.55;
	cursor: default;
}

/* Spinner */
.queeny-ajax-loader {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 16px 0;
}
.queeny-ajax-loader .spinner,
.queeny-quickview-spinner .spinner {
	width: 22px;
	height: 22px;
	border: 2px solid #ddd;
	border-left-color: #333;
	border-radius: 50%;
	animation: queeny-spin 0.75s linear infinite;
}
@keyframes queeny-spin {
	to { transform: rotate(360deg); }
}

/* Infinite scroll trigger */
.queeny-infinite-scroll-trigger {
	display: flex;
	justify-content: center;
	padding: 20px 0 0;
}

/* ---- Quick View Modal ---- */
.queeny-quickview-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.queeny-quickview-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}
.queeny-quickview-content {
	position: relative;
	z-index: 1;
	background: #fff;
	width: 90%;
	max-width: 860px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: queeny-modal-in 0.25s ease;
}
@keyframes queeny-modal-in {
	from { opacity: 0; transform: scale(0.95); }
	to   { opacity: 1; transform: scale(1); }
}
.queeny-quickview-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #666;
	cursor: pointer;
	z-index: 2;
	transition: color 0.2s ease;
}
.queeny-quickview-close:hover { color: #000; }
.queeny-quickview-body { padding: 36px; }
.queeny-quickview-spinner {
	display: flex;
	justify-content: center;
	padding: 40px;
}

/* Quick view inner layout */
.queeny-quickview-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: start;
}
.queeny-quickview-image img { width: 100%; height: auto; display: block; border-radius: 3px; }
.queeny-quickview-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.queeny-quickview-cats  { font-size: 12px; color: #999; margin-bottom: 12px; }
.queeny-quickview-price { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.queeny-quickview-price del { color: #aaa; font-weight: 400; margin-right: 6px; }
.queeny-quickview-price ins { text-decoration: none; color: #e74c3c; }
.queeny-quickview-desc  { font-size: 14px; color: #666; margin-bottom: 20px; line-height: 1.6; }
.queeny-quickview-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.queeny-quickview-link { font-size: 13px; color: #555; border-bottom: 1px solid currentColor; text-decoration: none; transition: color 0.2s; }
.queeny-quickview-link:hover { color: #111; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.queeny-product-grid-luxury {
		grid-template-columns: repeat(2, 1fr);
	}
	.queeny-quickview-inner {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 767px) {
	.queeny-product-grid-luxury {
		grid-template-columns: 1fr;
	}
	.queeny-product-footer {
		flex-direction: column;
		align-items: flex-start;
	}
	.queeny-content-align-center .queeny-product-footer {
		align-items: center;
	}
	.queeny-content-align-right .queeny-product-footer {
		align-items: flex-end;
	}
	.queeny-quickview-content {
		width: 95%;
	}
	.queeny-quickview-body {
		padding: 24px;
	}
}
