/* Variant Selection Popup Styles */
.variant-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.variant-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.variant-popup-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.variant-popup-overlay.show .variant-popup-container {
  transform: scale(1) translateY(0);
}

.variant-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.product-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.product-details {
  flex: 1;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-price .new-price {
  font-size: 16px;
  font-weight: 700;
  color: #059669;
}

.product-price .old-price {
  font-size: 14px;
  color: #6b7280;
  text-decoration: line-through;
}

.product-price .discount {
  background: #fef3c7;
  color: #d97706;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.popup-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.variant-popup-content {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.selection-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 20px 0;
}

.attribute-group {
  margin-bottom: 24px;
}

.attribute-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
}

.color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: #d1d5db;
}

.color-option.active {
  border-color: #3b82f6;
  transform: scale(1.1);
}

.color-option.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  text-align: center;
}

.size-option:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.size-option.active {
  border-color: #3b82f6;
  background: #3b82f6;
  color: white;
}

.quantity-section {
  margin: 24px 0;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.quantity-section label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
}

.qty-btn {
  background: white;
  border: 1px solid #d1d5db;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.qty-btn.minus {
  border-radius: 6px 0 0 6px;
}

.qty-btn.plus {
  border-radius: 0 6px 6px 0;
}

#popupQuantity {
  width: 60px;
  height: 40px;
  border: 1px solid #d1d5db;
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  background: white;
}

#popupQuantity:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.stock-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

.variant-popup-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.variant-popup-footer .btn {
  flex: 1;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
}

.btn-secondary {
  background: white;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.btn-primary:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.no-variants {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 20px;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .variant-popup-container {
    width: 95%;
    margin: 20px;
  }
  
  .product-info {
    gap: 12px;
  }
  
  .product-image {
    width: 50px;
    height: 50px;
  }
  
  .product-name {
    font-size: 16px;
  }
  
  .variant-popup-content {
    padding: 20px;
  }
  
  .color-options, .size-options {
    gap: 6px;
  }
  
  .color-option {
    width: 35px;
    height: 35px;
  }
  
  .size-option {
    padding: 6px 12px;
    font-size: 13px;
  }
}