/* Premium Woo Products - Frontend Styles
   Milestone 2: basic functional grid + card (abhi "premium" design nahi -
   Milestone 3 mein colors, hover effects, badges wagera aayenge. Yahan
   sirf structure sahi kaam karna chahiye: columns, spacing, alignment). */

/* ----------------------------------------------------------
   GRID
   CSS custom properties (--pwp-cols-*) PHP se inline set hoti hain
   (templates/layout-grid.php dekho), taake ek hi CSS file har widget
   instance ke liye alag column count handle kar sake.
---------------------------------------------------------- */
.pwp-grid {
	display: grid;
	grid-template-columns: repeat( var( --pwp-cols-desktop, 4 ), 1fr );
	gap: 24px;
}

@media ( max-width: 1024px ) {
	.pwp-grid {
		grid-template-columns: repeat( var( --pwp-cols-tablet, 3 ), 1fr );
	}
}

@media ( max-width: 600px ) {
	.pwp-grid {
		grid-template-columns: repeat( var( --pwp-cols-mobile, 2 ), 1fr );
		gap: 14px;
	}
}

/* ----------------------------------------------------------
   CARD
---------------------------------------------------------- */
.pwp-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
}

.pwp-card-image-link {
	display: block;
	position: relative; /* badges ko is ke andar absolute position karne ke liye */
	background: #f7f7f7;
}

.pwp-card-image-link img {
	width: 100%;
	height: auto;
	display: block;
}

/* ----------------------------------------------------------
   HOVER EFFECT - "Zoom In" (Milestone 3)
   Widget mein "Image Hover Effect" control se on/off hoti hai.
   overflow:hidden .pwp-card pe already lag chuka hai, isliye
   image bade hone par card ke bahar overflow nahi karegi.
---------------------------------------------------------- */
.pwp-hover-zoom .pwp-card-image-link img {
	transition: transform 0.35s ease;
}

.pwp-hover-zoom:hover .pwp-card-image-link img {
	transform: scale( 1.08 );
}

/* ----------------------------------------------------------
   BADGES - Sale / Out of Stock (Milestone 3)
---------------------------------------------------------- */
.pwp-badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pwp-badge {
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	color: #fff;
	line-height: 1.4;
}

.pwp-badge-sale {
	background: #e2401c;
}

.pwp-badge-outofstock {
	background: #777777;
}

.pwp-card-content {
	padding: 14px;
	text-align: center;
}

.pwp-card-title-link {
	text-decoration: none;
	color: inherit;
}

.pwp-card-title {
	font-size: 15px;
	margin: 0 0 8px;
	line-height: 1.4;
}

.pwp-card-price {
	font-size: 15px;
	font-weight: 600;
	color: #7f54b3;
	margin-bottom: 12px;
}

.pwp-card-price del {
	color: #999;
	font-weight: 400;
	margin-right: 6px;
}

.pwp-card-button .pwp-btn {
	display: inline-block;
	width: 100%;
	padding: 10px 16px;
	background: #7f54b3;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	transition: background 0.2s ease;
}

.pwp-card-button .pwp-btn:hover {
	background: #6a4494;
	color: #fff;
}

/* ----------------------------------------------------------
   EMPTY STATE
---------------------------------------------------------- */
.pwp-empty-state {
	padding: 30px;
	text-align: center;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #777;
}
