/* ====================================
   CONFIGURATION MODAL
   Stand options selector overlay
   ==================================== */

/* Modal Overlay */
.config-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
  pointer-events: none;
}

.config-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal Container */
.config-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000001;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
  padding: 40px 40px 30px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-title {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

/* Modal Content */
.modal-content {
  padding: 40px;
}

/* Two Column Layout */
.modal-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

/* Image Column */
.modal-image-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.config-image-container {
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Loading State */
.config-image-container.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: #a65959;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 100;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.modal-carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.modal-carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.modal-carousel-image.active {
  opacity: 1;
  pointer-events: auto;
}

/* Carousel Navigation Buttons */
.modal-carousel-prev,
.modal-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-carousel-prev {
  left: 12px;
}

.modal-carousel-next {
  right: 12px;
}

.modal-carousel-prev:hover,
.modal-carousel-next:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Carousel Indicators */
.modal-carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.indicator-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.indicator-dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* Options Column */
.modal-options-col {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Option Group */
.option-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-label {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.option-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-btn {
  padding: 12px 16px;
  border: 2px solid #ddd;
  background: #ffffff;
  border-radius: 8px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.option-btn:hover {
  border-color: #a65959;
  background: #fafafa;
}

.option-btn.active {
  background: #a65959;
  color: #ffffff;
  border-color: #a65959;
  box-shadow: 0 4px 12px rgba(166, 89, 89, 0.2);
}

/* Stand Info */
.modal-stand-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #a65959;
}

.stand-feature {
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 12px;
}

.stand-feature:last-child {
  margin-bottom: 0;
}

/* Price */
.config-price {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #a65959;
  margin-top: 20px;
}

/* Action Button */
.modal-action-btn {
  width: 100%;
  padding: 14px 20px;
  margin-top: 20px;
  background: #a65959;
  color: #ffffff;
  border: none;
  border-radius: 24px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-action-btn:hover {
  background: #8b4646;
  transform: scale(1.02);
}

.modal-action-btn:active {
  transform: scale(0.98);
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
  .modal-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .modal-header {
    padding: 30px 30px 20px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-content {
    padding: 30px;
  }

  .option-buttons {
    grid-template-columns: 1fr 1fr;
  }

  .config-modal {
    width: 95%;
    border-radius: 16px;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .modal-columns {
    gap: 24px;
  }

  .modal-header {
    padding: 24px 20px 18px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-options-col {
    gap: 20px;
  }

  .option-group {
    gap: 10px;
  }

  .option-label {
    font-size: 12px;
  }

  .option-btn {
    padding: 10px 12px;
    font-size: 12px;
  }

  .config-price {
    font-size: 20px;
  }

  .modal-action-btn {
    padding: 12px 16px;
    font-size: 11px;
  }
}
