/* =============================================
   QuickView Modal — Mobile-First, Centered
   ============================================= */

/* ---- Modal dialog ---- */
.qv-dialog {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  min-height: 100dvh;
}
.qv-content {
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 100dvh;
}

/* ---- Header ---- */
.qv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}
.qv-header_label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
}
.qv-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: background 0.2s ease, transform 0.15s ease;
}
.qv-close:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: rotate(90deg);
}

/* ---- Body ---- */
.qv-body {
  padding: 0 !important;
}

/* ---- Grid: stacked on mobile ---- */
.qv-grid {
  display: flex;
  flex-direction: column;
}

/* ---- Media / Image ---- */
.qv-media {
  width: 100%;
  flex-shrink: 0;
}
.qv-image-container {
  position: relative;
  background: #f5f5f7;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.qv-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 16px;
}
.qv-image-container:hover .qv-image {
  transform: scale(1.06);
}

/* ---- Badges ---- */
.qv-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qv-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.4;
}
.qv-badge--sale {
  background: #e53935;
  color: #fff;
}
.qv-badge--new {
  background: #1a1a1a;
  color: #fff;
}
.qv-badge--best {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

/* ---- Info ---- */
.qv-info {
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Meta top: category + sku */
.qv-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.qv-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary, #2563eb);
}
.qv-sku {
  font-size: 10px;
  color: #aaa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Name */
.qv-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
  color: #1a1a1a;
}

/* Price block */
.qv-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.qv-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary, #2563eb);
  letter-spacing: -0.3px;
}
.qv-old-price {
  font-size: 15px;
  color: #bbb;
  text-decoration: line-through;
}
.qv-discount-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  background: #e53935;
  color: #fff;
}

/* Stock */
.qv-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  align-self: flex-start;
}
.qv-stock_dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  animation: qv-pulse 2s infinite;
}
@keyframes qv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.qv-stock--out {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}
.qv-stock--out .qv-stock_dot { animation: none; }
.qv-stock--low {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
}

/* Description */
.qv-desc-wrap {
  margin-bottom: 16px;
}
.qv-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: #555;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Delivery */
.qv-delivery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  background: #f8f9fa;
  margin-bottom: 18px;
}
.qv-delivery_item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #555;
}
.qv-delivery_item .icon {
  font-size: 16px;
  color: var(--primary, #2563eb);
  flex-shrink: 0;
}
.qv-delivery_item strong {
  color: #1a1a1a;
}

/* Actions */
.qv-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.qv-btn-primary {
  width: 100%;
  justify-content: center;
}
.qv-btn-secondary {
  width: 100%;
  justify-content: center;
}

/* Contact */
.qv-contact {
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.qv-contact_label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}
.qv-contact_links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qv-contact_btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  color: #333;
  background: #f0f0f0;
}
.qv-contact_btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.qv-contact_btn .icon {
  font-size: 15px;
}
.qv-contact_btn--wa:hover { background: #dcfce7; color: #16a34a; }
.qv-contact_btn--tel:hover { background: #dbeafe; color: #2563eb; }
.qv-contact_btn--mail:hover { background: #fef3c7; color: #d97706; }


/* ==============================================
   RESPONSIVE
   ============================================== */

/* ≥ 576px — no longer fullscreen */
@media (min-width: 576px) {
  .qv-dialog {
    max-width: 520px;
    margin: 1.75rem auto;
    min-height: auto;
  }
  .qv-content {
    border-radius: 16px;
    min-height: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
  }
  .qv-image-container {
    aspect-ratio: 4 / 3;
  }
  .qv-actions {
    flex-direction: row;
  }
  .qv-btn-primary,
  .qv-btn-secondary {
    flex: 1;
  }
}

/* ≥ 768px — 2-column grid */
@media (min-width: 768px) {
  .qv-dialog {
    max-width: 720px;
  }
  .qv-grid {
    flex-direction: row;
    min-height: 480px;
  }
  .qv-media {
    width: 45%;
    flex-shrink: 0;
  }
  .qv-image-container {
    aspect-ratio: auto;
    height: 100%;
    min-height: 480px;
  }
  .qv-info {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: 600px;
  }
  .qv-name {
    font-size: 22px;
  }
  .qv-desc {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

/* ≥ 992px — larger */
@media (min-width: 992px) {
  .qv-dialog {
    max-width: 860px;
  }
  .qv-media {
    width: 48%;
  }
  .qv-info {
    padding: 28px;
  }
  .qv-name {
    font-size: 24px;
  }
  .qv-price {
    font-size: 26px;
  }
  .qv-desc {
    -webkit-line-clamp: 5;
    line-clamp: 5;
    font-size: 14px;
  }
  .qv-delivery {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .qv-delivery_item {
    flex: 1 1 auto;
  }
}

/* ≥ 1200px */
@media (min-width: 1200px) {
  .qv-dialog {
    max-width: 940px;
  }
  .qv-info {
    padding: 32px;
    max-height: 650px;
  }
}
