@font-face {
  font-family: 'Gotham-Bold';
  src: url('fonts/gothamrnd_bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Gotham-Normal';
  src: url('fonts/gothamrnd_medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Gotham-Light';
  src: url('fonts/gothamrnd_light.woff2') format('woff2');
}

body {
  position: relative;
  font-family: 'Gotham-Normal', Arial, sans-serif;
  margin: 0;
  padding-top: 85px;
}

/* CABECERA */
.barra-principal {
  background-color: #d60000;
  color: white;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}
.barra-superior {
  height: 25px;
  background-color: #b80000;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 0.9rem;
}
.etiqueta-superior {
  font-family: 'Gotham-Bold';
}
.barra-contenido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.logo {
  height: 38px;
  margin-right: 20px;
}

/* FILTROS */
.filtros-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.filtros-top select {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  font-size: 0.8rem;
  font-family: inherit;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
  color: rgba(0,0,0,0.5);
}

/* BUSCADOR - DESKTOP */
.search-box {
  display: flex;
  align-items: center;
  border-radius: 25px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
  height: 30px;
  margin-left: 10px;
}
.search-box input {
  border: none;
  padding: 6px 12px;
  outline: none;
  font-size: 0.8rem;
  font-family: inherit;
  width: 200px;
}
.search-box button {
  background: none;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #a02200;
}

/* MENSAJE “NO RESULTADOS” */
.mensaje-vacio {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff0e6;
  color: #b30000;
  border-radius: 12px;
  font-family: 'Gotham-Bold', sans-serif;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 10;
  font-size: 15px;
}
.mensaje-vacio.visible {
  max-height: 200px;
  opacity: 1;
  padding: 12px 20px;
}
.mensaje-vacio::before {
  content: '⚠️';
  font-size: 18px;
}

/* CATÁLOGO */
.catalogo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 40px 30px;
  justify-content: center;
  padding: 30px 20px 60px;
}
.item {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 10px 5px rgba(0,0,0,0.5);
  transition: transform 0.2s;
  width: 100%;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.item:hover {
  transform: translateY(-5px);
}
.item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}
.card-body {
  padding: 12px 16px;
  text-align: center;
  flex-grow: 1;
}
.card-body h2 {
  font-family: 'Gotham-Bold';
  font-size: 0.95rem;
  margin: 8px 0 4px;
  color: #b30000;
  text-transform: lowercase;
}
.card-body .codigo,
.card-body .detalles {
  font-size: 0.85rem;
  color: #444;
  margin: 2px 0;
}
.precio {
  background: #a62600;
  color: #fff;
  padding: 12px;
  font-size: 1.3rem;
  font-family: 'Gotham-Bold';
  text-align: center;
  border-top: 1px solid #ddd;
}

/* TABLET */
@media (min-width: 601px) and (max-width: 970px) {
  .catalogo {
    grid-template-columns: repeat(2,1fr);
    padding: 100px 15px 60px;
  }
  .item {
    max-width: 100%;
    margin: auto;
  }
  .item img {
    height: 220px;
  }
  .filtros-top {
    justify-content: center;
    gap: 12px;
    margin-top:10px;
  }
  .filtros-top select {
    width: 160px;
  }
  /* .search-box {
    width: 80%;
    margin: 10px auto 0;
  } */
   .search-box {
    margin-left: 0;         /* quita el margin-left de desktop */
    justify-content: flex-end;
    width: 100%; margin: 10px auto 0;
  }
  .search-box input {
    flex: 1;
    /* height: 36px; */
  }
}

/* MÓVIL */
@media (max-width: 600px) {
  .catalogo {
    grid-template-columns: 1fr;
    justify-content: center;
    padding: 100px 10px 60px;
  }
  .item {
    width: 80%;
    max-width: 90%;
    margin: auto;
  }
  .item img {
    height: 280px;
  }
  .filtros-top {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top:10px;
    flex-wrap: wrap;
  }
  .filtros-top select {
    width: 30%;
    /* max-width: 140px; */
    font-size: 0.9rem;
  }
  .search-box {
    display: flex;
    align-items: center;
    width: 100%;
    /* max-width: 400px; */
    margin: 10px 15px 0px 15px;
    justify-content: flex-start;
  }
  .search-box input {
    width: 100%;
  }
  .search-box button {
    padding: 6px 8px;
    font-size: 1.2rem;
  }
}


/* MODAL RESERVA — SUAVE Y RESPONSIVE */

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  /* Soporta modal centrado en pantallas pequeñas */
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}


