/* ============================================
   Listings Widget - Advanced Filter Edition
   Brand: Deep Teal #0d4a4a, Coral #e07a5f, Warm White #f7f5f2
   ============================================ */
/* ============================================
   SEARCH BAR (Top of Widget)
   ============================================ */

.lw-search-bar {
  margin-bottom: 12px;
}

.lw-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #e0d8cc;
  border-radius: 10px;
  padding: 0 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(13, 74, 74, 0.04);
}

.lw-search-wrap:hover {
  border-color: #d4cabe;
  box-shadow: 0 2px 8px rgba(13, 74, 74, 0.08);
}

.lw-search-wrap:focus-within {
  border-color: #0d4a4a;
  box-shadow: 0 0 0 4px rgba(13, 74, 74, 0.1);
}

.lw-search-icon {
  flex-shrink: 0;
  color: #6c7a7a;
  margin-right: 12px;
  transition: color 0.2s ease;
}

.lw-search-wrap:focus-within .lw-search-icon {
  color: #0d4a4a;
}

.lw-search-input {
  flex: 1;
  width: 100%;
  padding: 16px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: #0d4a4a;
  outline: none;
}

.lw-search-input::placeholder {
  color: #8a9494;
  font-weight: 400;
}

.lw-search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: #f0ebe0;
  border-radius: 50%;
  color: #6c7a7a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.lw-search-clear:hover {
  background: #e07a5f;
  color: #ffffff;
}

@media (max-width: 600px) {
  .lw-search-wrap {
    padding: 0 14px;
  }
  
  .lw-search-input {
    padding: 14px 0;
    font-size: 14px;
  }
  
  .lw-search-input::placeholder {
    font-size: 13px;
  }
}
.idx-widget-wrap {
    padding: 20px;
}

#listings-widget {
  margin: 32px 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.lw-container {
  max-width: 100%;
}

/* ============================================
   FILTER BAR
   ============================================ */

.lw-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e0d8cc;
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
}

.lw-filter-dropdown {
  position: relative;
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 200px;
}

.lw-filter-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #d4cabe;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  transition: all 0.2s ease;
  min-height: 56px;
}

.lw-filter-btn:hover {
  border-color: #0d4a4a;
  background: #faf8f4;
}

.lw-filter-btn.lw-active {
  background: #fef2ed;
  border-color: #e07a5f;
  color: #0d4a4a;
}

.lw-filter-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6c7a7a;
  margin-bottom: 2px;
}

.lw-filter-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0d4a4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lw-filter-btn.lw-active .lw-filter-value {
  color: #c2552a;
}

.lw-filter-arrow {
  font-size: 10px;
  color: #6c7a7a;
  margin-left: 6px;
}

/* ============================================
   FILTER PANELS (Dropdowns)
   ============================================ */

.lw-filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: #ffffff;
  border: 1px solid #d4cabe;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(13, 74, 74, 0.15);
  z-index: 1000;
  overflow: hidden;
}

.lw-filter-panel-wide {
  width: 340px;
  right: 0;
  left: auto;
}

.lw-filter-dropdown.lw-open .lw-filter-panel {
  display: block;
}

.lw-filter-body {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.lw-filter-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: #faf8f4;
  border-top: 1px solid #e8e2d6;
}

.lw-clear, .lw-apply {
  padding: 8px 16px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.lw-clear {
  background: transparent;
  color: #6c7a7a;
  border-color: #d4cabe;
}

.lw-clear:hover {
  background: #f0ebe0;
  color: #0d4a4a;
}

.lw-apply {
  background: #0d4a4a;
  color: #ffffff;
}

.lw-apply:hover {
  background: #0a3636;
}

/* ============================================
   PRICE RANGE
   ============================================ */

.lw-price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lw-price-range label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6c7a7a;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.lw-price-range select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d4cabe;
  border-radius: 5px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  color: #0d4a4a;
  cursor: pointer;
}

.lw-price-range select:focus {
  outline: none;
  border-color: #0d4a4a;
}

/* ============================================
   PILLS (Beds, Baths, Garage)
   ============================================ */

.lw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lw-pill {
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid #d4cabe;
  border-radius: 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0d4a4a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lw-pill:hover {
  border-color: #0d4a4a;
  background: #faf8f4;
}

.lw-pill.lw-active {
  background: #0d4a4a;
  border-color: #0d4a4a;
  color: #ffffff;
}

/* ============================================
   CHECKBOXES (Property Type)
   ============================================ */

.lw-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lw-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lw-checkbox:hover {
  background: #f7f5f2;
}

.lw-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0d4a4a;
}

.lw-checkbox span {
  font-size: 14px;
  color: #0d4a4a;
}

/* ============================================
   TOGGLES (Has Pool, New)
   ============================================ */

.lw-toggles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lw-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e8e2d6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lw-toggle:hover {
  border-color: #0d4a4a;
  background: #f7f5f2;
}

.lw-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e07a5f;
  cursor: pointer;
}

.lw-toggle span {
  font-size: 14px;
  font-weight: 600;
  color: #0d4a4a;
}

/* ============================================
   SECTIONS (More Panel)
   ============================================ */

