﻿/* Product Modal Lightbox with Backdrop Dim / Blur */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 27, 57, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  max-height: 90vh;
}

@media (max-width: 768px) {
  .modal-container {
    grid-template-columns: 1fr;
    max-height: 85vh;
    overflow-y: auto;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ffffff;
  border: 1px solid var(--copelt-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.2rem;
  color: var(--copelt-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.modal-gallery {
  padding: 1.5rem;
  background: #fdfdfd;
  border-right: 1px solid var(--copelt-border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-main-img-wrap {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--copelt-border);
  border-radius: 8px;
  overflow: hidden;
}

.modal-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.modal-main-img:hover {
  transform: scale(1.08);
  cursor: zoom-in;
}

.modal-thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
  overflow-x: auto;
}

.modal-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: cover;
  background: #ffffff;
}

.modal-thumb.active {
  border-color: var(--copelt-accent);
}

.modal-details {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-store-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--copelt-accent);
  letter-spacing: 0.5px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--copelt-primary);
  margin-top: 0.25rem;
}

.modal-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--copelt-primary);
  margin: 1rem 0;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--copelt-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}