/* ═══ XO LOVE — Gallery (prototype-exact) ═══ */

.xo-gallery-main {
  position: relative;
  border-radius: var(--xo-radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  max-height: 660px;
  background: var(--xo-bg-card);
}
.xo-gallery-main img.xo-gallery-media,
.xo-gallery-main video.xo-gallery-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Badge */
.xo-gallery-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
}

/* Verified badge (top right) */
.xo-gallery-verified {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(35, 223, 247, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(35, 223, 247, 0.3);
  color: var(--xo-accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--xo-radius-pill);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 4;
}
.xo-gallery-verified svg { width: 14px; height: 14px; }

/* Nav arrows */
.xo-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: all var(--xo-transition);
  color: #fff;
  padding: 0;
}
.xo-gallery-nav:hover {
  background: rgba(0, 0, 0, 0.75);
  border-color: var(--xo-accent);
  color: var(--xo-accent);
}
.xo-gallery-nav svg { width: 18px; height: 18px; }
.xo-gallery-prev { left: 12px; }
.xo-gallery-next { right: 12px; }

/* Counter */
.xo-gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 4;
  user-select: none;
}

/* Single/private placeholder — center and fill fully */
.xo-gallery-single .xo-gallery-main img.xo-gallery-media {
  object-position: center;
  transform: scale(1.05);
}

/* Thumbnails — show ~5 visible, rest scroll smoothly */
.xo-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  max-width: calc(6 * 72px + 5 * 8px);
  scrollbar-width: none; /* Firefox */
}
.xo-gallery-thumbs::-webkit-scrollbar { display: none; }
.xo-gallery-thumb {
  width: 72px;
  height: 96px;
  border-radius: var(--xo-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--xo-transition);
  opacity: 0.5;
  flex-shrink: 0;
  background: var(--xo-bg-elevated);
  padding: 0;
}
.xo-gallery-thumb.active {
  border-color: var(--xo-accent);
  opacity: 1;
}
.xo-gallery-thumb:hover { opacity: 0.8; }
.xo-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video thumb */
.xo-gallery-thumb-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--xo-accent);
}

@media (max-width: 1024px) {
  .xo-gallery-main { max-height: 550px; }
}
@media (max-width: 768px) {
  .xo-gallery-main { max-height: none; }
  .xo-gallery-thumb { width: 56px; height: 74px; }
  .xo-gallery-nav { width: 36px; height: 36px; }
  .xo-gallery-nav svg { width: 14px; height: 14px; }
}
