/* Product Card Grid */
.pc-product-grid {
	display: grid;
	gap: 20px;
}

/* Default fallback */
/* Columns are controlled via Elementor Inline CSS */

/* Individual Card */
.pc-product-card {
	background-color: #ffffff;
	border: 1px solid #eaeaea;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	box-sizing: border-box;
}

.pc-product-card * {
	box-sizing: border-box !important;
	max-width: 100%;
}

body {
	overflow-x: hidden;
	width: 100%;
	max-width: 100%;
}

.pc-product-card:hover {
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
	transform: translateY(-2px);
}

/* Product Image & Labels Container */
.pc-product-image {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding-top: 100%;
	display: block;
	/* 1:1 Aspect Ratio hack fallback, though woo img is auto usually */
}

.pc-product-image img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.5s ease;
	margin: 0 !important;
}

.pc-product-card:hover .pc-product-image img {
	transform: scale(1.05);
}

/* Labels */
.pc-product-labels-container {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	z-index: 10;
}

.pc-product-label {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 50px;
	/* Pill shape */
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	/* Colors are global or inline */
}

/* Card Content / Text Area */
.pc-product-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
}

.pc-product-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #333333;
	/* Line Clamp Setup */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
	white-space: normal !important;
}

/* Extra WooCommerce Reset */
.woocommerce ul.products,
.woocommerce-page ul.products {
	margin: 0 !important;
	padding: 0 !important;
}

/* Meta Row (Price + Cart Button) */
.pc-product-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-top: auto;
	/* Pushes to bottom */
	padding-top: 15px;
	gap: 10px;
	min-width: 0;
}

.pc-product-price {
	font-size: 18px;
	font-weight: 700;
	color: #111111;
	transition: color 0.3s ease;
	max-width: 100%;
	min-width: 0;
	word-break: break-word;
}

.pc-product-price del {
	font-size: 14px;
	color: #999999;
	font-weight: 400;
	margin-right: 5px;
}

.pc-product-price ins {
	text-decoration: none;
}

/* Add to Cart Button */
.pc-add-to-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #111111;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 8px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: normal;
	text-align: center;
	max-width: 100%;
	min-width: 0;
}

.pc-add-to-cart:hover {
	background-color: #333333;
	color: #ffffff;
}

/* Responsive posts per page logic */
/* We will use CSS nth-child to hide posts that exceed the chosen count per breakpoint */

/* Mobile view: hide anything after data-mobile count */
@media (max-width: 767px) {

	.pc-product-grid[data-mobile="1"]>.pc-product-card:nth-child(n+2),
	.pc-product-grid[data-mobile="2"]>.pc-product-card:nth-child(n+3),
	.pc-product-grid[data-mobile="3"]>.pc-product-card:nth-child(n+4),
	.pc-product-grid[data-mobile="4"]>.pc-product-card:nth-child(n+5),
	.pc-product-grid[data-mobile="5"]>.pc-product-card:nth-child(n+6),
	.pc-product-grid[data-mobile="6"]>.pc-product-card:nth-child(n+7) {
		display: none !important;
	}
}

/* Tablet view: hide anything after data-tablet count */
@media (min-width: 768px) and (max-width: 1024px) {

	.pc-product-grid[data-tablet="1"]>.pc-product-card:nth-child(n+2),
	.pc-product-grid[data-tablet="2"]>.pc-product-card:nth-child(n+3),
	.pc-product-grid[data-tablet="3"]>.pc-product-card:nth-child(n+4),
	.pc-product-grid[data-tablet="4"]>.pc-product-card:nth-child(n+5),
	.pc-product-grid[data-tablet="5"]>.pc-product-card:nth-child(n+6),
	.pc-product-grid[data-tablet="6"]>.pc-product-card:nth-child(n+7) {
		display: none !important;
	}
}

/* Desktop view: hide anything after data-desktop count */
@media (min-width: 1025px) {

	.pc-product-grid[data-desktop="1"]>.pc-product-card:nth-child(n+2),
	.pc-product-grid[data-desktop="2"]>.pc-product-card:nth-child(n+3),
	.pc-product-grid[data-desktop="3"]>.pc-product-card:nth-child(n+4),
	.pc-product-grid[data-desktop="4"]>.pc-product-card:nth-child(n+5),
	.pc-product-grid[data-desktop="5"]>.pc-product-card:nth-child(n+6),
	.pc-product-grid[data-desktop="6"]>.pc-product-card:nth-child(n+7) {
		display: none !important;
	}
}

/* Widget Wrapper */
.pc-widget-wrapper {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Header */
.pc-section-header {
	margin-bottom: 30px;
}

.pc-section-title {
	margin: 0 0 10px 0;
	color: #111111;
}

.pc-section-subtitle {
	margin: 0;
	color: #666666;
}

/* Links */
.pc-product-image,
.pc-product-title-link {
	text-decoration: none;
	color: inherit;
}

.pc-product-title-link:hover .pc-product-title {
	color: #666666;
	/* Subdued hover effect for the linked title */
}

/* Footer Button */
.pc-section-footer {
	margin-top: 40px;
}

.pc-footer-button {
	display: inline-block;
	padding: 12px 24px;
	background-color: #111111;
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.pc-footer-button:hover {
	background-color: #333333;
	color: #ffffff;
}

/* Global WooCommerce Grid Overrides */
ul.pc-global-grid {
	list-style: none;
	padding: 0 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

ul.pc-global-grid::before,
ul.pc-global-grid::after {
	display: none !important;
	/* Remove WooCommerce clearfixes */
}

li.pc-product-card.product {
	list-style: none;
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	clear: none !important;
	box-sizing: border-box !important;
	max-width: 100% !important;
	min-width: 0 !important;
}