.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  max-width: 800px;
  width: 90vw;
  background: #fff;
  border-radius: 12px;
  margin: 5vh auto;
  display: flex;
  overflow: hidden;
  transform: scale(0.93);
  transition: transform 0.3s cubic-bezier(.5,1.7,.29,.92);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  max-height: 88vh;
}

.modal.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 1.5rem; cursor: pointer;
  z-index: 2;
}

/* IMAGEN Y FORMULARIO */
.modal-img {
  flex: 1 1 48%;
  background: #f9f9f9;
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
  max-width: 50%;
  max-height: 88vh;
}
.modal-img img {
  max-width: 98%;
  max-height: 80vh;
  border-radius: 6px;
  display: block;
  margin: auto;
}
.modal-form {
  flex: 1 1 52%;
  padding: 24px;
  font-family: 'Gotham-Normal', sans-serif;
  min-width: 0;
  overflow-y: auto;
  max-height: 88vh;
}
.modal-form h2 {
  margin-top: 0; color: #b30000;
}
.modal-form form {
  display: flex; flex-direction: column; gap: 12px;
}
.modal-form label {
  display: flex; flex-direction: column;
  font-size: 0.9rem; color: #333;
}
.modal-form input[type="text"],
.modal-form input[type="tel"],
.modal-form input[type="date"],
.modal-form input[type="time"] {
  padding: 6px 8px;
  border: 1px solid #ccc; border-radius: 4px;
  font-size: 1rem; font-family: inherit;
}
.modal-form input[type="email"],
.modal-form select {
  padding: 6px 8px;
  border: 1px solid #ccc; border-radius: 4px;
  font-size: 1rem; font-family: inherit;
}

.modal-form .checkbox {
  flex-direction: row; 
  align-items: center;
  gap: 8px; 
  font-size: 0.85rem;
}

.row-fields {
  display: flex;
  gap: 12px;
}
.row-fields label {
  flex: 1 1 0;
  margin-bottom: 0;
}

.row-fields input,
.row-fields select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* SOLO apilar en móviles muy angostos */
/* @media (max-width: 400px) {
  .row-fields {
    flex-direction: column;
    gap: 0;
  }
} */


@media (max-width: 500px) {
  .row-fields label {
    font-size: 0.97rem;
  }
  .row-fields input {
    font-size: 0.97rem;
    padding: 4px 3px;
  }
}

.btn-reservar {
  background: #a02200;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-family: 'Gotham-Bold', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 8px;
}

/* Responsive modal: en móvil apila imagen y formulario */
@media (max-width: 600px) {
  .modal-content {
    flex-direction: column;
    margin: 10% auto;
    max-height: 98vh;
    width: 96vw;
  }
  .modal-img, .modal-form { width: 100%; max-width: none; }

  .modal-img {
    max-height: 38vh;
    min-height: 180px;
  }
  .modal-img img {
    max-width: 98vw;
    max-height: 36vh;
  }
  .modal-form {
    max-height: 60vh;
    padding: 14px;
    overflow-y: auto;
    width: 95%;
  }


}

/* Modal de condiciones: similar al modal principal pero más pequeño */
.modal-condiciones {
  /* max-width: 500px; */
  width: 90vw;
  margin: 8% auto;
  padding: 0;
  flex-direction: column;
  /* font-family: 'Gotham-Light'; */
  justify-content: flex-start;
}
.modal-condiciones-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
  text-align: justify;
  font-family: 'Gotham-Light', Arial, sans-serif;
}
.modal-condiciones h2 {
  margin-top: 0;
  color: #b30000;
}
.modal-condiciones p {
  font-size: 0.95rem;
  color: #444;
  text-align: justify;
}