.lw-section {
  margin-bottom: 18px;
}

.lw-section:last-child {
  margin-bottom: 0;
}

.lw-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6c7a7a;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* ============================================
   SQFT / YEAR RANGE INPUTS
   ============================================ */

.lw-sqft-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lw-sqft-range input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d4cabe;
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  color: #0d4a4a;
  background: #ffffff;
}

.lw-sqft-range input:focus {
  outline: none;
  border-color: #0d4a4a;
}

.lw-sqft-range span {
  color: #6c7a7a;
  font-weight: 600;
}

/* ============================================
   RESET + SORT
   ============================================ */

.lw-reset-all {
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  color: #e07a5f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lw-reset-all:hover {
  color: #c2552a;
}

.lw-sort-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.lw-sort {
  padding: 10px 32px 10px 12px;
  border: 1px solid #d4cabe;
  border-radius: 6px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0d4a4a;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236c7a7a' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.lw-sort:focus {
  outline: none;
  border-color: #0d4a4a;
}

/* ============================================
   STATS
   ============================================ */

.lw-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #d4cabe;
  border: 1px solid #d4cabe;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.lw-stat {
  background: #f7f5f2;
  padding: 18px 20px;
  text-align: center;
  border-left: 4px solid #0d4a4a;
}

.lw-stat:first-child {
  border-left-color: #0d4a4a;
}

.lw-stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #0d4a4a;
  margin-bottom: 4px;
}

.lw-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6c7a7a;
}

/* ============================================
   GRID
   ============================================ */

.lw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.lw-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6c7a7a;
  font-style: italic;
  font-size: 15px;
}

.lw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: 1px solid #e8e2d6;
  border-radius: 8px;
}

.lw-empty h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  color: #0d4a4a;
  margin: 0 0 12px;
}

.lw-empty p {
  color: #6c7a7a;
  font-size: 14px;
  margin: 0;
}

.lw-empty a {
  color: #e07a5f;
  font-weight: 600;
  text-decoration: none;
}

.lw-empty a:hover {
  text-decoration: underline;
}

/* ============================================
   CARDS
   ============================================ */

/* ============================================
   CARDS
   ============================================ */

.lw-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e8e2d6;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(13, 74, 74, 0.05);
}

.lw-card:hover {
  box-shadow: 0 8px 24px rgba(13, 74, 74, 0.15);
  transform: translateY(-2px);
  border-color: #d4cabe;
}

.lw-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.lw-card-img {
  position: relative;
  width: 100%;
  height: 220px;
  background: #ede8e0;
  overflow: hidden;
}

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

.lw-card-img.lw-no-img::before {
  content: 'No Photo Available';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c7a7a;
  font-size: 13px;
}

.lw-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.lw-badge-new {
  background: #e07a5f;
  color: #ffffff;
}

.lw-photos-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 8px;
  background: rgba(13, 74, 74, 0.85);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  z-index: 2;
}

.lw-card-body {
  padding: 16px 18px 12px;
  flex: 1;
}

.lw-card-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #0d4a4a;
  margin-bottom: 8px;
}

.lw-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #4a5a5a;
  margin-bottom: 10px;
}

.lw-card-specs span {
  font-weight: 600;
}

.lw-card-address {
  font-size: 13px;
  color: #4a5a5a;
  line-height: 1.4;
  margin-bottom: 6px;
}

.lw-card-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #e07a5f;
  letter-spacing: 0.5px;
}

.lw-card-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid #e8e2d6;
}

.lw-cta-pre, .lw-cta-tour {
  display: block;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lw-cta-pre {
  background: #0d4a4a;
  color: #ffffff;
}

.lw-cta-pre:hover {
  background: #0a3636;
}

.lw-cta-tour {
  background: #e07a5f;
  color: #ffffff;
}

.lw-cta-tour:hover {
  background: #c2552a;
}

/* ============================================
   LOAD MORE
   ============================================ */

.lw-load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.lw-load-more {
  padding: 14px 32px;
  background: #ffffff;
  border: 2px solid #0d4a4a;
  border-radius: 6px;
  color: #0d4a4a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lw-load-more:hover:not(:disabled) {
  background: #0d4a4a;
  color: #ffffff;
}

.lw-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .lw-filter-bar {
    gap: 8px;
    padding: 12px;
  }
  
  .lw-filter-dropdown {
    flex: 1 1 calc(50% - 4px);
    max-width: none;
  }
  
  .lw-sort-wrap {
    margin-left: 0;
    flex: 1 1 100%;
  }
  
  .lw-sort {
    width: 100%;
  }
  
  .lw-reset-all {
    flex: 1 1 100%;
    text-align: center;
    border: 1px solid #e07a5f;
    border-radius: 6px;
  }
  
  .lw-filter-panel,
  .lw-filter-panel-wide {
    width: 100vw;
    max-width: calc(100vw - 24px);
    left: 0;
    right: auto;
  }
  
  .lw-stats {
    grid-template-columns: 1fr;
  }
  
  .lw-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .lw-filter-dropdown {
    flex: 1 1 100%;
  }
  
  .lw-card-img {
    height: 200px;
  }
  
  .lw-card-price {
    font-size: 20px;
  }
}