/**
 * Quick View Modal Styles
 * Rose Gold Product Preview
 *
 * @package Kosmetix
 */

/* ============================================
   OVERLAY
   ============================================ */
.quick-view-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

body.quick-view-open .quick-view-overlay {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wp--preset--spacing--lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.quick-view-open .quick-view-modal {
  opacity: 1;
  visibility: visible;
}

.quick-view-container {
  position: relative;
  background: white;
  border-radius: var(--wp--custom--radius--lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.quick-view-open .quick-view-container {
  transform: scale(1) translateY(0);
}

/* ============================================
   CLOSE BUTTON
   ============================================ */
.quick-view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-view-close:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-view-close .material-symbols-outlined {
  font-size: 24px;
  color: var(--wp--preset--color--charcoal);
}

/* ============================================
   CONTENT
   ============================================ */
.quick-view-content {
  padding: var(--wp--preset--spacing--xl);
  max-height: 85vh;
  overflow-y: auto;
}

/* Loading State */
.quick-view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: var(--wp--preset--spacing--md);
}

.quick-view-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--wp--preset--color--blush);
  border-top-color: var(--wp--preset--color--rose-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.quick-view-loading p {
  color: var(--wp--preset--color--slate);
  font-size: 0.9rem;
}

/* ============================================
   PRODUCT LAYOUT
   ============================================ */
.quick-view-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wp--preset--spacing--xl);
}

/* ============================================
   GALLERY
   ============================================ */
.quick-view-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--md);
}

.quick-view-image-main {
  aspect-ratio: 1;
  border-radius: var(--wp--custom--radius--md);
  overflow: hidden;
  background: var(--wp--preset--color--blush-light);
}

.quick-view-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-view-thumbnails {
  display: flex;
  gap: var(--wp--preset--spacing--sm);
  overflow-x: auto;
}

.quick-view-thumbnail {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--wp--custom--radius--sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.quick-view-thumbnail.active,
.quick-view-thumbnail:hover {
  border-color: var(--wp--preset--color--rose-gold);
}

.quick-view-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   DETAILS
   ============================================ */
.quick-view-details {
  display: flex;
  flex-direction: column;
}

.quick-view-brand {
  color: var(--wp--preset--color--rose-gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.quick-view-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--wp--preset--color--charcoal);
  margin: 0 0 var(--wp--preset--spacing--md);
  line-height: 1.3;
}

.quick-view-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--wp--preset--spacing--md);
}

.quick-view-price .woocommerce-Price-amount {
  color: var(--wp--preset--color--rose-gold-dark);
}

.quick-view-price del {
  color: var(--wp--preset--color--slate);
  font-weight: 400;
  font-size: 1rem;
}

.quick-view-price ins {
  text-decoration: none;
  color: var(--wp--preset--color--rose-gold-dark);
}

.quick-view-short-desc {
  color: var(--wp--preset--color--slate);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--wp--preset--spacing--lg);
}

.quick-view-meta {
  display: flex;
  gap: var(--wp--preset--spacing--lg);
  margin-bottom: var(--wp--preset--spacing--lg);
  font-size: 0.9rem;
}

.quick-view-stock {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-view-stock.in-stock {
  color: var(--wp--preset--color--success);
}

.quick-view-stock.out-of-stock {
  color: var(--wp--preset--color--error);
}

.quick-view-sku {
  color: var(--wp--preset--color--slate);
}

/* Add to Cart */
.quick-view-add-to-cart {
  margin-bottom: var(--wp--preset--spacing--lg);
}

.quick-view-add-to-cart .cart {
  display: flex;
  gap: var(--wp--preset--spacing--sm);
  align-items: stretch;
}

.quick-view-add-to-cart .quantity {
  width: 80px;
}

.quick-view-add-to-cart .quantity input {
  width: 100%;
  height: 100%;
  text-align: center;
  border: 1px solid var(--wp--preset--color--rose-gold-light);
  border-radius: var(--wp--custom--radius--sm);
  font-size: 1rem;
}

.quick-view-add-to-cart .single_add_to_cart_button {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(
    135deg,
    var(--wp--preset--color--rose-gold) 0%,
    var(--wp--preset--color--rose-gold-dark) 100%
  );
  color: white;
  border: none;
  border-radius: var(--wp--custom--radius--sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--wp--custom--shadow--glow);
}

.quick-view-add-to-cart .single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: var(--wp--custom--shadow--glow-lg);
}

/* Full Details Link */
.quick-view-full-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--wp--preset--color--rose-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.quick-view-full-details:hover {
  color: var(--wp--preset--color--rose-gold-dark);
}

.quick-view-full-details .material-symbols-outlined {
  font-size: 20px;
}

/* ============================================
   QUICK VIEW BUTTON ON CARDS
   ============================================ */
.quick-view-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 15;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateY(0);
}

.quick-view-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--wp--custom--shadow--glow);
}

.quick-view-btn .material-symbols-outlined {
  font-size: 20px;
  color: var(--wp--preset--color--slate);
  transition: color 0.2s ease;
}

.quick-view-btn:hover .material-symbols-outlined {
  color: var(--wp--preset--color--rose-gold);
}

/* ============================================
   BODY SCROLL LOCK
   ============================================ */
body.quick-view-open {
  overflow: hidden;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .quick-view-product {
    grid-template-columns: 1fr;
  }

  .quick-view-container {
    max-height: 95vh;
  }

  .quick-view-content {
    padding: var(--wp--preset--spacing--md);
  }

  .quick-view-title {
    font-size: 1.25rem;
  }

  .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
  }
}
