/* ============================================================
   Cotton Product Cards – Frontend Styles
   Replicates the clean fashion-product card layout
   ============================================================ */

/* ---- Grid ---- */
.cotton-product-grid {
	display: grid;
	grid-template-columns: repeat(var(--cotton-cols-desktop, 5), 1fr);
	gap: 16px;
	width: 100%;
	box-sizing: border-box;
}

/* ---- Card ---- */
.cotton-product-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cotton-product-card:hover {
	transform: translateY(-2px);
}

/* ---- Image Wrapper ---- */
.cotton-product-img-wrap {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 3/4;
	/* default — overridden by Elementor selector */
	background-color: #f5f5f5;
}

/* ---- Primary / Hover images ---- */
.cotton-product-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}

/* Second (hover-swap) image — stacked on top, hidden by default */
.cotton-product-img-wrap .cotton-hover-img {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 1;
}

.cotton-product-img-wrap .cotton-primary-img {
	transition: opacity 0.4s ease, transform 0.45s ease;
}

/* Swap on hover when the second-image feature is active */
.cotton-has-hover-img:hover .cotton-hover-img {
	opacity: 1;
}

.cotton-has-hover-img:hover .cotton-primary-img {
	opacity: 0;
}

/* ---- Thumbnail hover animation classes ---- */

/* Scale (Zoom In) */
.cotton-hover-anim--scale .cotton-product-img-wrap .cotton-primary-img {
	transition: transform 0.45s ease, opacity 0.4s ease;
}

.cotton-hover-anim--scale:hover .cotton-product-img-wrap .cotton-primary-img {
	transform: scale(1.06);
}

/* Slide Up */
.cotton-hover-anim--slide_up .cotton-product-img-wrap .cotton-primary-img {
	transition: transform 0.45s ease, opacity 0.4s ease;
}

.cotton-hover-anim--slide_up:hover .cotton-product-img-wrap .cotton-primary-img {
	transform: translateY(-6px);
}

/* Fade */
.cotton-hover-anim--fade .cotton-product-img-wrap .cotton-primary-img {
	transition: opacity 0.4s ease;
}

.cotton-hover-anim--fade:hover .cotton-product-img-wrap .cotton-primary-img {
	opacity: 0.6;
}

/* ---- Quick View Overlay ---- */
.cotton-quick-view-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 0;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.cotton-product-card:hover .cotton-quick-view-overlay {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.cotton-quick-view-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 10px 20px;
	background-color: rgba(169, 169, 220, 0.88);
	color: #ffffff;
	font-size: 12px;
	font-family: inherit;
	letter-spacing: 0.04em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.cotton-quick-view-btn:hover {
	background-color: rgba(130, 130, 200, 0.95);
	color: #ffffff;
	text-decoration: none;
}

/* ---- Card Body ---- */
.cotton-product-body {
	padding: 10px 0 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* ---- Product Number ---- */
.cotton-product-number {
	display: block;
	font-size: 11px;
	color: #aaaaaa;
	letter-spacing: 0.06em;
	margin-bottom: 4px;
}

/* ---- Product Title ---- */
.cotton-product-title {
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
	/* clamp is applied dynamically via Elementor selector control */
}

.cotton-product-title a {
	color: #111111;
	text-decoration: none;
	transition: color 0.2s ease;
}

.cotton-product-title a:hover {
	color: #555555;
}

/* ---- Rating ---- */
.cotton-product-rating {
	margin-bottom: 4px;
}

.cotton-product-rating .star-rating {
	font-size: 12px;
}

/* ---- Price ---- */
.cotton-product-price .price {
	font-size: 13px;
	color: #444444;
	font-weight: 400;
	letter-spacing: 0.03em;
}

.cotton-product-price .price del {
	color: #aaaaaa;
	margin-right: 4px;
	font-size: 12px;
}

.cotton-product-price .price ins {
	text-decoration: none;
	color: #111111;
}

/* ---- Add to Cart ---- */
.cotton-add-to-cart {
	margin-top: 8px;
	width: 100%;
}

.cotton-add-to-cart a {
	display: block;
	width: 100%;
	padding: 9px 12px;
	background-color: #111111;
	color: #ffffff;
	text-align: center;
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.cotton-add-to-cart a:hover {
	background-color: #333333;
	color: #ffffff;
	text-decoration: none;
}

/* ---- Section Header (title + description above the grid) ---- */
.cotton-section-header {
	margin-bottom: 24px;
}

.cotton-section-title {
	margin: 0 0 8px;
	padding: 0;
	color: #111111;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.04em;
}

.cotton-section-desc {
	margin: 0;
	padding: 0;
	color: #666666;
	font-size: 14px;
	line-height: 1.6;
}

/* ---- CTA Button (below the grid) ---- */
.cotton-cta-wrap {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.cotton-cta-btn {
	display: inline-block;
	padding: 14px 40px;
	background-color: #111111;
	color: #ffffff;
	text-decoration: none;
	font-size: 13px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px solid #111111;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	cursor: pointer;
}

.cotton-cta-btn:hover {
	background-color: #333333;
	border-color: #333333;
	color: #ffffff;
	text-decoration: none;
}

/* =====================================================================
   RESPONSIVE – Tablet  (≤ 1024px)
   ===================================================================== */
@media (max-width: 1024px) {
	.cotton-product-grid {
		grid-template-columns: repeat(var(--cotton-cols-tablet, 3), 1fr);
	}
}

/* =====================================================================
   RESPONSIVE – Mobile  (≤ 767px)
   ===================================================================== */
@media (max-width: 767px) {
	.cotton-product-grid {
		grid-template-columns: repeat(var(--cotton-cols-mobile, 2), 1fr);
	}

	.cotton-product-title {
		font-size: 10px;
		letter-spacing: 0.08em;
	}

	.cotton-product-price .price {
		font-size: 11px;
	}

	.cotton-quick-view-btn {
		font-size: 10px;
		padding: 8px;
	}
}