/* ═══════════════════════════════════════════════════════════
   VISTA 360° — Frontend CSS
═══════════════════════════════════════════════════════════ */

:root {
  --black:   #0a0a0a;
  --dark:    #111111;
  --panel:   #161616;
  --border:  #2a2a2a;
  --accent:  #e8c97a;
  --accent2: #c4a45a;
  --white:   #f0ede6;
  --muted:   #888888;
  --danger:  #e05252;
  --success: #52c77d;
  --radius:  8px;
  --header-h:56px;
  --strip-h: 112px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-text {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--accent);
  text-decoration: none;
}
.logo-text span { color: var(--white); }

.site-nav__list {
  display: flex;
  list-style: none;
  gap: 4px;
}

.site-nav__list a {
  display: block;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-radius: 5px;
  transition: all .18s;
}
.site-nav__list a:hover,
.site-nav__list .current-menu-item > a { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .2s;
}

/* ─── HOMEPAGE LAYOUT ─────────────────────────────────── */
.vista-homepage {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h));
}

/* ─── VIEWER WRAP ─────────────────────────────────────── */
.vista-viewer-wrap,
.vista-single-viewer {
  position: relative;
  overflow: hidden;
  background: #000;
}

.vista-homepage .vista-viewer-wrap {
  flex: 1;
  min-height: 0;
}

.vista-single-viewer {
  width: 100%;
  height: 70vh;
  min-height: 400px;
}

#mainViewer360,
#singleViewer360 {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#mainViewer360:active,
#singleViewer360:active { cursor: grabbing; }

/* vignette */
.vista-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

/* ─── LOADER ──────────────────────────────────────────── */
.vista-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,.85);
  z-index: 20;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity .3s;
}
.vista-loader.hidden { opacity: 0; pointer-events: none; }

.vista-loader-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: vista-spin .9s linear infinite;
}
@keyframes vista-spin { to { transform: rotate(360deg); } }

/* ─── AUTO ROTATE BADGE ───────────────────────────────── */
.vista-ar-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.vista-ar-badge.show { opacity: 1; }

.vista-ar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: vista-pulse 1.5s infinite;
}
@keyframes vista-pulse { 0%,100%{opacity:1} 50%{opacity:.2} }

/* ─── INFO OVERLAY ────────────────────────────────────── */
.vista-info-overlay {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.vista-current-title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
}
.vista-current-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .5px;
  margin-top: 2px;
}

/* ─── COMPASS ─────────────────────────────────────────── */
.vista-compass {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10,10,10,.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.vista-compass-needle {
  font-size: 20px;
  transition: transform .08s linear;
  line-height: 1;
}

/* ─── FOV SLIDER ──────────────────────────────────────── */
.vista-fov-wrap {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.vista-fov-wrap label {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.vista-fov-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  width: 4px;
  height: 110px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ─── CONTROLS ────────────────────────────────────────── */
.vista-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(10,10,10,.88);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 7px 16px;
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.vista-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all .18s;
  flex-shrink: 0;
}
.vista-ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.vista-ctrl-btn.on    { background: var(--accent); color: var(--black); border-color: var(--accent); }

.vista-ctrl-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

.vista-fov-label {
  font-size: 11px;
  color: var(--muted);
  min-width: 34px;
  text-align: center;
}

/* ─── EMPTY STATE ─────────────────────────────────────── */
.vista-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}
.vista-empty-icon { font-size: 56px; opacity: .2; }
.vista-empty-state h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--border);
}
.vista-empty-state p { font-size: 13px; color: var(--muted); }

/* ─── THUMBNAIL STRIP ─────────────────────────────────── */
.vista-strip {
  height: var(--strip-h);
  background: var(--dark);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.vista-strip::-webkit-scrollbar { height: 3px; }
.vista-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.vista-thumb {
  flex-shrink: 0;
  width: 144px;
  height: 82px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  transition: all .22s;
  outline-offset: 2px;
}
.vista-thumb:hover { border-color: var(--accent2); transform: translateY(-2px); }
.vista-thumb.active { border-color: var(--accent); }
.vista-thumb:focus { outline: 2px solid var(--accent); }

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

.vista-thumb-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
  padding: 18px 7px 5px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vista-thumb-badge {
  position: absolute;
  top: 5px; right: 5px;
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(232,201,122,.3);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}

.vista-thumb-views {
  position: absolute;
  top: 5px; left: 5px;
  background: rgba(0,0,0,.6);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 9px;
  color: var(--muted);
}

/* ─── GALERIE GRID ────────────────────────────────────── */
.galerie360-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 16px;
}

