/* ==========================================================================
   Asherfield — [ash_listings] Shortcode Grid
   Enqueued only on pages that contain the shortcode.
   ========================================================================== */

/* ── Container ───────────────────────────────────────────────────────────── */

.ash-sc-listings {
  --ash-sc-cols: 3;
  --ash-sc-gap:  20px;
  --ash-sc-radius: 10px;
}

.ash-sc-listings--cols-2 { --ash-sc-cols: 2; }
.ash-sc-listings--cols-3 { --ash-sc-cols: 3; }
.ash-sc-listings--cols-4 { --ash-sc-cols: 4; }

/* ── Optional heading ────────────────────────────────────────────────────── */

.ash-sc-listings__heading {
  margin: 0 0 20px;
  font-size: 1.375rem;
  font-weight: 700;
  color: #10231f;
  letter-spacing: -.02em;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.ash-sc-grid {
  display: grid;
  grid-template-columns: repeat(var(--ash-sc-cols), 1fr);
  gap: var(--ash-sc-gap);
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.ash-sc-card {
  background: #fff;
  border: 1px solid #e4e3de;
  border-radius: var(--ash-sc-radius);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}

.ash-sc-card:hover {
  box-shadow: 0 4px 18px rgba(16,35,31,.1);
  transform: translateY(-2px);
}

.ash-sc-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Card image ──────────────────────────────────────────────────────────── */

.ash-sc-card__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0efe8;
}

.ash-sc-card__img-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.ash-sc-card:hover .ash-sc-card__img-el {
  transform: scale(1.04);
}

.ash-sc-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e7e0;
}

/* ── Card body ───────────────────────────────────────────────────────────── */

.ash-sc-card__body {
  padding: 12px 14px 14px;
}

.ash-sc-card__title {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #10231f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}

.ash-sc-card__price {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #10231f;
  letter-spacing: -.01em;
}

.ash-sc-card__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.ash-sc-empty {
  color: #888;
  font-size: 0.9375rem;
  text-align: center;
  padding: 32px 0;
}

/* ── CTA footer ──────────────────────────────────────────────────────────── */

.ash-sc-listings__footer {
  margin-top: 24px;
  text-align: center;
}

.ash-sc-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: #10231f;
  color: #fff;
  border-radius: 7px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.ash-sc-cta-btn:hover {
  background: #1d3d37;
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* 4-col → 3-col at 960px */
@media (max-width: 960px) {
  .ash-sc-listings--cols-4 {
    --ash-sc-cols: 3;
  }
}

/* 3- and 4-col → 2-col at 700px */
@media (max-width: 700px) {
  .ash-sc-listings--cols-3,
  .ash-sc-listings--cols-4 {
    --ash-sc-cols: 2;
  }
}

/* All → 1-col at 480px */
@media (max-width: 480px) {
  .ash-sc-listings--cols-2,
  .ash-sc-listings--cols-3,
  .ash-sc-listings--cols-4 {
    --ash-sc-cols: 1;
  }

  .ash-sc-listings {
    --ash-sc-gap: 14px;
  }

  .ash-sc-card__img-wrap {
    aspect-ratio: 16 / 9;
  }

  .ash-sc-cta-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ash-sc-card,
  .ash-sc-card__img-el,
  .ash-sc-cta-btn {
    transition: none;
  }

  .ash-sc-card:hover {
    transform: none;
  }
}

/* ── Boosted badge (Phase 20) ────────────────────────────────────────────── */

.ash-sc-card--boosted {
  border-color: #c96442;
}

.ash-sc-card__img-wrap {
  position: relative;
}

.ash-sc-card__boost-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  background: #c96442;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
  pointer-events: none;
}
