/* ==========================================================
   Estilos del frontend - Subastas Altamar
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

.subastas-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.titulo-acceso {
  color: #3c1f14;
  font-weight: 600;
  margin-bottom: 10px;
}

.descripcion-acceso {
  color: #555;
  font-size: 15px;
  margin-bottom: 20px;
}

.codigo-form input {
  width: 70%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px 0 0 5px;
  font-size: 15px;
}

.btn-acceder {
  width: 30%;
  padding: 10px;
  background: #f5b625;
  color: #3c1f14;
  font-weight: 600;
  border: none;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-acceder:hover {
  background: #3c1f14;
  color: #fff;
}

.btn-solicitar {
  margin-top: 15px;
  background: transparent;
  border: 2px solid #f5b625;
  color: #3c1f14;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-solicitar:hover {
  background: #f5b625;
  color: #3c1f14;
}

/* Popup */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.popup-logo {
  width: 120px;
  margin-bottom: 15px;
}

.popup-close {
  position: absolute;
  top: 10px; right: 15px;
  cursor: pointer;
  font-size: 22px;
  color: #3c1f14;
}

.popup-content h3 {
  color: #3c1f14;
  margin-bottom: 15px;
}

#form-solicitud input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.btn-enviar {
  background: #f5b625;
  color: #3c1f14;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-enviar:hover {
  background: #3c1f14;
  color: #fff;
}

.popup-msg {
  margin-top: 10px;
  font-size: 14px;
  color: #3c1f14;
}

.mensaje-acceso {
  margin-top: 20px;
  color: #3c1f14;
  font-weight: 500;
}

.badge-ended{
  background:#eee;
  color:#666;
  padding:6px 10px;
  border-radius:20px;
  font-weight:600;
}

.subastas-toast{
  position: fixed;
  left:50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background:#3c1f14; color:#fff;
  padding:10px 16px; border-radius:8px;
  opacity:0; transition: all .25s ease; z-index:99999;
}
.subastas-toast.on{ opacity:1; transform: translateX(-50%) translateY(0); }

/* [SA] Nota de liderazgo bajo “Próximo precio” */
.sa-lead-note{
  font-size: 0.95rem;
  line-height: 1.35;
  color: #394240;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 8px 10px;
}
.sa-countdown{
  font-size: 1.05rem;
}

/* --- Forzar que el bloque de media ocupe el ancho completo de la tarjeta (detalle) --- */
.subastas-container > div[style*="display:flex"] > div:first-child {
  flex: 1 1 100% !important;
  width: 100% !important;
}

/* --- Media full-width y responsivo (iframe YouTube, <video> e imagen) --- */
#sa-video-yt,
#sa-video-html,
#detalle-media {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 10px;
  max-width: 100% !important;
  object-fit: cover;
}

/* --- Mini mejoras para tarjetas del listado --- */
.sub-card img{
  width:100%;
  max-width:100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  display:block;
}

/* --- Galería: hover + cursor zoom --- */
.sa-gallery img{
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.sa-gallery img:hover{
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* --- Lightbox (fallback a estilos inline del JS) --- */
#sa-lightbox{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.78);
  z-index:99999;
}
#sa-lightbox img{
  max-width:92vw;
  max-height:90vh;
  border-radius:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}
#sa-lightbox button{
  position:absolute;
  top:16px; right:18px;
  font-size:28px;
  line-height:1;
  color:#fff;
  background:transparent;
  border:0;
  cursor:pointer;
}

/* --- Responsivo --- */
@media (max-width: 768px){
  .subastas-container{
    margin: 24px 12px;
    padding: 14px;
  }
  .codigo-form input{ width:65%; }
  .btn-acceder{ width:35%; }
}
