/* Giro 360° por modelo (exterior + interior) — ver includes/giro360-modelo.php */
.g360, .g360 * { box-sizing: border-box; }
.g360 { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #0f172a; }

.g360-tabs {
    display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px;
    background: #eaeff7; border-radius: 999px;
}
.g360-tabs button {
    border: 0; background: transparent; cursor: pointer;
    padding: 9px 20px; border-radius: 999px;
    font: 700 13px/1 inherit; color: #5b6b88; white-space: nowrap;
    transition: background .15s, color .15s;
}
.g360-tabs button:hover { color: #001e50; }
.g360-tabs button.is-on { background: #001e50; color: #fff; }
.g360-tabs button:focus-visible, .g360-full:focus-visible, .g360-stage:focus-visible { outline: 3px solid #00b0f0; outline-offset: 2px; }

.g360-stage {
    position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 620px;
    border-radius: 16px; overflow: hidden; outline: none;
    background: linear-gradient(#ececed, #dcdde0);
    user-select: none; -webkit-user-select: none;
}
.g360-stage canvas {
    position: absolute; inset: 0; width: 100%; height: 100%; display: block;
    cursor: grab; touch-action: pan-y;
}
.g360-stage canvas.g360-int { touch-action: none; }
.g360-stage canvas.is-drag { cursor: grabbing; }
.g360-stage canvas[hidden] { display: none; }
.g360-stage.is-int { background: #101216; }

.g360-hint {
    position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    display: flex; align-items: center; gap: 8px; padding: 9px 16px;
    background: rgba(0, 30, 80, .86); color: #fff; border-radius: 999px;
    font: 600 12px/1 inherit; pointer-events: none; white-space: nowrap;
    transition: opacity .4s;
}
.g360-hint svg { animation: g360sway 1.8s ease-in-out infinite; }
.g360-hint.is-off { opacity: 0; }
@keyframes g360sway { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

.g360-full {
    position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px;
    display: grid; place-items: center; cursor: pointer;
    border: 1px solid rgba(0, 30, 80, .15); border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: #001e50;
    box-shadow: 0 4px 14px rgba(0, 30, 80, .12);
}
.g360-full:hover { background: #fff; border-color: #001e50; }

.g360-loading, .g360-msg {
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
    background: rgba(255, 255, 255, .78); color: #334155; font: 600 14px/1.4 inherit;
}
.g360-stage.is-int .g360-loading { background: rgba(16, 18, 22, .7); }
.g360-loading[hidden], .g360-msg[hidden] { display: none; }
.g360-spin {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid #cfd8e6; border-top-color: #001e50; animation: g360spin .9s linear infinite;
}
@keyframes g360spin { to { transform: rotate(360deg); } }

.g360-note { margin: 10px 2px 0; font-size: 12px; color: #64748b; }

.g360-stage:fullscreen { aspect-ratio: auto; max-height: none; border-radius: 0; }
.g360-stage:-webkit-full-screen { aspect-ratio: auto; max-height: none; border-radius: 0; }

@media (max-width: 640px) {
    .g360-tabs { display: flex; }
    .g360-tabs button { flex: 1; padding: 10px 8px; }
    .g360-stage { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .g360-hint svg, .g360-spin { animation: none; }
}
