/* ============================================================
   TOPAZERY FEATURES — Filter, Quick-View, Wishlist, Lazy Load
   ============================================================ */

/* ============ FILTER BAR ============ */
.filter-bar {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.filter-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-family: "Merriweather", Georgia, serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-right: 0.75rem;
  margin-right: 0.75rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-group:last-of-type {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #555;
  background: #f5f4f2;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: #1a1a2e;
}

.filter-chip.active {
  background: linear-gradient(135deg, #d4af37 0%, #f4e4bc 100%);
  color: #1a1a2e;
  font-weight: 700;
  border-color: #d4af37;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.filter-count {
  font-size: 0.65rem;
  opacity: 0.6;
  font-weight: 400;
}

.filter-chip.active .filter-count {
  opacity: 0.8;
}

.filter-clear {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.2);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.filter-clear:hover {
  background: rgba(192, 57, 43, 0.15);
}

.filter-results {
  margin-top: 0.75rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.8rem;
  color: #888;
}

/* ============ QUICK-VIEW MODAL ============ */
.qv-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.qv-modal.open {
  opacity: 1;
  visibility: visible;
}

.qv-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qv-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 820px;
  width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 175, 55, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.qv-modal.open .qv-content {
  transform: translateY(0) scale(1);
}

.qv-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s ease;
  z-index: 2;
}

.qv-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #1a1a2e;
}

.qv-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 400px;
}

.qv-image {
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 16px 0 0 16px;
}

.qv-image img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 8px;
}

.qv-details {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.qv-details h2 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.35rem;
  color: #1a1a2e;
  line-height: 1.3;
  margin: 0;
}

.qv-era-badge {
  display: inline-block;
  font-family: "Open Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  width: fit-content;
}

.qv-price {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
}

.qv-price del {
  color: #999;
  font-weight: 400;
  font-size: 1rem;
}

.qv-price .sale-price {
  color: #c0392b;
}

.qv-scarcity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.8rem;
  color: #d4af37;
  font-weight: 600;
}

.qv-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.qv-view-full {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #f4e4bc;
  font-family: "Open Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.qv-view-full:hover {
  background: linear-gradient(135deg, #d4af37 0%, #f4e4bc 50%, #d4af37 100%);
  color: #1a1a2e;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.qv-wishlist-btn {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.qv-wishlist-btn svg {
  fill: none;
  stroke: #999;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.qv-wishlist-btn:hover {
  border-color: #e74c3c;
}

.qv-wishlist-btn:hover svg {
  stroke: #e74c3c;
}

.qv-wishlist-btn.wishlisted {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

.qv-wishlist-btn.wishlisted svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}

/* ============ WISHLIST HEARTS ON GRID ============ */
.wishlist-heart {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.25s ease;
  opacity: 0;
  transform: scale(0.8);
}

.listgrid__item:hover .wishlist-heart,
.wishlist-heart.wishlisted {
  opacity: 1;
  transform: scale(1);
}

.wishlist-heart svg {
  fill: none;
  stroke: #999;
  stroke-width: 2;
  width: 18px;
  height: 18px;
  transition: all 0.2s ease;
}

.wishlist-heart:hover svg {
  stroke: #e74c3c;
  transform: scale(1.15);
}

.wishlist-heart.wishlisted svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}

.wishlist-heart.wishlisted {
  background: rgba(255, 255, 255, 0.95);
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.wishlist-heart.wishlisted svg {
  animation: heartPulse 0.4s ease;
}

/* Wishlist button on product page */
.wishlist-btn-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  margin-top: 0.5rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wishlist-btn-product svg {
  fill: none;
  stroke: #999;
  stroke-width: 2;
  transition: all 0.2s ease;
}

.wishlist-btn-product:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.wishlist-btn-product:hover svg {
  stroke: #e74c3c;
}

.wishlist-btn-product.wishlisted {
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.04);
}

.wishlist-btn-product.wishlisted svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}

/* ============ LAZY LOADING IMAGES ============ */
.lazy-img {
  opacity: 0;
  transform: scale(0.98);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.lazy-img.img-loaded {
  opacity: 1;
  transform: scale(1);
}

/* ============ SKIP TO CONTENT ============ */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #1a1a2e;
  color: #f4e4bc;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 100000;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ============ FOCUS VISIBLE ============ */
*:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.filter-chip:focus-visible,
.wishlist-heart:focus-visible,
.qv-close:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* ============ RESPONSIVE ============ */
@media screen and (max-width: 768px) {
  .qv-body {
    grid-template-columns: 1fr;
  }

  .qv-image {
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
    max-height: 300px;
  }

  .qv-image img {
    max-height: 250px;
  }

  .qv-details {
    padding: 1.5rem;
  }

  .qv-content {
    width: 95vw;
    max-height: 90vh;
  }

  .filter-bar {
    padding: 1rem;
  }

  .filter-bar-inner {
    gap: 0.35rem;
  }

  .filter-group {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
    width: 100%;
  }

  .filter-label {
    width: 100%;
    margin-bottom: 0.25rem;
  }
}

@media screen and (max-width: 500px) {
  .qv-actions {
    flex-direction: column;
  }

  .qv-view-full {
    width: 100%;
  }

  .qv-wishlist-btn {
    align-self: flex-end;
  }

  .filter-chip {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }
}

/* ============ PERSONA PATHWAYS ============ */
.persona-pathways {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.persona-pathways .luxury-section-header {
  margin-bottom: 2.5rem;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.persona-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.5rem 2rem;
  background: #fff;
  border: 2px solid rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.persona-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow:
    0 16px 48px rgba(212, 175, 55, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

.persona-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.1) 0%,
    rgba(244, 228, 188, 0.2) 100%
  );
  border-radius: 50%;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.persona-card:hover .persona-icon {
  background: linear-gradient(135deg, #d4af37 0%, #f4e4bc 100%);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

.persona-icon svg {
  width: 26px;
  height: 26px;
  color: #d4af37;
  transition: color 0.3s ease;
}

.persona-card:hover .persona-icon svg {
  color: #1a1a2e;
}

.persona-card h3 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: #1a1a2e;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.persona-card p {
  font-family: "Open Sans", sans-serif;
  font-size: 0.88rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.persona-cta {
  font-family: "Open Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #d4af37;
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

.persona-card:hover .persona-cta {
  color: #aa8c2c;
}

/* Persona grid responsive */
@media (max-width: 1024px) {
  .persona-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .persona-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .persona-pathways {
    padding: 2rem 1rem;
  }

  .persona-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }
}

/* ============ PRODUCT PAGE PERSONA TIPS ============ */
.product-persona-tips {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.persona-tip {
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.persona-tip[open] {
  border-color: rgba(212, 175, 55, 0.4);
}

.persona-tip summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-family: "Open Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  background: rgba(212, 175, 55, 0.04);
  list-style: none;
  transition: background 0.2s ease;
}

.persona-tip summary::-webkit-details-marker {
  display: none;
}

.persona-tip summary:hover {
  background: rgba(212, 175, 55, 0.08);
}

.persona-tip-content {
  padding: 0.75rem 0.85rem;
  background: #fff;
}

.persona-tip-content p {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.persona-tip-content p:last-child {
  margin-bottom: 0;
}

.persona-tip-content a {
  color: #d4af37;
  font-weight: 600;
  text-decoration: none;
}

.persona-tip-content a:hover {
  color: #aa8c2c;
  text-decoration: underline;
}
