/**
 * Stir It Up — Quick View modal
 */

/* Quick View trigger on card — styling owned by shop-archive.css; kept minimal here */

/* ─── Modal ──────────────────────────────────────────────────────── */
.qv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.qv-modal[hidden] { display: none; }

.qv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 12, 0.6);
  backdrop-filter: blur(6px);
  animation: qvBackdropIn 0.25s ease both;
}

@keyframes qvBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.qv-dialog {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  animation: qvDialogIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes qvDialogIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.qv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  color: var(--dark);
  font-size: 1.4rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.qv-close:hover { background: var(--gold); }

.qv-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

@media (min-width: 760px) {
  .qv-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    overflow: visible;
  }
}

.qv-media {
  position: relative;
  background: var(--cream);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (min-width: 760px) {
  .qv-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 440px;
  }
}

.qv-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv-body {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qv-badges:empty { display: none; }

.qv-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--dark);
  margin: 0;
  letter-spacing: -0.01em;
}

.qv-desc {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: #6a6a6a;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qv-desc:empty { display: none; }

.qv-price {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--gold);
  font-weight: 500;
  margin-top: 4px;
}

.qv-form {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.qv-qty-label > span {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 6px;
}

.qv-qty {
  display: inline-flex;
  align-items: stretch;
  background: var(--cream);
  border-radius: 999px;
  padding: 4px;
}

.qv-qty-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--dark);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.qv-qty-btn:hover { background: rgba(196, 162, 101, 0.2); }

.qv-qty-input {
  width: 44px;
  background: transparent;
  border: none;
  text-align: center;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--dark);
  -moz-appearance: textfield;
}

.qv-qty-input::-webkit-outer-spin-button,
.qv-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qv-add {
  flex: 1;
  align-self: flex-end;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--dark);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.qv-add:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(196, 162, 101, 0.35);
}

.qv-add.is-loading { opacity: 0.6; pointer-events: none; }
.qv-add.is-added {
  background: #2a7d4f;
  color: #fff;
}

.qv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 6px;
}

.qv-view-full,
.qv-view-bundle {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}

.qv-view-bundle {
  color: var(--ember, #e8713a);
  font-weight: 600;
}

.qv-view-full:hover { color: var(--gold-hover); text-decoration: underline; }
.qv-view-bundle:hover { color: var(--ember, #e8713a); text-decoration: underline; filter: brightness(0.9); }

body.qv-open { overflow: hidden; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .qv-backdrop, .qv-dialog { animation: none !important; }
}
