/* ============================================================
   WsM Rocks - Property Plugin CSS v1.0.0
   ============================================================ */

/* Hero */
.wsm-prop-hero {
  background: var(--wsm-blue);
  padding: 2.5rem 0 2rem;
}
.wsm-prop-hero-title {
  color: #fff;
  font-size: clamp(1.6rem,4vw,2.4rem);
  margin: 0 0 .5rem;
}
.wsm-prop-hero-desc {
  color: rgba(255,255,255,.75);
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

/* Listing type tabs */
.wsm-prop-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.wsm-prop-tab {
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  transition: background .15s;
}
.wsm-prop-tab:hover { background: rgba(255,255,255,.25); color: #fff; }
.wsm-prop-tab.active { background: #fff; color: var(--wsm-blue); border-color: #fff; }

/* Filters */
.wsm-prop-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}
.wsm-prop-filter-select {
  height: 48px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--wsm-text);
  font-size: .9rem;
  outline: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.wsm-prop-filter-btn {
  height: 48px;
  padding: 0 24px;
  background: var(--wsm-yellow);
  color: #111;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
  transition: background .15s;
}
.wsm-prop-filter-btn:hover { background: #e6bc00; }

/* Property grid */
.wsm-prop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (max-width: 900px) { .wsm-prop-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .wsm-prop-grid { grid-template-columns: 1fr; } }

/* Property card */
.wsm-prop-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--wsm-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.wsm-prop-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.wsm-prop-card-img-link { display: block; text-decoration: none; }
.wsm-prop-card-img {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: #e5e7eb;
}
.wsm-prop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
  display: block;
}
.wsm-prop-card:hover .wsm-prop-card-img img { transform: scale(1.04); }
.wsm-prop-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #f3f4f6;
}
.wsm-prop-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
}
.wsm-prop-listing-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Badges */
.wsm-prop-badge {
  font-size: .7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.wsm-prop-badge--new   { background: var(--wsm-yellow); color: #111; }
.wsm-prop-badge--offer { background: #f59e0b; color: #fff; }
.wsm-prop-badge--sold  { background: #dc2626; color: #fff; }
.wsm-prop-badge--let   { background: #7c3aed; color: #fff; }
.wsm-prop-badge--lg    { font-size: .8rem; padding: 5px 14px; }

/* Card body */
.wsm-prop-card-body { padding: 1rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.wsm-prop-card-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--wsm-blue);
  margin-bottom: 4px;
  font-family: var(--font-display);
}
.wsm-prop-card-title { font-size: .95rem; font-weight: 700; margin: 0 0 2px; line-height: 1.3; }
.wsm-prop-card-title a { color: inherit; text-decoration: none; }
.wsm-prop-card-title a:hover { color: var(--wsm-blue); }
.wsm-prop-card-address { font-size: .8rem; color: var(--wsm-text-muted); margin-bottom: 8px; }
.wsm-prop-card-specs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.wsm-prop-spec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  color: var(--wsm-text-muted);
  font-weight: 600;
}
.wsm-prop-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--wsm-border);
  font-size: .75rem;
  color: var(--wsm-text-muted);
}
.wsm-prop-agent-name { font-weight: 600; }
.wsm-prop-days { background: #f3f4f6; padding: 2px 7px; border-radius: 10px; }

/* ============================================================
   Single property page
   ============================================================ */
.wsm-prop-breadcrumb {
  font-size: .825rem;
  color: var(--wsm-text-muted);
  margin-bottom: 1.5rem;
}
.wsm-prop-breadcrumb a { color: var(--wsm-blue); text-decoration: none; }
.wsm-prop-single-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) { .wsm-prop-single-layout { grid-template-columns: 1fr; } }

/* Gallery */
.wsm-prop-gallery { margin-bottom: 1.5rem; border-radius: 12px; overflow: hidden; }
.wsm-prop-gallery-main {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #e5e7eb;
}
.wsm-prop-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wsm-prop-gallery-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.wsm-prop-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: .7;
  border: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
  flex-shrink: 0;
}
.wsm-prop-thumb:hover, .wsm-prop-thumb.active {
  opacity: 1;
  border-color: var(--wsm-blue);
}

/* Single header */
.wsm-prop-single-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.wsm-prop-single-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.wsm-prop-single-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--wsm-blue);
  font-family: var(--font-display);
  white-space: nowrap;
}

/* Key specs bar */
.wsm-prop-key-specs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  background: #f9fafb;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--wsm-border);
}
.wsm-prop-key-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .8rem;
  color: var(--wsm-text-muted);
  text-align: center;
  gap: 2px;
  padding-right: 1rem;
  border-right: 1px solid var(--wsm-border);
}
.wsm-prop-key-spec:last-child { border: none; }
.wsm-prop-key-spec-num { font-size: 1.4rem; font-weight: 800; color: var(--wsm-text); }

/* Sections */
.wsm-prop-description,
.wsm-prop-features,
.wsm-prop-details-table,
.wsm-prop-floorplan,
.wsm-prop-map { margin-bottom: 2rem; }
.wsm-prop-description h2,
.wsm-prop-features h2,
.wsm-prop-details-table h2,
.wsm-prop-floorplan h2,
.wsm-prop-map h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid var(--wsm-border);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}
.wsm-prop-features ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.wsm-prop-features ul li::before { content: " "; color: var(--wsm-blue); font-weight: 700; }
.wsm-prop-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.wsm-prop-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: .875rem;
}
.wsm-prop-detail-label { color: var(--wsm-text-muted); font-weight: 600; }

