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

:root {
  --vf-bg:       #e9e9e9;
  --vf-size:     30vmin;
  --vf-min-size: 280px;
}

@media (max-width: 768px){

  :root {
    --vf-size:     17vmin;
    --vf-min-size: 200px;
  }
}

/* ── Coverflow container ────────────────────────────────────────── */

.vf-coverflow {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.vf-viewer {
  position: relative;
  z-index: 20;
  width: 100%;

}

.vf-drag-proxy {
  visibility: hidden;
  position: absolute;
}

.vf-boxes {
  height: 75dvh;
  width: 100%;
  overflow: hidden;
  position: absolute;
  transform-style: preserve-3d;
  perspective: 800px;
  touch-action: none;
}

 @media (max-width: 768px) {
    .vf-boxes {
      height:75dvh; /* should be 700px */
    }
 }



.vf-box {
  transform-style: preserve-3d;
  position: absolute;
  top: 50%;
  left: 50%;
  height: var(--vf-size);
  width: var(--vf-size);
  min-height: var(--vf-min-size);
  min-width: var(--vf-min-size);
  aspect-ratio: 1;
  overflow: hidden;
  display: none;
  cursor: pointer;
}

.vf-box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: 100%;
  background-image: var(--src);
  background-size: cover;
  transform: translate(-50%, -50%) rotate(180deg) translate(0, -100%);
  opacity: 0.75;
}

.vf-box::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: 100%;
  background: linear-gradient(var(--vf-bg) 50%, transparent);
  transform: translate(-50%, -50%) rotate(180deg) translate(0, -100%) scale(1.01);
  z-index: 2;
}

.vf-box img {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  object-fit: cover;
}


@supports (-webkit-box-reflect: below) {
  .vf-box{
    -webkit-box-reflect: below calc(var(--vf-size) * 0.025) linear-gradient(transparent 0 50%, #fff 100%);
  }
  .vf-box::after,
  .vf-box::before { display: none; }
}

/* ── Coverflow controls ─────────────────────────────────────────── */

.vf-controls {
  position: absolute;
  top: calc(50% + clamp(var(--vf-min-size), var(--vf-size), var(--vf-size)));
  left: 50%;
  transform: translate(-50%, -50%) scale(1.5);
  display: flex;
  justify-content: space-between;
  min-width: var(--vf-min-size);
  height: 44px;
  width: var(--vf-size);
  z-index: 300;
}

.vf-controls button {
  height: 48px;
  width: 48px;
  position: absolute;
  top: 0;
  outline: transparent;
  cursor: pointer;
  background: none;
  appearance: none;
  border: 0;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-out;
}

.vf-controls button svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
}

.vf-controls button:hover {
  color: #333;
}

.vf-btn-prev {
  right: 100%;
}

.vf-btn-prev:hover {
  transform: translateX(-4px);
}

.vf-btn-next {
  left: 100%;
}

.vf-btn-next:hover {
  transform: translateX(4px);
}

/* ── Back button ────────────────────────────────────────────────── */
/*
.btn {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #ffffff;
  border: 2px solid #999;
  border-radius: 50px;
  color: #666;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.btn:hover {
  background: #f9f9f9;
  border-color: #333;
  color: #333;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}*/


@keyframes vf-action {
  0%, 25%, 50%, 100% { transform: translate(0, 0); }
  12.5%, 37.5%        { transform: translate(0, 25%); }
}
