/* ⭐ 4. modal.css
Product detail modal with variant selectors.
css
VeRSION 002
Added .color-btn.active, .size-btn.active at the bottom
VeRSION 003 FULLY REPLACE VeRSION 022 */

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9990;
}
.hidden { display: none; }

/* Modal Box */
.modal-box {
  width: 1100px;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Content Layout */
.modal-content {
  display: flex;
  gap: 24px;
  padding: 24px;
  overflow-y: auto;
}

/* LEFT PANEL */
.modal-left {
  width: 45%;
}

.modal-main-image {
  width: 100%;
  border-radius: 8px;
}

.modal-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.modal-thumbnails img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}
.modal-thumbnails img.selected {
  border-color: #000;
}

/* RIGHT PANEL */
.modal-right {
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
}

.modal-brand {
  font-size: 14px;
  color: #666;
}

.modal-price {
  font-size: 20px;
  font-weight: 600;
}

.modal-price .regular {
  text-decoration: line-through;
  color: #888;
  margin-left: 8px;
}

/* Buy CTA */
.modal-buy-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
}

.modal-retailer-logo {
  height: 22px;
}

/* Colors */
.modal-colors {
  display: flex;
  gap: 8px;
}

.modal-color-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.modal-color-circle.selected {
  border-color: #000;
}

/* Sizes */
.modal-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-size-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.modal-size-btn.selected {
  background: #000;
  color: #fff;
}
.modal-size-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Variant Table */
.variant-details summary {
  cursor: pointer;
  font-weight: 600;
}

.variant-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.variant-table td, .variant-table th {
  border: 1px solid #ddd;
  padding: 6px;
}

/* Description */
.modal-description {
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

/* THIS CSS CONTROL MESSAGE ON NO SEARCH RESULT */
.no-results {
  text-align: center;
  padding: 40px;
  color: #555;
  font-size: 1.2rem;
}
.no-results h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
