/* ===================================
   QUICK VIEW MODAL STYLES
   =================================== */

/* ===================================
   1. MODAL CONTAINER
   =================================== */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.quick-view-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Backdrop */
.quick-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* ===================================
   2. MODAL CONTENT
   =================================== */
.quick-view-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quick-view-modal.active .quick-view-content {
  transform: scale(1) translateY(0);
}

/* Close button */
.quick-view-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  color: #374151;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-view-close:hover {
  background: #ffffff;
  transform: rotate(90deg);
  color: #ef4444;
}

/* ===================================
   3. MODAL BODY
   =================================== */
.quick-view-body {
  padding: 40px;
  overflow-y: auto;
  max-height: 90vh;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.quick-view-body::-webkit-scrollbar {
  width: 6px;
}

.quick-view-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.quick-view-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Loading state */
.quick-view-loading {
  text-align: center;
  padding: 80px 20px;
  color: #6b7280;
}

.quick-view-loading i {
  font-size: 2.5rem;
  color: #1a8917;
  margin-bottom: 20px;
  display: block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.quick-view-loading p {
  font-size: 1.125rem;
  margin: 0;
}

/* ===================================
   4. PRODUCT GRID
   =================================== */
.quick-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* ===================================
   5. IMAGE SECTION
   =================================== */
.quick-view-images {
  position: relative;
}

.quick-view-main-image {
  position: relative;
  background: #f9fafb;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  aspect-ratio: 1;
}

.quick-view-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.quick-view-main-image:hover img {
  transform: scale(1.05);
}

/* Image badges */
.quick-view-badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.qv-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.qv-badge.discount {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.qv-badge.new {
  background: rgba(26, 137, 23, 0.9);
  color: white;
}

/* Thumbnails */
.quick-view-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.quick-view-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.quick-view-thumbnails::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 2px;
}

.quick-view-thumbnails::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.qv-thumbnail {
  flex: 0 0 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.qv-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qv-thumbnail:hover {
  border-color: #e5e7eb;
  transform: translateY(-2px);
}

.qv-thumbnail.active {
  border-color: #1a8917;
}

/* ===================================
   6. INFO SECTION
   =================================== */
.quick-view-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Title and meta */
.qv-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.qv-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.qv-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qv-stars {
  color: #fbbf24;
  font-size: 1.125rem;
}

.qv-rating-value {
  font-weight: 600;
  color: #374151;
}

.qv-reviews {
  color: #6b7280;
  font-size: 0.875rem;
}

.qv-sold {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Price section */
.qv-price-section {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.qv-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1a8917;
  letter-spacing: -0.02em;
}

.qv-original-price {
  font-size: 1.5rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.qv-discount {
  background: #fee2e2;
  color: #dc2626;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Description */
.qv-description {
  color: #4b5563;
  line-height: 1.6;
  font-size: 1rem;
}

/* Features */
.qv-features {
  background: #f9fafb;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.qv-features h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qv-features ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qv-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 0.875rem;
}

.qv-features li i {
  color: #10b981;
  font-size: 0.75rem;
}

/* Options */
.qv-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qv-option-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qv-option-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  min-width: 80px;
}

/* Color options */
.qv-colors {
  display: flex;
  gap: 8px;
}

.qv-color {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qv-color:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qv-color.active {
  border-color: #1a8917;
  border-width: 3px;
}

.qv-color-check {
  display: none;
  color: white;
  font-size: 0.75rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.qv-color.active .qv-color-check {
  display: block;
}

/* White color special case */
.qv-color[data-color="White"] .qv-color-check {
  color: #374151;
}

/* Quantity */
.qv-quantity {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.qv-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qv-qty-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: #1a8917;
}

.qv-qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qv-qty-input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
}

.qv-qty-input::-webkit-inner-spin-button,
.qv-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Actions */
.qv-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.qv-actions button {
  flex: 1;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qv-btn-cart {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.qv-btn-cart:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.qv-btn-buy {
  background: linear-gradient(135deg, #1a8917 0%, #16a085 100%);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(26, 137, 23, 0.25);
}

.qv-btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(26, 137, 23, 0.3);
}

.qv-btn-details {
  background: transparent;
  color: #1a8917;
  border: 2px solid #1a8917;
}

.qv-btn-details:hover {
  background: rgba(26, 137, 23, 0.05);
  transform: translateY(-2px);
}

/* Supplier info */
.qv-supplier {
  background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qv-supplier-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qv-supplier-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.qv-supplier-details {
  display: flex;
  flex-direction: column;
}

.qv-supplier-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
}

.qv-supplier-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #6b7280;
}

.qv-verified {
  color: #2563eb;
}

/* ===================================
   7. RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
  .quick-view-content {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .quick-view-body {
    padding: 20px;
  }
  
  .quick-view-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .quick-view-main-image {
    max-height: 300px;
  }
  
  .qv-title {
    font-size: 1.5rem;
  }
  
  .qv-price {
    font-size: 1.875rem;
  }
  
  .qv-actions {
    flex-direction: column;
  }
  
  .qv-features ul {
    grid-template-columns: 1fr;
  }
  
  .quick-view-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .quick-view-body {
    padding: 16px;
  }
  
  .qv-title {
    font-size: 1.25rem;
  }
  
  .qv-price {
    font-size: 1.5rem;
  }
  
  .qv-original-price {
    font-size: 1.125rem;
  }
  
  .qv-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .qv-option-group {
    flex-direction: column;
    align-items: flex-start;
  }
}