/* Sidebar */
.wsm-prop-enquiry-card {
  background: #fff;
  border: 1px solid var(--wsm-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 80px;
}
.wsm-prop-enquiry-card h3 { margin: 0 0 1.25rem; font-size: 1rem; }
.wsm-prop-agent-card {
  background: #f9fafb;
  border: 1px solid var(--wsm-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .875rem;
}

/* ============================================================
   Dashboard
   ============================================================ */
.wsm-prop-dashboard { background: #fff; border-radius: 12px; border: 1px solid var(--wsm-border); overflow: hidden; }
.wsm-prop-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--wsm-border);
  flex-wrap: wrap;
  gap: 12px;
  background: #f9fafb;
}
.wsm-prop-dashboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--wsm-border);
  overflow-x: auto;
  background: #fff;
}
.wsm-prop-dtab {
  padding: .875rem 1.5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--wsm-text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s;
}
.wsm-prop-dtab:hover { color: var(--wsm-blue); }
.wsm-prop-dtab.active { color: var(--wsm-blue); border-bottom-color: var(--wsm-blue); }
.wsm-prop-dtab-count {
  background: var(--wsm-blue);
  color: #fff;
  border-radius: 10px;
  font-size: .7rem;
  padding: 1px 6px;
  margin-left: 4px;
}
.wsm-prop-dashboard-content { padding: 1.5rem 2rem; }
.wsm-prop-listing-table th,
.wsm-prop-listing-table td { padding: 10px 12px; vertical-align: middle; font-size: .875rem; }

/* Import area */
.wsm-prop-import-area {
  position: relative;
  border: 2px dashed var(--wsm-border);
  border-radius: 10px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow: hidden;
  isolation: isolate;
}
.wsm-prop-import-area:hover { border-color: var(--wsm-blue); background: #eff6ff; }
/* Ensure the file input is strictly contained within the upload area */
.wsm-prop-import-area input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

/* Leads */
.wsm-prop-leads-list { display: flex; flex-direction: column; gap: 12px; }
.wsm-prop-lead-item {
  border: 1px solid var(--wsm-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.wsm-prop-lead-item.wsm-prop-lead--unread { border-left: 4px solid var(--wsm-blue); }
.wsm-prop-lead-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

/* Property form sections */
.wsm-prop-form-section {
  background: #fff;
  border: 1px solid var(--wsm-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.wsm-prop-form-section h4 { margin: 0 0 1rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--wsm-text-muted); }

/* Type buttons */
.wsm-prop-type-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wsm-prop-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 2px solid var(--wsm-border);
  background: #fff;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.wsm-prop-type-btn input { display: none; }
.wsm-prop-type-btn:hover { border-color: var(--wsm-blue); }
.wsm-prop-type-btn.active { border-color: var(--wsm-blue); background: #eff6ff; color: var(--wsm-blue); }

/* ============================================================
   Photo uploader
   ============================================================ */
.wsm-prop-photo-upload-area {
  position: relative;
  border: 2px dashed var(--wsm-border);
  border-radius: 10px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 1rem;
}
.wsm-prop-photo-upload-area:hover,
.wsm-prop-photo-upload-area.drag-over {
  border-color: var(--wsm-blue);
  background: #eff6ff;
}
.wsm-prop-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: .5rem;
}
.wsm-prop-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--wsm-border);
  background: #f3f4f6;
  cursor: grab;
  transition: border-color .15s, opacity .15s;
}
.wsm-prop-photo-item:first-child {
  border-color: var(--wsm-blue);
  box-shadow: 0 0 0 2px rgba(0,87,184,.2);
}
.wsm-prop-photo-item.dragging {
  opacity: .4;
  cursor: grabbing;
}
.wsm-prop-photo-item.drag-target {
  border-color: var(--wsm-yellow);
  border-style: dashed;
}
.wsm-prop-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.wsm-prop-photo-item.uploading img {
  opacity: .4;
}
.wsm-prop-photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(220,38,38,.85);
  color: #fff;
  border: none;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity .15s;
}
.wsm-prop-photo-item:hover .wsm-prop-photo-delete { opacity: 1; }
.wsm-prop-photo-drag-handle {
  position: absolute;
  bottom: 4px;
  right: 4px;
  color: rgba(255,255,255,.9);
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  pointer-events: none;
}
.wsm-prop-photo-main-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--wsm-blue);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wsm-prop-photo-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.6);
  font-size: .7rem;
  color: var(--wsm-blue);
  font-weight: 600;
}
.wsm-prop-photo-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: .8rem;
  margin-bottom: 4px;
}
.wsm-prop-floorplan-upload { margin-top: .5rem; }

/* ============================================================
   Registration
   ============================================================ */
.wsm-register-wrap { max-width: 560px; margin: 2rem auto; }
.wsm-register-type-tabs {
  display: flex;
  border-bottom: 2px solid var(--wsm-border);
  margin-bottom: 2rem;
}
.wsm-reg-tab {
  padding: .75rem 1.25rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--wsm-text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
}
.wsm-reg-tab:hover { color: var(--wsm-blue); }
.wsm-reg-tab.active { color: var(--wsm-blue); border-bottom-color: var(--wsm-blue); }
.wsm-register-intro { margin-bottom: 1.5rem; }
.wsm-register-intro h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.wsm-register-intro p { color: var(--wsm-text-muted); margin: 0; }
.wsm-register-gate {
  text-align: center;
  padding: 3rem 2rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid var(--wsm-border);
  max-width: 480px;
  margin: 2rem auto;
}
.wsm-register-gate-icon { font-size: 3rem; margin-bottom: 1rem; }
.wsm-register-gate h2 { font-size: 1.4rem; margin: 0 0 .5rem; }
.wsm-register-gate p { color: var(--wsm-text-muted); margin: 0; }
