/* KYMERA 360° Viewer styles */

/* ── Overlay ── */
.v360-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: v360-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.v360-overlay--out { animation: v360-out 0.22s ease forwards; }
@keyframes v360-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes v360-out {
  to { opacity: 0; transform: scale(1.015); }
}

/* ── Backdrop + vignette ── */
.v360-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at center, #18160d 0%, #070604 100%);
  cursor: grab;
}
.v360-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}
.v360-overlay:active .v360-backdrop { cursor: grabbing; }

/* ── Close button ── */
.v360-close {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(232, 222, 200, 0.06);
  color: rgba(236, 227, 205, 0.7);
  border: 1px solid rgba(232, 222, 200, 0.13);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.v360-close:hover {
  background: rgba(200, 169, 106, 0.10);
  border-color: rgba(200, 169, 106, 0.45);
  color: #c8a96a;
  transform: rotate(90deg);
}

/* ── Stage ── */
.v360-stage {
  position: relative;
  width: min(100vw, 100vh);
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
}

/* ── Frames ── */
.v360-frames {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: transform 0.05s linear;
  will-change: transform;
}

/* ── Images ── */
.v360-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: 90vmin;
  max-height: 92vh;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: opacity;
  filter: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.7));
}

/* ── Hint ── */
.v360-hint {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 11, 8, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(200, 191, 168, 0.8);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(200, 169, 106, 0.18);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
  white-space: nowrap;
}
.v360-hint--fade { opacity: 0; }
.v360-hint-icon {
  color: #c8a96a;
  font-size: 14px;
  line-height: 1;
}
.v360-sep {
  opacity: 0.25;
  margin: 0 2px;
}

/* ── Meta ── */
.v360-meta {
  position: absolute;
  top: 32px;
  left: 32px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}
.v360-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 500;
  color: #ece3cd;
  letter-spacing: 0.01em;
  line-height: 1;
}
.v360-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c8a96a;
  opacity: 0.8;
}

/* ── Progress ── */
.v360-progress {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 42vw);
  height: 1px;
  background: rgba(232, 222, 200, 0.07);
  border-radius: 1px;
  overflow: visible;
  z-index: 3;
  pointer-events: none;
}
.v360-progress-bar {
  height: 100%;
  background: #c8a96a;
  border-radius: 1px;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px 1px rgba(200, 169, 106, 0.55);
}

/* ── Detail panel inside viewer ── */
.v360-detail-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 48px 96px;
  transform-origin: center;
  will-change: transform;
  cursor: grab;
}
.v360-overlay:active .v360-detail-panel { cursor: grabbing; }
.v360-detail-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Tabs ── */
.v360-tabs {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: rgba(8, 7, 5, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 222, 200, 0.10);
  border-radius: 999px;
  padding: 5px 6px;
  z-index: 20;
}
.v360-tab {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 222, 200, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.v360-tab:hover { color: rgba(232, 222, 200, 0.80); }
.v360-tab--active {
  color: #c8a96a;
  background: rgba(200, 169, 106, 0.12);
  border: 1px solid rgba(200, 169, 106, 0.25);
}

/* ── Gallery badge ── */
.gallery-item .v360-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(8, 7, 5, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #c8a96a;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(200, 169, 106, 0.30);
  pointer-events: none;
  text-transform: uppercase;
  animation: v360-badge-glow 3.5s ease-in-out infinite;
  transition: border-color 0.3s, box-shadow 0.3s;
}
@keyframes v360-badge-glow {
  0%, 100% { border-color: rgba(200, 169, 106, 0.30); box-shadow: none; }
  50%       { border-color: rgba(200, 169, 106, 0.60); box-shadow: 0 0 10px rgba(200, 169, 106, 0.22); }
}
.gallery-item:has([data-v360]):hover .v360-badge {
  animation: none;
  border-color: rgba(200, 169, 106, 0.70);
  box-shadow: 0 0 12px rgba(200, 169, 106, 0.30);
}

@media (max-width: 600px) {
  .v360-close { top: 16px; right: 16px; width: 38px; height: 38px; font-size: 18px; }
  .v360-meta { top: 16px; left: 16px; }
  .v360-title { font-size: 22px; }
  .v360-tag { font-size: 9px; }
  .v360-hint { font-size: 9px; padding: 8px 14px; bottom: 48px; }
  .v360-progress { bottom: 20px; width: 60vw; }
}

/* ── Zoom indicator (desktop only) ── */
.v360-zoom-hint {
  position: absolute;
  top: 84px;
  right: 28px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(12, 11, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200, 169, 106, 0.22);
  border-radius: 999px;
  padding: 9px 16px;
  color: rgba(200, 191, 168, 0.80);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.v360-zoom-hint svg { opacity: 0.85; color: #c8a96a; }
@media (pointer: fine) {
  .v360-zoom-hint { display: flex; }
}

/* ── 360 gallery item frame ── */
.gallery-item--360 > button {
  box-shadow:
    0 0 0 1px rgba(200, 169, 106, 0.55),
    0 0 18px rgba(200, 169, 106, 0.10);
  transition: box-shadow 0.35s ease;
}
.gallery-item--360:hover > button {
  box-shadow:
    0 0 0 1px rgba(200, 169, 106, 0.90),
    0 0 28px rgba(200, 169, 106, 0.20);
}