/* Opcional: resalta el enlace */
label.checkbox a {
  color: #a02200;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
label.checkbox a:focus {
  outline: 2px solid #a02200;
}

.modal-img {
  position: relative; /* <- Añade esta propiedad aquí */
}

.modal-precio {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(166, 38, 0, 0.92);
  color: #fff;
  font-family: 'Gotham-Bold', sans-serif;
  font-size: 1.4rem;
  border-radius: 16px;
  padding: 8px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  pointer-events: none;
  z-index: 3;
}

.franja-estado {
  position: absolute;
  left: -85px;
  top: 50px;
  width: 365px;
  transform: rotate(-35deg);
  background: #f4c300; /* DORADO por defecto (reservado/confirmado) */
  color: #fff;
  text-align: center;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  font-size: 1.23rem;
  letter-spacing: 1px;
  text-shadow: 1px 2px 6px #000a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  padding: 10px 0 7px 0;
  z-index: 10;
  opacity: 0.96;
  pointer-events: none;
  user-select: none;
  border-radius: 7px;
}
.franja-estado.vendido {
  background: #181818; /* NEGRO para VENDIDO */
  color: #ffd700;
  box-shadow: 0px 0px 8px 2px rgba(255,255,255,0.5);
}

.item.no-reservable {
  cursor: not-allowed !important;
}

@media (max-width: 600px) {
  .franja-estado {
    left: -130px;
    top: 60px;
    width: 500px;
    font-size: 2rem;
    padding: 7px 0 4px 0;
  }
}

/* BLOQUE ÚNICO PARA .row-fields */
.row-fields {
  display: flex;
  gap: 12px;
}
.row-fields label {
  flex: 1 1 0;
  margin-bottom: 0;
}
.row-fields input,
.row-fields select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* SOLO apilar en móviles muy angostos */

@media (max-width: 500px) {
  .row-fields label {
    font-size: 0.97rem;
  }
  .row-fields input {
    font-size: 0.97rem;
    padding: 4px 3px;
  }
}

.img-loader {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border: 4px solid #ffea96;
  border-top: 4px solid #d60000;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  background: transparent;
  z-index: 2;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg);}
  100% { transform: translate(-50%, -50%) rotate(360deg);}
}

.paginador {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 18px auto 18px;
  flex-wrap: wrap;
}
.pagina-btn {
  background: #fff;
  border: none;
  color: #b30000;
  font-family: 'Gotham-Bold', sans-serif;
  border-radius: 6px;
  padding: 4px 12px;
  margin: 0 2px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.pagina-btn:hover, .pagina-btn.actual {
  background: #b30000;
  box-shadow: 1px 1px 3px 2px rgba(0,0,0,0.5);
  color: #fff;
}

.selector-items-pagina {
  display: flex;
  justify-content: center;   /* <--- cambia aquí */
  align-items: center;
  gap: 6px;
  margin: 10px 0 0 0;
  font-size: 1rem;
}
.selector-items-pagina select {
  border-radius: 8px;
  padding: 2px 8px;
  margin: 0 5px;
  font-size: 1rem;
}


.modal-loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-loader .img-loader {
  position: static;
  width: 44px;
  height: 44px;
  border-width: 5px;
}
.hidden { display: none !important; }

/* MODAL DE FOTOS DE JOYAS */

.visor-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,10,15,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  opacity: 1;
}
.visor-modal.hidden {
  display: none !important;
}

.visor-img-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#visorImagen {
  display: block;
  max-width: 96vw;
  max-height: 96vh;
  object-fit: contain;
  margin: 0 auto;
  box-shadow: 0 6px 80px 8px rgba(0,0,0,0.50);
  background: #000;
  border-radius: 0;
}

.img-loader#visor-loader {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: none;
}

