.guareels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.guareels-item {
    text-align: center;
}

.guareels-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.guareels-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guareels-title {
    font-size: 14px;
    margin-top: 6px;
}

/* ===========================
   VISTA INDIVIDUAL DEL REEL
   =========================== */

.guareels-single-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
}

.guareels-single-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Columna del video */
.guareels-video-column {
    flex: 0 0 360px;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.guareels-video-frame {
    width: 100%;
    max-width: 360px;         /* ancho típico vertical */
    aspect-ratio: 9 / 16;     /* proporción tipo celular */
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guareels-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Columna derecha: info */
.guareels-info-column {
    flex: 1;
    min-width: 280px;
}

.guareels-back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 14px;
    text-decoration: none;
    color: #666;
}

.guareels-back-link:hover {
    text-decoration: underline;
}

.guareels-single-title {
    font-size: 24px;
    margin: 5px 0 10px;
}

.guareels-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.guareels-content {
    margin-bottom: 25px;
}

/* Bloque de comentarios */
.guareels-comments-block {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Responsive: en móvil apilar columnas */
@media (max-width: 768px) {
    .guareels-single-inner {
        flex-direction: column;
        align-items: center;
    }

    .guareels-video-column,
    .guareels-info-column {
        max-width: 100%;
    }

    .guareels-video-frame {
        max-width: 100%;
    }
}

.guareels-nav {
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
}

.guareels-prev,
.guareels-next {
    background: #000;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.guareels-prev:hover,
.guareels-next:hover {
    background: #222;
}

/* ============================
   MODO FULLSCREEN PARA SINGLE REEL
   ============================ */

/* Ocultar header, footer y márgenes del tema en single-reel */
body.single-reel {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

/* intentamos cubrir la mayoría de temas */
body.single-reel header,
body.single-reel footer,
body.single-reel .site-header,
body.single-reel .site-footer,
body.single-reel .page-header,
body.single-reel .entry-header {
    display: none !important;
}

/* contenedor principal a pantalla completa */
body.single-reel .guareels-fullscreen {
    position: fixed;
    inset: 0;               /* top:0; right:0; bottom:0; left:0 */
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    z-index: 999;
}

/* el video cubre toda la pantalla */
.guareels-fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Versión escritorio: video tipo columna vertical centrado */
@media (min-width: 900px) {

    /* centramos contenido en pantalla */
    body.single-reel .guareels-fullscreen {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .guareels-fullscreen-video {
        height: 100vh;       /* ocupa el alto completo */
        width: auto;         /* ancho automático para respetar proporción */
        max-width: 460px;    /* ancho máximo tipo móvil vertical */
        object-fit: cover;
        border-radius: 16px; /* opcional, para que se vea más app */
        box-shadow: 0 0 20px rgba(0,0,0,0.6);
    }

    /* Ajustamos overlays para que sigan centrados sobre el “móvil” */
    .guareels-overlay {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .guareels-overlay-top,
    .guareels-overlay-right,
    .guareels-overlay-bottom {
        max-width: 460px;
        margin: 0 auto;
    }

    .guareels-overlay-top {
        left: 50%;
        transform: translateX(-50%);
    }

    .guareels-overlay-right {
        right: calc(50% - 230px); /* mitad del max-width */
    }

    .guareels-overlay-bottom {
        left: 50%;
        transform: translateX(-50%);
    }
}


/* Mensaje cuando no hay video */
.guareels-no-video {
    width: 100%;
    height: 100%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* capa encima del video */
.guareels-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none; /* por defecto no intercepta clics; activamos en botones */
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* título arriba izquierda */
.guareels-overlay-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 80px;
}

.guareels-title-top {
    margin: 0;
    font-size: 20px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* columna de iconos a la derecha */
.guareels-overlay-right {
    position: absolute;
    top: 30%;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guareels-overlay-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    font-size: 18px;
}

/* zona inferior: volver + siguiente/anterior */
.guareels-overlay-bottom {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guareels-back-link {
    pointer-events: auto;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 999px;
}

.guareels-back-link:hover {
    background: rgba(0,0,0,0.8);
}

.guareels-nextprev {
    display: flex;
    gap: 8px;
}

.guareels-prev,
.guareels-next {
    pointer-events: auto;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 999px;
}

.guareels-prev:hover,
.guareels-next:hover {
    background: rgba(0,0,0,0.8);
}

/* responsive: en móviles ya es básicamente fullscreen */
@media (max-width: 768px) {
    .guareels-title-top {
        font-size: 16px;
    }
}

/* ================================
   MODO ESCRITORIO - VIDEO VERTICAL 9:16
   ================================ */

@media (min-width: 900px) {

    /* Contenedor general fullscreen */
    body.single-reel .guareels-fullscreen {
        display: flex;
        justify-content: center;
        align-items: center;
        background: #000;
        position: fixed;
        inset: 0;
        z-index: 999;
    }

    /* Contenedor tipo "pantalla de celular" 9:16 */
    .guareels-vertical-wrapper {
        width: auto;
        height: 100vh;
        aspect-ratio: 9/16;
        max-height: 90vh;      /* para que no pegue al borde del navegador */
        max-width: calc(90vh * 9 / 16);
        position: relative;
        overflow: hidden;
        border-radius: 16px;   /* opcional tipo app */
        background: #000;
        box-shadow: 0px 0px 25px rgba(0,0,0,0.7);
    }

    /* El video se acomoda dentro sin deformarse */
    .guareels-fullscreen-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        inset: 0;
    }

    /* Overlays dentro de pantalla tipo mobile */
    .guareels-overlay {
        position: absolute;
        inset: 0;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
        pointer-events: none;
    }

    .guareels-overlay-top,
    .guareels-overlay-bottom,
    .guareels-overlay-right {
        pointer-events: auto;
    }

    .guareels-overlay-top {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .guareels-overlay-right {
        position: absolute;
        right: 12px;
        top: 40%;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .guareels-overlay-bottom {
        left: 12px;
        right: 12px;
        bottom: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}
