/* =============================================================================
   Twingital Directory Pro — Frontend Styles
   by Twingital Devs | twingital.com
   Variables CSS inyectadas inline por TDP_Frontend::css_vars()
   ============================================================================= */

/* ── Reset base ────────────────────────────────────────────────────────────── */
.tdp-wrap *,
.tdp-wrap *::before,
.tdp-wrap *::after { box-sizing: border-box; }

.tdp-wrap {
  font-family: var(--tdp-font, inherit);
  color: var(--tdp-card-text, #1e293b);
  line-height: 1.6;
}

/* ── Alertas ────────────────────────────────────────────────────────────────── */
.tdp-alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid;
}
.tdp-alert-info    { background: #eff6ff; border-color: var(--tdp-primary, #2563eb); color: #1e40af; }
.tdp-alert-success { background: #f0fdf4; border-color: #16a34a; color: #166534; }
.tdp-alert-error   { background: #fef2f2; border-color: #dc2626; color: #991b1b; }
.tdp-alert a       { color: inherit; font-weight: 600; }

/* ── Botones ────────────────────────────────────────────────────────────────── */
.tdp-btn,
button.tdp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--tdp-btn-radius, 8px);
  border: 2px solid transparent;
  background: var(--tdp-btn-bg, var(--tdp-primary, #2563eb));
  color: var(--tdp-btn-text, #fff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.tdp-btn:hover { opacity: .88; text-decoration: none; transform: translateY(-1px); color: var(--tdp-btn-text, #fff); }
.tdp-btn:active { transform: translateY(0); }
.tdp-btn:focus  { outline: 2px solid var(--tdp-primary); outline-offset: 3px; }

.tdp-btn-secondary {
  background: transparent;
  border-color: var(--tdp-primary, #2563eb);
  color: var(--tdp-primary, #2563eb);
}
.tdp-btn-secondary:hover { background: var(--tdp-primary, #2563eb); color: #fff; }

.tdp-btn-ghost {
  background: transparent;
  border-color: #cbd5e1;
  color: #475569;
}
.tdp-btn-ghost:hover { border-color: var(--tdp-primary); color: var(--tdp-primary); }

.tdp-btn-danger  { background: #dc2626; color: #fff; }
.tdp-btn-danger:hover { background: #b91c1c; color: #fff; }

.tdp-btn-sm { padding: 7px 16px; font-size: 13px; }
.tdp-btn-xs { padding: 5px 12px; font-size: 12px; }
.tdp-btn-full { width: 100%; justify-content: center; }
.tdp-btn[disabled], .tdp-btn.is-loading { opacity: .6; pointer-events: none; cursor: not-allowed; }

/* ── Search bar ─────────────────────────────────────────────────────────────── */
.tdp-search-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: calc(var(--tdp-radius, 12px) + 4px);
  padding: 16px 20px;
  margin-bottom: 28px;
  box-shadow: var(--tdp-shadow, 0 4px 24px rgba(0,0,0,.08));
}
.tdp-search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.tdp-search-input {
  flex: 1;
  min-width: 200px;
  border: 1px solid #e2e8f0;
  border-radius: var(--tdp-btn-radius, 8px);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: var(--tdp-font, inherit);
}
.tdp-search-input:focus {
  border-color: var(--tdp-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.tdp-search-select {
  border: 1px solid #e2e8f0;
  border-radius: var(--tdp-btn-radius, 8px);
  padding: 10px 14px;
  font-size: 14px;
  background: #fff;
  min-width: 160px;
  font-family: var(--tdp-font, inherit);
}

/* ── Grid de publicaciones ──────────────────────────────────────────────────── */
.tdp-listings-wrap { margin-bottom: 40px; }
.tdp-listings-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
}
.tdp-grid-cols-1 { grid-template-columns: 1fr; }
.tdp-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tdp-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tdp-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .tdp-grid-cols-4, .tdp-grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tdp-grid-cols-4, .tdp-grid-cols-3, .tdp-grid-cols-2 { grid-template-columns: 1fr; }
}

/* ── Tarjeta de publicación ─────────────────────────────────────────────────── */
.tdp-card {
  background: var(--tdp-card-bg, #fff);
  border-radius: var(--tdp-radius, 12px);
  box-shadow: var(--tdp-shadow, 0 4px 24px rgba(0,0,0,.08));
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,.06);
  color: var(--tdp-card-text, #1e293b);
}
.tdp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.13);
}
a.tdp-card { text-decoration: none; color: inherit; }

/* Imagen de tarjeta */
.tdp-card-image {
  position: relative;
  padding-top: 58%;
  overflow: hidden;
  background: #f1f5f9;
}
.tdp-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.tdp-card:hover .tdp-card-image img { transform: scale(1.04); }
.tdp-card-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: linear-gradient(135deg, #e0e7ff, #f5f3ff);
}

/* Badge destacada */
.tdp-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--tdp-feat-badge, #f59e0b);
  color: #fff;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: tdp-badge-in .3s ease;
}
@keyframes tdp-badge-in {
  from { opacity:0; transform:translateY(-4px) scale(.95); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* Card destacada: borde coloreado + sombra */
.tdp-card.is-featured {
  border: 1.5px solid color-mix(in srgb, var(--tdp-feat-badge, #f59e0b) 40%, transparent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--tdp-feat-badge, #f59e0b) 15%, transparent), 0 1px 4px rgba(0,0,0,.06);
  position: relative;
}
.tdp-card.is-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--tdp-feat-badge, #f59e0b) 6%, transparent) 0%,
    transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.tdp-card.is-featured:hover {
  box-shadow: 0 14px 40px color-mix(in srgb, var(--tdp-feat-badge, #f59e0b) 25%, transparent), 0 4px 12px rgba(0,0,0,.08);
  border-color: color-mix(in srgb, var(--tdp-feat-badge, #f59e0b) 70%, transparent);
}

/* Cuerpo de tarjeta */
.tdp-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tdp-card-cats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.tdp-card-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--tdp-primary, #2563eb);
  background: rgba(37,99,235,.08);
  padding: 2px 8px;
  border-radius: 20px;
  text-decoration: none;
}
.tdp-card-cat:hover { background: var(--tdp-primary, #2563eb); color: #fff; }

.tdp-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--tdp-card-text, #0f172a);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tdp-card-city {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tdp-card-excerpt {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* Footer de tarjeta */
.tdp-card-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(0,0,0,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tdp-card-contact { display: flex; gap: 6px; }
.tdp-contact-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--tdp-card-bg, #f8fafc);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  transition: background .15s, transform .15s;
  flex-shrink: 0;
}
.tdp-contact-icon:hover { background: var(--tdp-primary, #2563eb); transform: scale(1.1); }

/* ── Single listing ─────────────────────────────────────────────────────────── */
.tdp-single-wrap {
  max-width: 960px;
  margin: 0 auto;
}
.tdp-single-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tdp-single-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--tdp-card-text, #0f172a);
}
.tdp-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #64748b;
  align-items: center;
}
.tdp-single-cat-pill {
  background: var(--tdp-primary, #2563eb);
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* Imagen destacada + galería */
.tdp-single-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 28px;
  border-radius: var(--tdp-radius, 12px);
  overflow: hidden;
}
.tdp-single-gallery.has-grid {
  grid-template-columns: 3fr 1fr;
  grid-template-rows: auto;
}
.tdp-gallery-main {
  position: relative;
  padding-top: 52%;
  background: #f1f5f9;
  overflow: hidden;
  border-radius: var(--tdp-radius, 12px);
}
.tdp-single-gallery.has-grid .tdp-gallery-main {
  border-radius: 0;
  grid-row: span 3;
}
.tdp-gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform .3s;
}
.tdp-gallery-main img:hover { transform: scale(1.02); }
.tdp-gallery-thumb {
  position: relative;
  padding-top: 70%;
  overflow: hidden;
  cursor: zoom-in;
  background: #f1f5f9;
}
.tdp-gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s, opacity .2s;
}
.tdp-gallery-thumb:hover img { transform: scale(1.05); opacity: .85; }
.tdp-gallery-more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

/* Layout single: main + sidebar */
.tdp-single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .tdp-single-layout         { grid-template-columns: 1fr; }
  .tdp-single-gallery.has-grid { grid-template-columns: 1fr; }
}

/* Contenido */
.tdp-single-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--tdp-card-text, #1e293b);
}
.tdp-single-content h2,
.tdp-single-content h3 { margin-top: 24px; }

/* Sidebar */
.tdp-single-sidebar { display: flex; flex-direction: column; gap: 18px; }

.tdp-info-card {
  background: var(--tdp-card-bg, #fff);
  border-radius: var(--tdp-radius, 12px);
  border: 1px solid #e2e8f0;
  box-shadow: var(--tdp-shadow, 0 4px 20px rgba(0,0,0,.07));
  overflow: hidden;
}
.tdp-info-card__header {
  background: var(--tdp-primary, #2563eb);
  color: #fff;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
}
.tdp-info-card__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }

.tdp-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #475569;
}
.tdp-info-row a { color: var(--tdp-primary, #2563eb); text-decoration: none; font-weight: 500; }
.tdp-info-row a:hover { text-decoration: underline; }
.tdp-info-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }

/* Redes sociales */
.tdp-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
}
.tdp-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #475569;
  transition: all .15s;
}
.tdp-social-link:hover { background: var(--tdp-primary, #2563eb); color: #fff; border-color: var(--tdp-primary); }

/* Horarios */
.tdp-hours-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.tdp-hours-table td { padding: 5px 0; vertical-align: top; }
.tdp-hours-table td:first-child { font-weight: 600; color: #374151; padding-right: 12px; width: 100px; }
.tdp-hours-closed  { color: #ef4444; font-style: italic; }
.tdp-hours-open    { color: #16a34a; }
.tdp-today-row td  { background: rgba(37,99,235,.06); border-radius: 4px; }

/* Botón WhatsApp */
.tdp-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #25d366;
  color: #fff;
  border-radius: var(--tdp-btn-radius, 8px);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.tdp-whatsapp-btn:hover { background: #1ebe5a; color: #fff; transform: translateY(-1px); }

/* Mapa single */
.tdp-single-map {
  height: 220px;
  border-radius: var(--tdp-radius, 12px);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-top: 4px;
}

/* Reclamo */
.tdp-claim-section { padding: 16px 0 0; }
.tdp-claim-toggle  { background: none; border: none; color: var(--tdp-primary, #2563eb); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
.tdp-claim-form    { display: none; margin-top: 12px; }
.tdp-claim-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  font-family: var(--tdp-font, inherit);
  margin-bottom: 10px;
}
.tdp-claim-form textarea:focus { border-color: var(--tdp-primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ── Mapa página ─────────────────────────────────────────────────────────────── */
.tdp-map-section { margin-bottom: 40px; }
.tdp-map-container {
  border-radius: var(--tdp-radius, 12px);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: var(--tdp-shadow, 0 4px 24px rgba(0,0,0,.08));
}
.tdp-map-popup { min-width: 180px; max-width: 220px; font-family: var(--tdp-font, inherit); }
.tdp-map-popup img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.tdp-map-popup strong { display: block; font-size: 14px; margin-bottom: 4px; }
.tdp-map-popup .tdp-map-city { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.tdp-map-popup .tdp-map-phone { font-size: 13px; margin-bottom: 8px; }
.tdp-map-popup a.tdp-btn { font-size: 12px; padding: 6px 14px; }

/* ── Dashboard de usuario ────────────────────────────────────────────────────── */
.tdp-dashboard-wrap { max-width: 980px; margin: 0 auto; }

/* Tabs */
.tdp-dashboard-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 28px;
  gap: 0;
  flex-wrap: wrap;
}
.tdp-dash-tab {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tdp-dash-tab:hover { color: var(--tdp-primary, #2563eb); }
.tdp-dash-tab.active {
  color: var(--tdp-primary, #2563eb);
  border-bottom-color: var(--tdp-primary, #2563eb);
}
.tdp-tab-pane { display: none; }
.tdp-tab-pane.active { display: block; }

/* Panel: mis publicaciones */
.tdp-my-listings { display: flex; flex-direction: column; gap: 14px; }
.tdp-my-listing-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--tdp-radius, 12px);
  padding: 16px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: box-shadow .15s;
}
.tdp-my-listing-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); }
.tdp-my-listing-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
}
.tdp-my-listing-thumb-ph {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.tdp-my-listing-info { flex: 1; min-width: 0; }
.tdp-my-listing-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--tdp-card-text, #0f172a); }
.tdp-my-listing-meta  { font-size: 12px; color: #94a3b8; display: flex; gap: 10px; flex-wrap: wrap; }
.tdp-my-listing-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Formulario de publicación */
.tdp-listing-form { max-width: 760px; }

.tdp-form-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--tdp-radius, 12px);
  margin-bottom: 20px;
  overflow: hidden;
}
.tdp-form-section__header {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.tdp-form-section__body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.tdp-field { display: flex; flex-direction: column; gap: 6px; }
.tdp-field label { font-size: 13px; font-weight: 600; color: #374151; }
.tdp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .tdp-field-row { grid-template-columns: 1fr; } }

.tdp-input, .tdp-textarea, .tdp-select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--tdp-font, inherit);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  color: #1e293b;
  width: 100%;
}
.tdp-input:focus, .tdp-textarea:focus, .tdp-select:focus {
  border-color: var(--tdp-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.tdp-textarea { resize: vertical; min-height: 120px; }
.tdp-field-hint { font-size: 12px; color: #94a3b8; }

/* Horarios frontend */
.tdp-hours-form { width: 100%; }
.tdp-hours-form table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tdp-hours-form th { text-align: left; padding: 6px 8px; color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #f1f5f9; }
.tdp-hours-form td { padding: 6px 8px; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.tdp-hours-form td:first-child { font-weight: 600; width: 100px; }
.tdp-hours-form input[type="time"] { border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.tdp-hours-form input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.tdp-split-row { transition: opacity .2s; }
.tdp-split-row.hidden { opacity: .4; pointer-events: none; }

/* Subida de imagen / thumbnail */
.tdp-thumb-upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tdp-thumb-preview {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  display: none;
}
.tdp-thumb-preview.visible { display: block; }
.tdp-thumb-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 2px dashed #cbd5e1;
  cursor: pointer;
}

/* Galería frontend */
.tdp-gallery-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.tdp-gallery-upload-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
}
.tdp-gallery-upload-item img { width: 100%; height: 100%; object-fit: cover; }
.tdp-gallery-upload-item .tdp-rm-img {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.tdp-gallery-add-btn {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 2px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color .15s, color .15s;
}
.tdp-gallery-add-btn:hover { border-color: var(--tdp-primary, #2563eb); color: var(--tdp-primary, #2563eb); }

/* Form actions */
.tdp-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.tdp-form-status {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  display: none;
}
.tdp-form-status.success { display: block; background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.tdp-form-status.error   { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* Categorías checkboxes */
.tdp-cats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tdp-cat-check { display: none; }
.tdp-cat-label {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  color: #475569;
}
.tdp-cat-check:checked + .tdp-cat-label {
  background: var(--tdp-primary, #2563eb);
  color: #fff;
  border-color: var(--tdp-primary, #2563eb);
}

/* Mapa en formulario */
.tdp-form-map {
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-top: 8px;
}
.tdp-geocode-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tdp-geocode-status { font-size: 12px; color: #64748b; }

/* ── Paginación frontend ────────────────────────────────────────────────────── */
.tdp-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tdp-page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #475569;
  text-decoration: none;
  transition: all .15s;
}
.tdp-page-btn:hover { border-color: var(--tdp-primary, #2563eb); color: var(--tdp-primary, #2563eb); }
.tdp-page-btn.current { background: var(--tdp-primary, #2563eb); border-color: var(--tdp-primary, #2563eb); color: #fff; pointer-events: none; }
.tdp-page-btn[disabled] { opacity: .4; pointer-events: none; }

/* ── Lightbox ───────────────────────────────────────────────────────────────── */
.tdp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
}
.tdp-lightbox.active { display: flex; }
.tdp-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 60px rgba(0,0,0,.6);
}
.tdp-lb-close,
.tdp-lb-prev,
.tdp-lb-next {
  position: fixed;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.tdp-lb-close:hover,
.tdp-lb-prev:hover,
.tdp-lb-next:hover { background: rgba(255,255,255,.25); }
.tdp-lb-close { top: 18px; right: 18px; width: 40px; height: 40px; font-size: 18px; }
.tdp-lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.tdp-lb-next  { right: 16px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }

/* ── Loading spinner ────────────────────────────────────────────────────────── */
.tdp-spinner {
  display: none;
  text-align: center;
  padding: 32px;
  color: #94a3b8;
  font-size: 14px;
}
.tdp-spinner::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--tdp-primary, #2563eb);
  border-radius: 50%;
  animation: tdp-spin .7s linear infinite;
  margin: 0 auto 10px;
}
@keyframes tdp-spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.tdp-empty-state {
  text-align: center;
  padding: 56px 20px;
  color: #94a3b8;
}
.tdp-empty-state__icon { font-size: 56px; display: block; margin-bottom: 14px; }
.tdp-empty-state h3    { font-size: 18px; color: #475569; margin-bottom: 8px; }
.tdp-empty-state p     { font-size: 14px; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tdp-single-layout { grid-template-columns: 1fr; }
  .tdp-my-listing-item { flex-direction: column; align-items: flex-start; }
  .tdp-lb-prev { left: 6px; }
  .tdp-lb-next { right: 6px; }
}
@media (max-width: 480px) {
  .tdp-dashboard-tabs { gap: 0; }
  .tdp-dash-tab       { padding: 10px 14px; font-size: 13px; }
}