/* ============================
   ESTILOS GENERALES DEL PLUGIN
   ============================ */

.po-market-wrap {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 20px;
  box-sizing: border-box;
}

.po-market-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.po-market-subtitle {
  color: #666;
  margin-bottom: 20px;
}

/* ============================
   GRID TARJETAS (MERCADO)
   ============================ */

.po-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* Tarjeta base */
.po-card-paloma {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.po-card-paloma:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

/* Imagen */
.po-card-img-wrapper {
  border-radius: 16px;
  overflow: hidden;
  background: #f4f4f4;
  margin-bottom: 10px;
}

.po-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* Info */
.po-card-title {
  font-size: 1.05rem;
  margin: 6px 0 6px;
  font-weight: 700;
}

.po-card-price {
  font-size: 1rem;
  margin: 0 0 6px;
  font-weight: 700;
  color: #111827;
}

.po-card-location {
  font-size: 0.9rem;
  margin: 0 0 10px;
  color: #64748b;
}

.po-card-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

/* ============================
   FICHA (SINGLE) PALOMA/ACCESORIO
   ============================ */

.po-ficha-paloma-wrap {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 20px;
  box-sizing: border-box;
}

.po-ficha-paloma-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
  overflow: hidden;
}

.po-ficha-main {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  padding: 18px;
}

.po-ficha-galeria {
  background: #f8fafc;
  border-radius: 18px;
  overflow: hidden;
}

.po-ficha-info {
  padding: 4px 4px 4px 6px;
}

.po-ficha-titulo {
  font-size: 2.1rem;
  line-height: 1.3;
  letter-spacing: 0px;
  margin-bottom: 12px;
}

.po-ficha-precio,
.po-ficha-ubicacion,
.po-ficha-contacto {
  font-size: 1.05rem;
  line-height: 1.45;
  letter-spacing: 0.2px;
  margin: 5px 0;
}

.po-ficha-tags span {
  font-size: 0.95rem;
}

.po-ficha-descripcion {
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: 0.1px;
}

/* Slider */
.po-ficha-slider {
  position: relative;
}

.po-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(17,24,39,.75);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.po-slider-prev { left: 10px; }
.po-slider-next { right: 10px; }

.po-slider-inner {
  position: relative;
}

.po-ficha-foto-principal {
  width: 100%;
  height: auto;
  display: block;
}

.po-slider-indicator {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15,23,42,.72);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}

/* Relacionadas */
.po-ficha-relacionadas {
  padding: 18px;
  border-top: 1px solid #eef2f7;
}

.po-relacionadas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.po-rel-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.po-rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

.po-rel-imgwrap {
  border-radius: 16px;
  overflow: hidden;
  background: #f1f5f9;
}

.po-rel-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.po-rel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.po-rel-precio {
  margin: 4px 0 2px;
  font-size: .95rem;
  color: #111827;
  font-weight: 700;
}

.po-rel-ubicacion {
  margin: 0 0 4px;
  font-size: .8rem;
  color: #64748b;
}

.po-rel-link {
  font-size: .8rem;
  color: #2563eb;
}

/* ============================
   MÓVIL (LISTADOS + FICHA)
   ============================ */