/* Flechas laterales */
.visor-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255,255,255,0.09);
  border: none;
  font-size: 3.5em;
  color: #fff;
  padding: 0 22px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.20);
  transition: background 0.18s, color 0.18s;
  outline: none;
}
.visor-prev { left: 30px; }
.visor-next { right: 30px; }
.visor-arrow:active { background: rgba(255,255,255,0.18); color: #ff4a4a; }

/* Botón cerrar arriba a la derecha */
.visor-cerrar {
  position: fixed;
  top: 36px; right: 38px;
  background: none; border: none;
  font-size: 2.7em; color: #fff;
  opacity: 0.89;
  cursor: pointer; z-index: 22;
}
.visor-cerrar:hover { color: #ff3b3b; opacity: 1; }

.visor-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0; 
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 19;
  /* Ajusta el padding inferior para dar más espacio al botón */
  padding-bottom: 38px;
  pointer-events: none; /* solo el botón es clickable */
}

.visor-etiqueta {
  display: inline-block;
  background: #b30000e0;
  color: #fff;
  padding: 10px 25px;
  font-size: 1.22em;
  border-radius: 12px;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  margin-bottom: 25px;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.17);
  pointer-events: none;
}

.visor-descripcion {
  background: rgba(20,20,20,0.90);
  color: #fff;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  font-size: 1.13em;
  border-radius: 8px;
  padding: 12px 28px;
  margin-bottom: 18px;  /* separa del botón */
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  pointer-events: none;
  text-align: center;
  max-width: 80vw;
  /* Nuevo: */
  margin-top: 8px;
}

.btn-abrir-reserva {
  background: #a02200;
  color: #fff;
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  font-size: 1.11em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  margin-top: 8px;
  pointer-events: auto;
  transition: background 0.16s;
}
.btn-abrir-reserva:disabled {
  background: #888 !important;
  cursor: not-allowed !important;
}




@media (max-width: 700px) {
  .visor-arrow {
    font-size: 1.5em;
    padding: 0 7px;
    top: 60% !important;
  }
  .visor-prev { left: 3vw !important; }
  .visor-next { right: 3vw !important; }
  .visor-img-wrap { height: 78vw; }
  .visor-overlay { padding-bottom: 18px; }
}

.visor-etiqueta {
  display: inline-block;
  /* margin-top: 12px; */
  min-width: 150px;
  font-size: 1.15em;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  border-radius: 8px;
  padding: 12px 38px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  color: #fff;
  letter-spacing: 0.5px;
  font-weight: 600;
  user-select: none;
}
.visor-etiqueta.reservado {
  background: linear-gradient(90deg, #dfc16a 20%, #bfa840 80%);
  color: #6e5417; /* dorado oscuro */
  border: 1px solid #e1c774;
  text-shadow: 0 1px 0 #f6eaa2;
}
.visor-etiqueta.vendido {
  background: #232323;
  color: #fff;
  border: 1px solid #000;
  text-shadow: 0 1px 3px #000, 0 1px 0 #fff3;
}

.visor-img-box {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  /* La altura se controla por el contenedor padre .visor-img-wrap */
}

#visorImagen {
  display: block;
  max-width: 96vw;
  max-height: 96vh;
  object-fit: contain;
  margin: 0 auto;
  background: #000;
  border-radius: 0;
}

/* El overlay ahora sí está SIEMPRE pegado abajo de la foto */
.visor-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 19;
  padding-bottom: 22px;
  pointer-events: none;
}

.visor-descripcion {
  background: rgba(20,20,20,0.90);
  color: #fff;
  font-family: 'Gotham-Bold', Arial, sans-serif;
  font-size: 1.1em;
  border-radius: 8px;
  /* padding: 10px 14vw; */
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  pointer-events: none;
  text-align: center;
  max-width: 92vw;
}

.btn-abrir-reserva,
.visor-etiqueta {
  margin-bottom: 0;
  margin-top: 0;
}

/* Responsive */
@media (max-width: 700px) {
  .visor-img-wrap {
    height: 90vw;
    max-height: 95vh;
  }
  .visor-overlay {
    padding-bottom: 8vw;
  }
  .visor-descripcion { 
    font-size: 0.98em; 
    padding: 7px 4vw; 
  }
}



