/* Modal Overlay */
.uxe-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.uxe-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

/* Modal Container */
.uxe-quick-add-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 100001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  width: 90vw;
  display: flex;

  justify-content: space-between;
}

.uxe-quick-add-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal Content */
.uxe-modal-content {
  position: relative;
  width: 100%;
}

.uxe-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.uxe-modal-close:hover {
  color: #333;
}

/* Modal Body */
.uxe-modal-body {
  display: flex;
  min-height: 500px;
}

/* Product Images */
.quick-uxe-product-images {
  flex: 1;
  background: #f8f9fa;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.uxe-image-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uxe-image-container {
  position: relative;
  width: 350px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-uxe-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
  transition: opacity 0.3s ease;
}

.quick-uxe-product-image.active {
  display: block;
}

.uxe-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  z-index: 5;
}

.uxe-gallery-prev {
  left: 20px;
}

.uxe-gallery-next {
  right: 20px;
}

.uxe-gallery-nav:hover {
  background: white;
  color: #333;
  transform: translateY(-50%) scale(1.1);
}

/* Product Details */
.uxe-product-details {
  flex: 1;
  padding: 30px;
  padding-top: 45px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: white;
  overflow-y: auto;
  justify-content: space-between;
}

.quick-uxe-product-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

/* Reviews */
.uxe-product-reviews {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

/* Pricing */
.uxe-product-pricing {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uxe-economy-tag {
  background: #ff4444;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
  text-transform: uppercase;
}

.quick-uxe-price-original {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  font-weight: 500;
}

.quick-uxe-price-current {
  font-size: 32px;
  font-weight: 700;
  color: #4caf50;
  line-height: 1;
}

.quick-uxe-pix-text {
  font-size: 13px;
  color: #1e8604;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

/* Variations */
.uxe-product-variations {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.uxe-variation-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uxe-variation-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
}

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

.uxe-variation-option {
  background: #f5f5f5;
  border: 1px solid #ddd;
  color: #666;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.uxe-variation-option:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.uxe-variation-option.selected {
  background: #4285f4;
  border-color: #4285f4;
  color: white;
}

/* Unavailable and Out of Stock States */
.uxe-variation-option.unavailable {
  background: #f0f0f0;
  border-color: #e0e0e0;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
  position: relative;
}

.uxe-variation-option.unavailable:hover {
  border-color: #e0e0e0;
  color: #999;
}

.uxe-variation-option.unavailable::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #999;
  transform: translateY(-50%);
}

.uxe-variation-option.quick-out-of-stock {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.uxe-variation-option.quick-out-of-stock:hover {
  border-color: #ffd93d;
  color: #856404;
}

/* Quantity */
.uxe-quantity-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.uxe-quantity-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
}

.quick-uxe-quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
}

.quick-uxe-qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #4285f4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.quick-uxe-qty-btn:hover {
  background: #f0f8ff;
}

.quick-uxe-qty-input {
  border: none;
  background: none;
  width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  outline: none;
}

/* Subtotal */
.uxe-subtotal-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.uxe-subtotal-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
}

.quick-uxe-subtotal-price {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.uxe-subtotal-amount {
  font-size: 24px;
  font-weight: 700;
  color: #4caf50;
  line-height: 1;
}

.uxe-subtotal-pix {
  font-size: 14px;
  color: #4caf50;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Actions */
.uxe-modal-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 10px;
}

.uxe-add-to-cart-btn {
  flex: 1;
  background: #4285f4 !important;
  color: white;
  border: none;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
}

.uxe-add-to-cart-btn:hover:not(:disabled) {
  background: #3367d6;
}

.uxe-add-to-cart-btn:disabled,
.uxe-add-to-cart-btn.disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.uxe-wishlist-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 56px;
  height: 56px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
}

.uxe-wishlist-btn:hover {
  border-color: #4285f4;
  color: #4285f4;
}

/* Loading State */
.uxe-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  font-size: 16px;
  color: #666;
  width: 80dvw;
}

.uxe-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #d32f2f;
  font-size: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .uxe-quick-add-modal {
    width: 95vw;
    height: 95vh;
  }

  .uxe-modal-body {
    flex-direction: column;
    min-height: auto;
  }

  .quick-uxe-product-images {
    height: 300px;
    padding: 20px;
  }

  .uxe-product-details {
    padding: 20px;
  }

  .uxe-quick-add-modal {
    overflow-y: scroll;
  }

  .uxe-image-container {
    width: 250px;
    height: 250px;
  }

  .quick-uxe-product-title {
    font-size: 18px;
  }

  .quick-uxe-price-current {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .uxe-variation-options {
    gap: 6px;
  }

  .uxe-variation-option {
    padding: 6px 12px;
    font-size: 11px;
  }

  .uxe-modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .uxe-product-details {
    gap: 12px;
  }

  .uxe-wishlist-btn {
    width: 100%;
    height: 48px;
  }
}

/* Notification System */
.uxe-notification {
  position: absolute;
  top: 60px;
  left: 20px;
  right: 20px;
  z-index: 10;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

.uxe-notification-error {
  background: #ffebee;
  border-left: 4px solid #f44336;
}

.uxe-notification-warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
}

.uxe-notification-success {
  background: #e8f5e8;
  border-left: 4px solid #4caf50;
}

.uxe-notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.uxe-notification-message {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex: 1;
  line-height: 1.4;
}

.uxe-notification-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.uxe-notification-close:hover {
  color: #333;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error notification colors */
.uxe-notification-error .uxe-notification-message {
  color: #d32f2f;
}

.uxe-notification-warning .uxe-notification-message {
  color: #f57c00;
}

.uxe-notification-success .uxe-notification-message {
  color: #2e7d32;
}