.galerie360-item {
  text-decoration: none;
  color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
  display: block;
}
.galerie360-item:hover { border-color: var(--accent2); transform: translateY(-3px); }

.galerie360-thumb {
  width: 100%;
  height: 180px;
  background: var(--dark) center/cover no-repeat;
  position: relative;
}

.galerie360-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(232,201,122,.4);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
}

.galerie360-views {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,.65);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--muted);
}

.galerie360-info {
  padding: 12px 14px;
}
.galerie360-info strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.galerie360-info span {
  font-size: 11px;
  color: var(--muted);
}

/* ─── ARCHIVE ─────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.vista-archive-header {
  padding: 36px 0 24px;
}
.vista-archive-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 42px;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 6px;
}
.vista-archive-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.vista-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.vista-filter-tag {
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all .18s;
}
.vista-filter-tag:hover { border-color: var(--accent2); color: var(--accent2); }
.vista-filter-tag.active { border-color: var(--accent); color: var(--accent); background: rgba(232,201,122,.07); }
.vista-filter-tag span { opacity: .5; margin-left: 3px; }

/* ─── SINGLE ──────────────────────────────────────────── */
.vista-single-info {
  padding: 28px 20px;
}
.vista-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.vista-single-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  line-height: 1.1;
}
.vista-single-content {
  max-width: 720px;
  line-height: 1.75;
  color: rgba(240,237,230,.8);
  margin-bottom: 24px;
}
.vista-single-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.vista-nav-btn {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: all .18s;
  letter-spacing: .5px;
}
.vista-nav-btn:hover { border-color: var(--accent); color: var(--accent); }

.vista-related { padding: 0 20px 48px; }
.vista-related-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 20px;
  margin-top: 16px;
}

/* ─── SHORTCODE EMBED ─────────────────────────────────── */
.vista360-embed {
  margin: 20px 0;
}

.v360-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.7);
}
.v360-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid #333;
  border-top-color: var(--accent);
  animation: vista-spin .9s linear infinite;
}

.v360-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,.85);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 12px;
  backdrop-filter: blur(10px);
}

.v360-ctrl {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
}
.v360-ctrl:hover { border-color: var(--accent); color: var(--accent); }
.v360-ctrl.on    { background: var(--accent); color: var(--black); border-color: var(--accent); }
.v360-sep        { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
.v360-fov-label  { font-size: 10px; color: var(--muted); min-width: 30px; text-align: center; }

.v360-compass {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 16px;
}
.v360-compass .v360-needle { transition: transform .08s linear; }

.v360-ar-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.v360-ar-badge.show { opacity: 1; }

/* ─── PAGINATION ──────────────────────────────────────── */
.pagination { padding: 32px 0; }
.page-numbers {
  display: inline-flex;
  list-style: none;
  gap: 6px;
  flex-wrap: wrap;
}
.page-numbers a,
.page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: all .18s;
}
.page-numbers a:hover { border-color: var(--accent2); color: var(--accent2); }
.page-numbers .current { background: var(--accent); color: var(--black); border-color: var(--accent); }

/* ─── FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--accent);
}
.footer-logo span { color: var(--white); }
.footer-nav__list {
  display: flex;
  list-style: none;
  gap: 4px;
}
.footer-nav__list a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color .18s;
}
.footer-nav__list a:hover { color: var(--accent); }
.footer-copy { font-size: 11px; color: var(--muted); }

/* ─── BUTTONS ─────────────────────────────────────────── */
.vista-btn-accent {
  display: inline-block;
  padding: 11px 24px;
  background: var(--accent);
  color: var(--black);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .18s;
}
.vista-btn-accent:hover { background: var(--accent2); color: var(--black); }

/* ─── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --strip-h: 90px; }

  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--dark); border-bottom: 1px solid var(--border); padding: 8px 0; }
  .site-nav.open { display: block; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { padding: 12px 24px; border-radius: 0; }
  .nav-toggle { display: flex; }

  .galerie360-grid { --cols: 2 !important; }
  .vista-controls { padding: 6px 10px; gap: 3px; }
  .vista-ctrl-btn { width: 28px; height: 28px; font-size: 13px; }
  .vista-thumb { width: 110px; height: 64px; }
  .vista-fov-wrap { display: none; }
  .vista-single-viewer { height: 50vh; }
  .vista-archive-title { font-size: 32px; }
  .vista-single-title  { font-size: 28px; }
  .site-footer__inner  { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .galerie360-grid { --cols: 1 !important; }
  .vista-controls  { bottom: 10px; }
}