@media (max-width: 600px) {

  .po-market-wrap {
    max-width: 100%;
    padding: 12px 8px 32px;
    margin: 0 auto 40px;
  }

  .po-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .po-card-paloma {
    padding: 8px;
    border-radius: 16px;
  }

  .po-card-img-wrapper {
    margin-bottom: 6px;
    border-radius: 14px;
  }

  .po-card-title {
    font-size: 0.95rem;
    margin: 3px 0 4px;
  }

  .po-card-price {
    font-size: 0.95rem;
  }

  .po-ficha-paloma-wrap,
  .po-single-paloma,
  .po-ficha-main {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }

  .po-ficha-main {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .po-relacionadas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* ============================
   FORMULARIOS (VENDER PALOMA / ACCESORIO)
   Diseño "robusto" + letras grandes
   ============================ */

.po-market-form{
  max-width: 980px;
  margin: 18px auto 60px;
  padding: 0 18px;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.po-market-form h2{
  margin: 0 0 8px;
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.po-market-form .po-form-subtitle{
  margin: 0 0 18px;
  font-size: 1.08rem;
  line-height: 1.45;
  color: #475569;
}

.po-market-form form{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 18px;
  box-sizing: border-box;
}

.po-market-success,
.po-market-errors{
  border-radius: 16px;
  padding: 14px 14px;
  margin: 14px 0;
  border: 1px solid transparent;
  box-sizing: border-box;
  font-size: 1.05rem;
  line-height: 1.45;
}

.po-market-success{
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.po-market-errors{
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.po-market-errors ul{
  margin: 0;
  padding-left: 18px;
}

.po-market-form h3{
  margin: 18px 0 10px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
  font-size: 1.25rem;
  line-height: 1.2;
}

.po-market-form h3:first-of-type{
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Campos (por defecto, sin tocar tu HTML actual) */
.po-market-form form > p{
  margin: 0 0 14px;
}

.po-market-form label strong,
.po-market-form strong{
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.po-market-form input[type="text"],
.po-market-form input[type="number"],
.po-market-form input[type="email"],
.po-market-form select,
.po-market-form textarea{
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  background: #fbfdff;
  font-size: 1.08rem;
  line-height: 1.2;
  color: #0f172a;
  outline: none;
}

.po-market-form textarea{
  min-height: 132px;
  resize: vertical;
}

.po-market-form input::placeholder,
.po-market-form textarea::placeholder{
  color: #94a3b8;
}

.po-market-form input:focus,
.po-market-form select:focus,
.po-market-form textarea:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.22);
  background: #ffffff;
}

/* Radios y checkboxes más visibles */
.po-market-form input[type="radio"],
.po-market-form input[type="checkbox"]{
  transform: scale(1.15);
  transform-origin: left center;
  accent-color: #2563eb;
}

.po-market-form small{
  display: block;
  margin-top: 8px;
  font-size: 0.98rem;
  line-height: 1.35;
  color: #64748b;
}

/* Botones */
.po-btn-upload{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.po-btn-upload:hover{
  background: #f8fafc;
}

.po-btn-upload:active{
  transform: translateY(1px);
}

.po-btn-upload.po-btn-video{
  border-color: #c7d2fe;
}

.po-btn-submit{
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1.15rem;
  font-weight: 800;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
}

.po-btn-submit:hover{
  filter: brightness(1.05);
}

.po-market-hint{
  margin: 10px 0 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: #64748b;
}

/* Preview de fotos */
.po-preview-fotos{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.po-foto-card{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  aspect-ratio: 1 / 1;
}

.po-foto-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.po-btn-principal,
.po-btn-remove{
  position: absolute;
  left: 8px;
  right: 8px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.po-btn-principal{
  bottom: 8px;
  background: rgba(17, 24, 39, 0.92);
  color: #ffffff;
}

.po-btn-remove{
  top: 8px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
}

/* Overlay de carga */
.po-vp-loading{
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  z-index: 999999;
  padding: 16px;
  box-sizing: border-box;
}

.po-vp-loading-inner{
  max-width: 720px;
  margin: 8vh auto 0;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.po-vp-loading-inner p{
  margin: 10px 0 0;
  font-size: 1.06rem;
  line-height: 1.45;
  color: #0f172a;
}

.po-vp-spinner{
  width: 44px;
  height: 44px;
  margin: 4px auto 0;
  border-radius: 50%;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  animation: poSpin 0.9s linear infinite;
}

@keyframes poSpin{
  to { transform: rotate(360deg); }
}

/* Categoría estilo "botón" (cuando pasemos el template a radios) */
.po-cat-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

@media (min-width: 992px){
  .po-cat-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.po-cat-option{
  position: relative;
}

.po-cat-option input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.po-cat-option label{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  text-align: center;
  min-height: 50px;
  box-sizing: border-box;
}

.po-cat-option label:hover{
  background: #f8fafc;
}

.po-cat-option input:checked + label{
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

/* Layout pro en PC (cuando el template lo envuelva en .po-form-grid) */
@media (min-width: 992px){
  .po-form-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    align-items: start;
  }
  .po-field--full{
    grid-column: 1 / -1;
  }
}

/* Mobile: más aire lateral y letras más cómodas */
@media (max-width: 600px){
  .po-market-form{
    padding: 0 12px;
    margin: 12px auto 44px;
  }
  .po-market-form form{
    padding: 14px;
    border-radius: 18px;
  }
  .po-market-form h2{
    font-size: 1.75rem;
  }
  .po-market-form input[type="text"],
  .po-market-form input[type="number"],
  .po-market-form select,
  .po-market-form textarea{
    font-size: 1.12rem;
    padding: 15px 14px;
  }
  .po-preview-fotos{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .po-btn-submit{
    font-size: 1.18rem;
    padding: 15px 16px;
  }
}
