﻿/* =====================================================================
   Commercial Properties Section — landing page
   All styles scoped under .pd-commercial-section / #pd-section-commercial-properties
   Zero interference with existing landing page sections.
   ===================================================================== */

/* ─── Section wrapper ────────────────────────────────────────────────── */
.pd-commercial-section {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfe 100%);
  border-top: 1px solid #f0f0f5;
}

/* Tighten vertical gap between buy/rent listings and Commercial Spaces on commercial landing */
.commercial-landing-stack .properties-section {
  padding-bottom: 1rem;
}

.commercial-landing-stack .rent-properties-section {
  padding-top: 0;
  padding-bottom: 1rem;
}

.commercial-landing-stack #pd-section-commercial-properties .pd-commercial-section {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  border-top: none;
}

/* ─── Section header copy ───────────────────────────────────────────── */
.pd-comm-header .section-header-with-link {
  align-items: flex-start;
}

.pd-comm-header__copy {
  flex: 1;
  min-width: 0;
}

.pd-comm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0d6efd;
  margin: 0;
}

.pd-comm-eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d6efd, rgba(13, 110, 253, 0.15));
}

.pd-comm-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 42rem;
}

/* ─── Type tabs ──────────────────────────────────────────────────────── */
.pd-comm-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.625rem;
  margin-bottom: 1.5rem;
  /* hide scrollbar for all browsers */
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.pd-comm-tabs::-webkit-scrollbar {
  display: none;
}

.pd-comm-tab-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1.5px solid #dde2ef;
  background: #ffffff;
  color: #4a5568;
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s, box-shadow 0.16s;
  white-space: nowrap;
  user-select: none;
}

.pd-comm-tab-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
  background: #f0f5ff;
}

.pd-comm-tab-btn.is-active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(13, 110, 253, 0.3);
}

.pd-comm-tab-count {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05em 0.5em;
  min-width: 1.5em;
  text-align: center;
  line-height: 1.6;
  background: #eef1f8;
  color: #6b7280;
  transition: background 0.16s, color 0.16s;
}

.pd-comm-tab-btn.is-active .pd-comm-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ─── Skeleton loader ─────────────────────────────────────────────────── */
.pd-comm-skel-card {
  background: #ffffff;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f5;
}

.pd-comm-skel-img {
  height: 220px;
  background: linear-gradient(90deg, #f0f0f5 25%, #e6e8f0 50%, #f0f0f5 75%);
  background-size: 200% 100%;
  animation: pd-comm-shimmer 1.5s infinite linear;
}

.pd-comm-skel-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pd-comm-skel-line {
  height: 0.85rem;
  border-radius: 0.35rem;
  background: linear-gradient(90deg, #f0f0f5 25%, #e6e8f0 50%, #f0f0f5 75%);
  background-size: 200% 100%;
  animation: pd-comm-shimmer 1.5s infinite linear;
}

@keyframes pd-comm-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Property type badge on card image ────────────────────────────────── */
.pd-comm-type-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  background: #0d6efd;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.22em 0.6em;
  border-radius: 0.35rem;
  pointer-events: none;
}

/* ─── Rent: separate subsection per commercial type ───────────────────── */
.pd-comm-rent-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.pd-comm-rent-group + .pd-comm-rent-group {
  padding-top: 2.5rem;
  border-top: 1px solid #f0f0f5;
}

.pd-comm-rent-group:first-child {
  padding-top: 0;
  border-top: none;
}

/* ─── Empty state ─────────────────────────────────────────────────────── */
.pd-comm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}

.pd-comm-empty__icon {
  font-size: 3rem;
  color: #c7d2e5;
  margin-bottom: 1rem;
  line-height: 1;
}

.pd-comm-empty__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3436;
  margin: 0 0 0.4rem;
}

.pd-comm-empty__text {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.pd-comm-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0d6efd;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1.5px solid #0d6efd;
  padding: 0.45rem 1.1rem;
  border-radius: 2rem;
  transition: background 0.16s, color 0.16s;
}

.pd-comm-empty__cta:hover {
  background: #0d6efd;
  color: #fff;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

/* iPad landscape (992px – 1199px) → 2 cards visible (col-md-6 effective) */
/* Bootstrap col-lg-3 already covers desktop 4-col layout */

/* iPad portrait (768px – 991px) → 2 columns via col-md-6 */
@media (max-width: 991.98px) {
  .pd-comm-tabs {
    gap: 0.4rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
  }

  .pd-comm-tab-btn {
    font-size: 0.82rem;
    padding: 0.38rem 0.85rem;
  }
}

/* Phone (< 768px) → 1 column, full-width cards, tab scrollable */
@media (max-width: 767.98px) {
  .pd-commercial-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .pd-comm-tabs {
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .pd-comm-tab-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }

  .pd-comm-skel-img {
    height: 180px;
  }

  .pd-comm-empty {
    padding: 2rem 1rem;
  }

  .pd-comm-empty__icon {
    font-size: 2.75rem;
  }
}

/* Small phones (< 576px) — cards stack full-width via Bootstrap defaults */
