/* =========================
   CONTENEDOR GENERAL
========================= */

.tp-container {
    text-align: center;
}

.even {
    background-color: #ccc;
}
.odd {
    background-color: #fff;
}

/* =========================
   WRAPPER IMAGEN + LOADER
========================= */

.tp-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.tp-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

/* =========================
   LOADER
========================= */

.tp-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 5px solid #ccc;
    border-top: 5px solid #000;
    border-radius: 50%;
    animation: tp-spin 1s linear infinite;
    display: none;
    z-index: 5;
}

@keyframes tp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mostrar loader durante carga */

.tp-loading img {
    opacity: 0;
}

.tp-loading .tp-loader {
    display: block;
}

/* =========================
   BOTONES EXTERNOS
========================= */

#tp-prev,
#tp-next {
    padding: 8px 15px;
    font-size: 18px;
    cursor: pointer;
}

/* =========================
   MODAL FULLSCREEN REAL
========================= */

.tp-modal {
    position: fixed;
    inset: 0; /* top:0; left:0; right:0; bottom:0 */
    width: 100%; /* 100vw; */
    height: 100%; /* 100vh; */
    background: rgba(0,0,0,0.5);
    display: none;

    /* Centrado perfecto */
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999999;
}

/* Solo visible cuando activo */
.tp-modal.active {
    display: flex;
}

/* Imagen modal */

.tp-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    z-index: 2;
}

/* =========================
   BOTÓN CERRAR
========================= */

.tp-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 3;
}

/* =========================
   FLECHAS MODAL
========================= */

.tp-modal-prev, .tp-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 100%;
  border: none;
  color: green;
  cursor: pointer;
  padding: 0px 20px;
  z-index: 3;
  font-weight: bold;
  font-family: serif;
  opacity: 0.5;
}

.tp-modal-prev {
    left: 20px;
}

.tp-modal-next {
    right: 20px;
}

/* Hover opcional */
.tp-modal-prev:hover,
.tp-modal-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

    .tp-modal-prev,
    .tp-modal-next {
        font-size: 40px;
    }

}