/* Nice WooCommerce Product Grid - Frontend Styles */

.nwg-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr); /* mobile: always 2 columns */
	gap: 16px;
	margin: 20px 0;
}

@media (min-width: 768px) {
	.nwg-grid {
		grid-template-columns: repeat(var(--nwg-cols-desktop, 4), 1fr);
		gap: 22px;
	}
}

.nwg-card {
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	position: relative;
}

.nwg-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-3px);
}

.nwg-image-wrap {
	position: relative;
	display: block;
	background: #f7f7f7;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.nwg-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.nwg-card:hover .nwg-image-wrap img {
	transform: scale(1.05);
}

.nwg-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #e0402d;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	z-index: 2;
	line-height: 1;
}

.nwg-info {
	padding: 12px 12px 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.nwg-title {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	line-height: 1.4;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nwg-title:hover {
	color: #0073aa;
}

.nwg-price {
	font-size: 15px;
	margin-bottom: 10px;
	font-weight: 700;
	color: #222;
}

.nwg-price del {
	color: #999;
	font-weight: 400;
	font-size: 13px;
	margin-right: 6px;
}

.nwg-price ins {
	text-decoration: none;
	color: #e0402d;
}

.nwg-actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nwg-btn {
	width: 100%;
	padding: 9px 10px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	border: 2px solid #222;
	background: #fff;
	color: #222;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	text-align: center;
}

.nwg-add-cart {
	background: #fff;
	color: #222;
}

.nwg-add-cart:hover {
	background: #222;
	color: #fff;
}

.nwg-buy-now {
	background: #222;
	color: #fff;
	border-color: #222;
}

.nwg-buy-now:hover {
	background: #e0402d;
	border-color: #e0402d;
}

.nwg-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.nwg-btn.nwg-loading {
	opacity: 0.7;
	pointer-events: none;
}

/* small toast */
.nwg-toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: #222;
	color: #fff;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 14px;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.nwg-toast.nwg-show {
	opacity: 1;
}
