.viewer360-wrap {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.v360-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.v360-canvas:active { cursor: grabbing; }

.v360-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    font-size: 14px;
    gap: 10px;
    z-index: 10;
}

.v360-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: v360spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes v360spin { to { transform: rotate(360deg); } }

.v360-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 5;
}

.v360-hint.hidden { opacity: 0; }

.v360-controls {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.v360-btn {
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}

.v360-btn:hover { background: rgba(0,0,0,0.8); }

.v360-caption {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 5px;
    max-width: 60%;
    z-index: 5;
}

/* ─── Carrossel: setas de navegação ─────────────────────────── */
.v360-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 6;
    transition: background 0.2s;
}

.v360-nav:hover { background: rgba(0,0,0,0.8); }
.v360-prev { left: 12px; }
.v360-next { right: 12px; }

/* ─── Contador (1/N) ────────────────────────────────────────── */
.v360-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 12px;
    z-index: 6;
}

/* ─── Tira de miniaturas ────────────────────────────────────── */
.v360-thumbs {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    max-width: 90%;
    padding: 6px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    overflow-x: auto;
    z-index: 6;
}

.v360-thumb-btn {
    flex: 0 0 auto;
    width: 56px;
    height: 32px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    overflow: hidden;
    transition: opacity 0.2s, border-color 0.2s;
}

.v360-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v360-thumb-btn:hover { opacity: 1; }

.v360-thumb-btn.is-active {
    opacity: 1;
    border-color: #fff;
}

/* Quando há carrossel, sobe a legenda para não cobrir as miniaturas */
.v360-has-carousel .v360-caption { bottom: 56px; }
