/* ============================================================
   Commercial Connection — Property Grid Widget
   ============================================================ */

.ccg-widget {
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Header: Tabs + See More ────────────────────────────────── */
.ccg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ccg-tabs {
  display: flex;
  gap: 24px;
}
.ccg-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: #8595ae;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  outline: none;
}
.ccg-tab:hover { color: #1c2b3a; }
.ccg-tab.is-active {
  color: #0f1e35;
  font-weight: 700;
  border-bottom-color: #0f1e35;
}

.ccg-see-more {
  font-size: 15px;
  font-weight: 600;
  color: #2251b8;
  text-decoration: none;
  transition: color .2s;
}
.ccg-see-more:hover { color: #1a3a8f; }

/* ── Grid ───────────────────────────────────────────────────── */
.ccg-grid {
  display: grid;
  grid-template-columns: repeat(var(--ccg-cols, 4), 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .ccg-grid { grid-template-columns: repeat(var(--ccg-cols-t, 3), 1fr); }
}
@media (max-width: 767px) {
  .ccg-grid { grid-template-columns: repeat(var(--ccg-cols-m, 2), 1fr); }
}

/* ── Card ───────────────────────────────────────────────────── */
.ccg-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.ccg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(15,30,53,.12);
}

/* ── Card Image ─────────────────────────────────────────────── */
.ccg-card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #edf0f5;
  display: flex;
}
.ccg-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}
.ccg-card:hover .ccg-card-img img { transform: scale(1.05); }
.ccg-widget--no-zoom .ccg-card:hover .ccg-card-img img { transform: none; }

/* ── Badge ──────────────────────────────────────────────────── */
.ccg-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #1c2b3a;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  line-height: 1;
  z-index: 2;
}

/* ── Card Body ──────────────────────────────────────────────── */
.ccg-card-body {
  padding: 14px 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ccg-price {
  font-size: 16px;
  font-weight: 700;
  color: #0f1e35;
  line-height: 1.3;
}

.ccg-title {
  font-size: 14px;
  font-weight: 600;
  color: #1c2b3a;
}

.ccg-address {
  font-size: 13px;
  color: #586a7e;
  line-height: 1.4;
}

.ccg-sqft {
  font-size: 13px;
  color: #8595ae;
}

/* ── SR-only (visible to crawlers + screen readers, hidden visually) ─ */
.ccg-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Loading / Empty ────────────────────────────────────────── */
.ccg-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  font-size: 14px;
  color: #8595ae;
}
.ccg-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid #e2e6ef;
  border-top-color: #2251b8;
  border-radius: 50%;
  animation: ccg-spin .65s linear infinite;
}
@keyframes ccg-spin { to { transform: rotate(360deg); } }

.ccg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #8595ae;
  font-size: 14px;
}
