/* ============================================================
   FEED GRID (OLX / FB MARKETPLACE STYLE)
   ============================================================ */

.gm-marketplace {
  padding: 10px;
  background: #f6f7f8;
}

.gm-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobile-first */
  gap: 12px;
}

/* Tablet */
@media (min-width: 640px) {
  .gm-feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .gm-feed-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   FEED CARD
   ============================================================ */

.gm-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  will-change: transform;
}

.gm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Seen vs unseen (SUBTLE, NOT JARRING) */
.gm-card:not(.gm-unseen) {
  opacity: 0.94;
}

/* ============================================================
   IMAGE / THUMB
   ============================================================ */

.gm-card-thumb,
.gm-card-img {
  aspect-ratio: 1 / 1;
  background: #eaeaea;
  position: relative;
  overflow: hidden;
}

.gm-thumb {
  width: 100%;
  height: 100%;
}

.gm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   IMAGE OVERLAYS (DISTANCE + TILE)
   ============================================================ */

.gm-badge {
  position: absolute;
  top: 8px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 6px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.gm-badge.gm-distance {
  right: 8px;
}

.gm-badge.gm-tile {
  left: 8px;
  opacity: 0.85;
}

/* ============================================================
   CARD BODY
   ============================================================ */

.gm-card-body,
.gm-card-info {
  padding: 8px 10px 10px;
}

/* Price = PRIMARY (OLX STYLE) */
.gm-card-price,
.gm-price {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
}

/* Locality — right aligned, subtle */
.gm-locality {
  font-size: 12px;
  color: #666;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Title — secondary */
.gm-card-title,
.gm-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  color: #111;
  margin-top: 4px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   FEED LOADING INDICATOR
   ============================================================ */

.gm-feed-loading {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  opacity: 0.6;
}

/* ============================================================
   SKELETON GRID (INITIAL + SCROLL)
   ============================================================ */

.gm-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .gm-skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .gm-skeleton-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gm-skeleton-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

/* Square skeleton thumb */
.gm-skeleton-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eee;
  animation: pulse 1.4s ease-in-out infinite;
}

/* Text placeholders */
.gm-skeleton-body {
  padding: 8px 10px;
}

.gm-skeleton-line {
  height: 14px;
  background: #eee;
  border-radius: 4px;
  margin-bottom: 8px;
  animation: pulse 1.4s ease-in-out infinite;
}

.gm-skeleton-line.short {
  width: 70%;
}

.gm-skeleton-line.tiny {
  width: 45%;
}

/* ============================================================
   SHIMMER / PULSE
   ============================================================ */

@keyframes pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}
