/* ══════════════════════════════════════
   Quick View Pro — CSS
══════════════════════════════════════ */

/* Modal wrapper */
.appify-qv-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.appify-qv-modal.is-open {
  pointer-events: all;
  opacity: 1;
}

/* Backdrop */
.appify-qv-backdrop {
  position: absolute;
  inset: 0;
  background: var(--appify-qv-overlay, rgba(0,0,0,.6));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

/* Inner sheet */
.appify-qv-inner {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: #fff;
  border-radius: var(--appify-qv-radius, 22px) var(--appify-qv-radius, 22px) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,1,.6,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
.appify-qv-modal.is-open .appify-qv-inner {
  transform: translateY(0);
}

/* Close button */
.appify-qv-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(0,0,0,.08);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111;
  transition: background .2s;
}
.appify-qv-close:hover { background: rgba(0,0,0,.15); }

/* Loading state */
.appify-qv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
  color: #888;
}
.appify-qv-spinner {
  width: 36px; height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--appify-brand, #f60404);
  border-radius: 50%;
  animation: appify-spin .7s linear infinite;
}
@keyframes appify-spin { to { transform: rotate(360deg); } }

/* Content layout */
.appify-qv-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90vh;
}

/* Gallery */
.appify-qv-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}
.appify-qv-gallery-track {
  display: flex;
  height: 100%;
  transition: transform .3s ease;
  will-change: transform;
}
.appify-qv-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.appify-qv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

/* Dots */
.appify-qv-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.appify-qv-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .2s;
}
.appify-qv-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* Info */
.appify-qv-info {
  padding: 16px 18px 24px;
}
.appify-qv-title {
  font-size: 17px;
  font-weight: 900;
  color: #111;
  margin: 0 0 6px;
  line-height: 1.3;
}
.appify-qv-price {
  font-size: 22px;
  font-weight: 900;
  color: var(--appify-brand, #f60404);
  margin-bottom: 10px;
}
.appify-qv-price del { font-size: 14px; color: #aaa; font-weight: 400; margin-left: 6px; }
.appify-qv-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
  max-height: 80px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
}

/* Variations */
.appify-qv-variations { margin-bottom: 14px; }
.appify-qv-attr { margin-bottom: 10px; }
.appify-qv-attr-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #333;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.appify-qv-attr-options { display: flex; gap: 6px; flex-wrap: wrap; }
.appify-qv-attr-btn {
  padding: 6px 14px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #333;
  transition: all .18s;
  font-family: var(--appify-font, 'Cairo', sans-serif);
}
.appify-qv-attr-btn:hover { border-color: #999; }
.appify-qv-attr-btn.selected {
  border-color: #111;
  background: #111;
  color: #fff700;
}

/* Actions */
.appify-qv-actions { display: flex; gap: 10px; margin-top: 4px; }
.appify-qv-add-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--appify-brand, #f60404);
  color: #fff;
  border: none;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--appify-font, 'Cairo', sans-serif);
  transition: transform .15s, opacity .15s;
}
.appify-qv-add-btn:active { transform: scale(.97); opacity: .9; }
.appify-qv-add-btn.added {
  background: #16a34a;
}
.appify-qv-detail-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid #eee;
  color: #333;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s;
}
.appify-qv-detail-btn:hover { border-color: #111; color: #111; }

/* Desktop */
@media(min-width: 992px) {
  .appify-qv-inner {
    border-radius: var(--appify-qv-radius, 22px);
    bottom: auto;
    max-height: 80vh;
    width: 90%;
    max-width: 540px;
  }
  .appify-qv-modal {
    align-items: center;
  }
  .appify-qv-modal.is-open .appify-qv-inner {
    transform: translateY(0) scale(1);
  }
  .appify-qv-content {
    flex-direction: row;
    max-height: 80vh;
  }
  .appify-qv-gallery {
    width: 50%;
    aspect-ratio: auto;
    flex-shrink: 0;
  }
  .appify-qv-info {
    flex: 1;
    overflow-y: auto;
  }
}

/* Dark mode */
.appify-dark .appify-qv-inner { background: var(--appify-dark-surface, #1e1e1e); }
.appify-dark .appify-qv-title { color: var(--appify-dark-text, #f0f0f0); }
.appify-dark .appify-qv-desc  { color: #aaa; }
.appify-dark .appify-qv-attr-btn { background: #2a2a2a; border-color: #444; color: #ddd; }
.appify-dark .appify-qv-detail-btn { border-color: #444; color: #ccc; }
.appify-dark .appify-qv-close { background: rgba(255,255,255,.1); color: #fff; }
