/* Compact grid card (Flipkart-like) */
.product-image-wrapper .product-category { display: none !important; } /* remove category badge */

.product-info.compact {
  padding: 10px 12px; /* reduced padding */
}

.grid-product-name {
  font-size: 0.95rem;   /* smaller first-line name */
  font-weight: 600;
  margin: 0 0 4px 0;    /* minimal spacing */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-product-desc {
  font-size: 0.80rem;
  color: #666;
  margin: 4px 0;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.1rem * 2);
}

.price-row-grid {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Make MRP and selling price the same smaller size */
.price-row-grid .mrp-price {
  font-size: 0.95rem; /* reduced and same as selling-price */
  color: #777;
  text-decoration: line-through;
}

.price-row-grid .selling-price {
  font-size: 0.95rem; /* same size as MRP */
  font-weight: 700;
  color: var(--primary-color);
  white-space: nowrap;
}

.price-row-grid .discount-percent {
  font-size: 0.82rem;
  color: #e63946;
  font-weight: 700;
  margin-left: 4px;
}

/* small rupee-off badge over image */
.flat-image-badge{
  position:absolute;
  top:8px;
  left:8px;
  background:rgba(0,0,0,0.75);
  color:#fff;
  padding:4px 6px;
  border-radius:6px;
  font-size:11px;
  font-weight:700;
  z-index:6;
}

/* hide old circular discount badge */
.discount-badge{ display:none !important; }

.product-rating.small {
  margin-top:6px;
  color:#f39c12;
  font-size:0.85rem;
  font-weight:600;
}

/* Rating badge over image (moved from price area) */
.image-rating-badge{
  position:absolute;
  bottom:8px;
  left:8px; /* below corner of the image */
  background: transparent; /* no background as requested */
  color: var(--primary-color);
  padding:0; /* smaller visual */
  border-radius:6px;
  font-size:11px;
  font-weight:700;
  z-index:6;
  display:flex;
  align-items:center;
  gap:6px;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6); /* subtle contrast over images */
}

/* adjust look of contained rating-count */
.image-rating-badge .rating-count{ font-weight:600; color:var(--text-dark); font-size:11px; }

/* responsive tweaks */
@media (max-width:480px) {
  .grid-product-name { font-size:0.92rem; }
  .grid-product-desc { font-size:0.78rem; }
  .price-row-grid .selling-price { font-size:0.92rem; }
  .flat-image-badge { font-size:11px; padding:5px 7px; }
  .image-rating-badge{ font-size:11px; padding:0; gap:4px; bottom:6px; left:6px; }
}

/* Less cramped layout for large screens (6-per-row) */
@media (min-width:1200px) {
  .products-grid { gap: 0.75rem; }
  .product-image-wrapper { height: 180px; }
  .product-info.compact { padding: 8px 10px; }
  .grid-product-name { font-size:0.93rem; }
  .grid-product-desc { font-size:0.78rem; }
  .price-row-grid .mrp-price, .price-row-grid .selling-price { font-size:0.92rem; }
}
