/* =========================================================
   Custom Product Grid — Core Styles
   Modern, minimal, Apple/Nike-inspired luxury eCommerce UI
   Uses CSS Grid + CSS Variables. No Flexbox for the grid itself.
   ========================================================= */

.cpg-section {
	--cpg-columns-desktop: 4;
	--cpg-columns-laptop: 4;
	--cpg-columns-tablet: 2;
	--cpg-columns-mobile: 2;
	--cpg-radius: 0px;
	--cpg-gap: 32px;

	--cpg-font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
	--cpg-max-width: 1600px;
	--cpg-pad-desktop: 80px;
	--cpg-pad-tablet: 40px;
	--cpg-pad-mobile: 20px;

	font-family: var(--cpg-font);
	max-width: var(--cpg-max-width);
	margin: 0 auto;
	padding: 60px var(--cpg-pad-desktop);
	box-sizing: border-box;
	overflow-x: hidden;
}

.cpg-section * {
	box-sizing: border-box;
}

/* Hard reset — themes and Elementor Global Kits often apply their own
   typography/margin defaults to h1-h6, p, a. This scoped reset makes sure
   the design always renders exactly as specified, no matter the theme. */
.cpg-section h1,
.cpg-section h2,
.cpg-section h3,
.cpg-section h4,
.cpg-section p,
.cpg-section a,
.cpg-section span {
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	text-shadow: none;
	box-shadow: none;
}

.cpg-section a {
	text-decoration: none !important;
}

/* ---------------- Header ---------------- */

.cpg-header {
	text-align: center;
	margin-bottom: 48px;
	max-width: 100%;
	overflow-wrap: break-word;
}

.cpg-title {
	font-family: var(--cpg-font) !important;
	font-weight: 800 !important;
	font-size: clamp(26px, 6vw, 54px);
	line-height: 1.1;
	letter-spacing: -0.5px;
	text-transform: uppercase !important;
	margin: 0 0 12px !important;
	color: var(--cpg-title-color, #111111);
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
}

.cpg-subtitle {
	display: inline-block;
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
	font-family: var(--cpg-font) !important;
	font-weight: 500 !important;
	font-size: clamp(14px, 2.2vw, 20px);
	letter-spacing: 1.5px;
	text-transform: uppercase !important;
	margin: 0 !important;
	padding-bottom: 6px;
	border-bottom: 1px solid currentColor !important;
	color: var(--cpg-subtitle-color, #111111);
}

/* ---------------- Grid ---------------- */

.cpg-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--cpg-columns-desktop), 1fr);
	gap: var(--cpg-gap);
	align-items: stretch;
}

/* ---------------- Card ---------------- */

.cpg-card {
	background: #ffffff;
	border-radius: var(--cpg-radius);
	overflow: hidden;
	box-shadow: none;
	transition: transform 0.35s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.cpg-card:hover {
	transform: translateY(-4px);
	box-shadow: none;
}

.cpg-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	flex: 1;
}

.cpg-card-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #ececec;
}

.cpg-card-image img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	display: block;
	transition: transform 0.5s ease;
}

.cpg-card:hover .cpg-card-image img {
	transform: scale(1.06);
}

.cpg-card-body {
	padding: 14px 0 0;
}

.cpg-product-title {
	font-family: var(--cpg-font) !important;
	font-weight: 700 !important;
	font-size: 18px;
	line-height: 1.3;
	text-transform: uppercase !important;
	margin: 0 0 4px !important;
	color: #111111;
}

.cpg-product-subtitle {
	display: inline-block;
	font-family: var(--cpg-font) !important;
	font-weight: 500 !important;
	font-size: 12px;
	text-transform: uppercase !important;
	margin: 0 0 8px !important;
	border-bottom: 1px solid currentColor !important;
	color: #666666;
}

.cpg-product-sku {
	font-weight: 400;
	font-size: 13px;
	color: #888888;
	margin: 0 0 8px;
}

.cpg-rating {
	margin: 0 0 8px;
}

.cpg-price {
	font-weight: 700;
	font-size: 16px;
	color: #111111;
	margin: 4px 0 0;
}

.cpg-price del {
	opacity: 0.5;
	font-weight: 400;
	margin-right: 8px;
}

.cpg-add-to-cart,
a.cpg-add-to-cart.button {
	display: inline-block;
	margin: 10px 0 4px;
	padding: 12px 22px;
	font-family: var(--cpg-font);
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-align: center;
	background: #111111;
	color: #ffffff !important;
	border-radius: 0;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background 0.3s ease;
}

.cpg-add-to-cart:hover,
a.cpg-add-to-cart.button:hover {
	background: #333333;
}

.cpg-empty {
	text-align: center;
	font-family: var(--cpg-font);
	color: #777;
	padding: 40px 0;
}

/* ---------------- Animations ---------------- */

.cpg-section[data-animation] .cpg-card {
	opacity: 0;
}

.cpg-section[data-animation="none"] .cpg-card {
	opacity: 1;
}

.cpg-card.cpg-in-view {
	opacity: 1;
	animation-fill-mode: both;
	animation-timing-function: ease;
	animation-name: var(--cpg-anim, cpgFadeUp);
	animation-duration: var(--cpg-anim-duration, 0.6s);
}

@keyframes cpgFadeUp {
	from { opacity: 0; transform: translateY(30px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes cpgFadeLeft {
	from { opacity: 0; transform: translateX(30px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes cpgFadeRight {
	from { opacity: 0; transform: translateX(-30px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes cpgZoom {
	from { opacity: 0; transform: scale(0.9); }
	to   { opacity: 1; transform: scale(1); }
}
@keyframes cpgSlideUp {
	from { opacity: 0; transform: translateY(60px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Responsive Breakpoints
   Desktop 1400px+  -> 4 columns
   Laptop 1200-1399 -> 4 columns
   Tablet 768-1199  -> 2 columns
   Mobile 320-767   -> 2 columns
   Never collapses to 1 column.
   ========================================================= */

@media (max-width: 1399px) {
	.cpg-grid {
		grid-template-columns: repeat(var(--cpg-columns-laptop), 1fr);
	}
}

@media (max-width: 1199px) {
	.cpg-section {
		padding-left: var(--cpg-pad-tablet);
		padding-right: var(--cpg-pad-tablet);
	}
	.cpg-grid {
		grid-template-columns: repeat(var(--cpg-columns-tablet), 1fr);
	}
	.cpg-product-title {
		font-size: 16px;
	}
	.cpg-product-subtitle {
		font-size: 11px;
	}
	.cpg-price {
		font-size: 15px;
	}
}

@media (max-width: 767px) {
	.cpg-section {
		padding-left: var(--cpg-pad-mobile);
		padding-right: var(--cpg-pad-mobile);
		padding-top: 40px;
		padding-bottom: 40px;
	}
	.cpg-grid {
		grid-template-columns: repeat(var(--cpg-columns-mobile), 1fr);
		gap: 16px;
	}
	.cpg-product-title {
		font-size: 14px;
	}
	.cpg-product-subtitle {
		font-size: 10px;
	}
	.cpg-price {
		font-size: 13px;
	}
	.cpg-card-body {
		padding: 10px 0 0;
	}
}

/* Laptop explicit range per spec (1200-1399 = 4 cols is same as desktop-1)
   Desktop true breakpoint kept separate for clarity/override room. */
@media (min-width: 1400px) {
	.cpg-grid {
		grid-template-columns: repeat(var(--cpg-columns-desktop), 1fr);
	}
}
