/* ==========================================================================
   PV Quick View — Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Trigger gomb a termékkártyán
   -------------------------------------------------------------------------- */

.pv-qv-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transform: scale(0.8);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.15s ease;
  pointer-events: none;
}

.pv-qv-trigger svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

/* Megjelenik hoverkor — a szülő .product kártyának kell position: relative */
.woocommerce ul.products li.product {
  position: relative;
}

.woocommerce ul.products li.product:hover .pv-qv-trigger,
.woocommerce ul.products li.product:focus-within .pv-qv-trigger {
  transform: scale(1);
  pointer-events: auto;
}

.pv-qv-trigger:hover {
  background: #619881;
  color: #ffffff;
}

.pv-qv-trigger:focus-visible {
  outline: 2px solid #619881;
  outline-offset: 2px;
}

/* Mobilon mindig látható */
@media (hover: none) {
  .pv-qv-trigger {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
}

/* --------------------------------------------------------------------------
   Overlay háttér
   -------------------------------------------------------------------------- */

#pv-qv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.22s ease;
}

#pv-qv-overlay[hidden] {
  display: none;
}

#pv-qv-overlay.pv-qv-active {
  display: flex;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Modal doboz
   -------------------------------------------------------------------------- */

#pv-qv-modal {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(12px);
  transition: transform 0.22s ease;
}

#pv-qv-overlay.pv-qv-active #pv-qv-modal {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Bezárás gomb
   -------------------------------------------------------------------------- */

#pv-qv-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#pv-qv-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

#pv-qv-close:hover {
  background: #f5f5f5;
  color: #111;
}

/* --------------------------------------------------------------------------
   Content wrapper
   -------------------------------------------------------------------------- */

#pv-qv-content {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */

.pv-qv-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #619881;
  border-radius: 50%;
  animation: pv-spin 0.7s linear infinite;
}

@keyframes pv-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Termék tartalom (AJAX után injektálva)
   -------------------------------------------------------------------------- */

.pv-qv-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
}

@media (max-width: 600px) {
  .pv-qv-product {
    grid-template-columns: 1fr;
  }
}

/* Bal: képek */
.pv-qv-images {
  background: #f7f5f2;
  border-radius: 14px 0 0 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .pv-qv-images {
    border-radius: 14px 14px 0 0;
    max-height: 280px;
  }
}

.pv-qv-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  padding: 1.5rem;
}

.pv-qv-thumbs {
  display: flex;
  gap: 6px;
  padding: 0 1rem 1rem;
  flex-wrap: wrap;
}

.pv-qv-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pv-qv-thumb.active,
.pv-qv-thumb:hover {
  border-color: #619881;
}

/* Jobb: info */
.pv-qv-info {
  padding: 2rem 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pv-qv-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111111;
  line-height: 1.3;
  margin: 0;
  padding-right: 2rem; /* bezárás gomb helye */
}

.pv-qv-sku {
  font-size: 0.8rem;
  color: #aaa;
  margin: -0.5rem 0 0;
}

.pv-qv-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #619881;
  line-height: 1;
}

.pv-qv-price .woocommerce-Price-amount {
  color: #619881;
}

.pv-qv-price del .woocommerce-Price-amount {
  color: #999;
}

.pv-qv-desc {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.65;
  flex: 1;
}

.pv-qv-desc p:last-child {
  margin-bottom: 0;
}

.pv-qv-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.pv-qv-btn-customize,
.pv-qv-btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--e-global-color-04f3445);
  color: #ffffff;
  border: none;
  border-radius: 500px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    transform 0.1s ease;
  text-align: center;
}

.pv-qv-btn-customize:hover,
.pv-qv-btn-cart:hover {
  background: var(--e-global-color-027223a);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.pv-qv-btn-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #619881;
  border: 1.5px solid #619881;
  border-radius: 500px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  text-align: center;
}

.pv-qv-btn-quote:hover {
  background: #619881;
  color: #ffffff;
  text-decoration: none;
}

.pv-qv-variable-note {
  font-size: 0.85rem;
  color: #888;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Elementor Loop Grid kompatibilitás
   -------------------------------------------------------------------------- */

.elementor-loop-container .e-loop-item {
  position: relative;
}

.elementor-loop-container .e-loop-item:hover .pv-qv-trigger,
.elementor-loop-container .e-loop-item:focus-within .pv-qv-trigger {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
