.tdm-wrapper{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0 auto;
  padding:0;
  width:100%;
  max-width:1100px;
  font-family:Inter,system-ui,Arial,sans-serif;
  box-sizing:border-box;
}

.tdm-wrapper *,
.tdm-wrapper *::before,
.tdm-wrapper *::after{
  box-sizing:border-box;
}

/* ===============================
   Barra superior
================================ */
.tdm-filters{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
}

.tdm-search-wrap{
  flex:1 1 auto;
  min-width:0;
}

.tdm-search-input{
  width:100%;
  min-height:46px;
  padding:10px 14px;
  border:1px solid #e6e6e6;
  border-radius:10px;
  background:#fff;
  color:#111827;
  font-size:0.95rem;
  font-weight:600;
  outline:none;
  box-shadow:0 1px 2px rgba(16,24,40,0.03);
  transition:border-color .2s ease, box-shadow .2s ease;
}

.tdm-search-input:focus{
  border-color:#A41919;
  box-shadow:0 0 0 3px rgba(164,25,25,0.10);
}

.tdm-city-wrap{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:220px;
}

.tdm-city-select{
  width:100%;
  min-width:220px;
  max-width:320px;
  min-height:46px;
  padding:10px 12px;
  border:1px solid #ddd;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  font-size:0.95rem;
  font-weight:600;
  outline:none;
  appearance:none;
  box-shadow:0 1px 2px rgba(16,24,40,0.03);
  transition:border-color .2s ease, box-shadow .2s ease;
}

.tdm-city-select:focus{
  border-color:#A41919;
  box-shadow:0 0 0 3px rgba(164,25,25,0.10);
}

/* ===============================
   Layout principal
================================ */
.tdm-main{
  display:grid;
  grid-template-columns:minmax(340px, 0.92fr) minmax(420px, 1.08fr);
  gap:18px;
  align-items:start;
}

.tdm-list-area{
  min-width:0;
}

.tdm-map{
  width:100%;
  height:520px;
  border-radius:12px;
  overflow:hidden;
  border:1px solid #e9eef0;
  background:#fff;
  min-width:0;
}

/* ===============================
   Lista
================================ */
.tdm-results-count{
  margin:0 0 8px;
  font-size:0.9rem;
  color:#64748b;
  font-weight:600;
}

.tdm-list{
  padding:10px;
  background:#fff;
  border-radius:10px;
  border:1px solid #f0f4f5;
  max-height:520px;
  overflow:auto;
}

.tdm-empty-msg{
  padding:20px;
  text-align:center;
  color:#9aa6ab;
  border:1px dashed #e6eef0;
  border-radius:8px;
  background:#fafafa;
}

.tdm-post-item{
  display:flex;
  gap:12px;
  padding:12px;
  border-bottom:1px dashed #f3f6f7;
  align-items:flex-start;
}

.tdm-post-item:last-child{
  border-bottom:none;
}

.tdm-post-item.tdm-selected{
  background:rgba(164,25,25,0.06);
  border-radius:8px;
}

.tdm-post-left{
  width:36px;
  flex:0 0 36px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.tdm-pin{
  width:20px;
  height:20px;
  color:#ef4444;
}

.tdm-post-body{
  flex:1;
  min-width:0;
}

.tdm-post-title{
  margin:0;
  font-size:1rem;
  line-height:1.15;
  color:#0f172a;
  font-weight:700;
}

.tdm-post-address{
  margin-top:6px;
  font-size:0.9rem;
  color:#475569;
}

.tdm-post-city{
  margin-top:6px;
  font-size:0.82rem;
  color:#64748b;
  font-weight:600;
}

.tdm-post-actions{
  margin-top:10px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.tdm-post-actions a{
  text-decoration:none;
  font-size:0.9rem;
  font-weight:600;
}

.tdm-view-single{
  color:#A41919;
}

.tdm-link-directions{
  color:#0ea5a4;
}

.tdm-post-actions a:hover{
  text-decoration:underline;
}

.tdm-list::-webkit-scrollbar{
  width:8px;
}

.tdm-list::-webkit-scrollbar-thumb{
  background:#e6eef0;
  border-radius:8px;
}

/* ===============================
   Tablet
================================ */
@media (min-width:600px) and (max-width:979px){
  .tdm-wrapper{
    max-width:700px;
    padding:0 10px;
  }

  .tdm-filters{
    flex-direction:column;
    align-items:stretch;
  }

  .tdm-city-wrap{
    width:100%;
    min-width:unset;
  }

  .tdm-city-select{
    min-width:unset;
    max-width:100%;
    width:100%;
    font-size:0.92rem;
    padding:9px 10px;
  }

  .tdm-search-input{
    font-size:0.92rem;
    padding:9px 10px;
  }

  .tdm-main{
    grid-template-columns:1fr;
  }

  .tdm-map{
    height:420px;
    border-radius:10px;
  }

  .tdm-list{
    max-height:420px;
    padding:8px;
  }

  .tdm-post-title{
    font-size:0.98rem;
  }

  .tdm-post-address{
    font-size:0.85rem;
  }

  .tdm-post-actions a{
    font-size:0.85rem;
  }

  .tdm-post-left{
    width:34px;
    flex:0 0 34px;
  }

  .tdm-pin{
    width:18px;
    height:18px;
  }
}

/* ===============================
   Mobile
================================ */
@media (max-width:599px){
  .tdm-wrapper{
    max-width:320px;
    padding:0 8px;
  }

  .tdm-filters{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }

  .tdm-search-wrap,
  .tdm-city-wrap{
    width:100%;
  }

  .tdm-city-wrap{
    min-width:unset;
  }

  .tdm-city-select{
    width:100%;
    min-width:unset;
    max-width:100%;
  }

  .tdm-main{
    grid-template-columns:1fr;
    gap:14px;
  }

  .tdm-map{
    height:300px;
    border-radius:10px;
  }

  .tdm-list{
    max-height:300px;
    padding:8px;
  }

  .tdm-post-item{
    padding:10px;
    gap:10px;
  }

  .tdm-post-left{
    width:30px;
    flex:0 0 30px;
  }

  .tdm-pin{
    width:18px;
    height:18px;
  }

  .tdm-post-title{
    font-size:0.95rem;
  }

  .tdm-post-address{
    font-size:0.82rem;
    color:#556;
  }

  .tdm-post-actions a{
    font-size:0.82rem;
  }
}

@media (max-width:360px){
  .tdm-wrapper{
    padding:0 6px;
  }

  .tdm-map{
    height:260px;
  }

  .tdm-list{
    max-height:260px;
  }
}