/*-----------------------------------*\
  #PREVIEW MODAL
\*-----------------------------------*/

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-white);
  width: 1050px;
  max-width: 90%;
  border-radius: 10px;
  display: flex;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: var(--font-xl);
  cursor: pointer;
  color: var(--text-color);
  transition: color var(--transition-normal);
  font-weight: bold;
}

.modal-close:hover {
  color: #00aeef;
}

.modal-left {
  width: 40%;
  padding-right: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-left .main-image {
  width: 100%;
  height: 300px;
  object-fit: contain;
  margin-bottom: 15px;
}

.modal-left .thumbnail-gallery {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-left .thumbnail-gallery img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.6s ease;
}

.modal-left .thumbnail-gallery img:hover {
  border: 3px solid #00aeef;
}

.modal-right {
  width: 60%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-right .product-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  word-break: break-word;
}

.modal-right .brand {
  font-size: 14px;
  color: #00aeef;
  margin-bottom: 10px;
  transition: color 0.3s, text-decoration 0.3s ease;
  text-decoration: none;
}

.modal-right .brand:hover {
  color: #002d85;
  text-decoration: underline;
  cursor: pointer;
}

.modal-right .discount {
  background-color: #ff0000;
  color: #ffffff;
  padding: 0px 10px;
  border-radius: 5px;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: center;
  width: 90px;
}

.modal-right .price {
  padding-top: 20px;
  padding-bottom: 10px;
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.modal-right .price .original {
  text-decoration: line-through;
  color: #666;
  margin-right: 10px;
}

.modal-right .price .discounted {
  font-weight: bold;
}

.modal-right .product-availability {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--success-color);
  gap: 8px;
}

.modal-right .product-availability::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--success-color);
}

.modal-right .product-availability.out-of-stock {
  color: var(--error-color);
}

.modal-right .product-availability.out-of-stock::before {
  background-color: var(--error-color);
}

.modal-right .quantity {
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-right .quantity button {
  background-color: #ddd;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 22px;
}

.modal-right .quantity input {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  padding: 5px;
}

.quantity span {
  font-size: 16px;
  font-weight: 550;
}

.modal-right .actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.modal-right .actions button {
  padding: 20px 70px;
  margin: 9px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  border-radius: 5px;
}

.modal-right .actions .add-to-cart {
  background-color: #00aeef;
  color: #fff;
  transition: background-color 0.8s;
}

.modal-right .actions .add-to-cart:hover {
  background-color: #0056b3;
}

.modal-right .actions .buy-now {
  background-color: #333;
  color: #fff;
  transition: background-color 0.8s;
}

.modal-right .actions .buy-now:hover {
  background-color: #6d6868;
}

.modal-right .actions button.disabled {
  background-color: #cccccc;
  color: #888888;
  cursor: not-allowed;
  opacity: 0.7;
}

.modal-right .actions button.disabled:hover {
  background-color: #cccccc;
  transform: none;
}

@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-left {
    width: 100%;
    padding-right: 0;
    padding-bottom: 15px;
  }

  .modal-right {
    width: 100%;
    padding-top: 0;
  }

  .modal-right .discount {
    width: 80px;
    padding: 3px 8px;
    font-size: 10px;
  }

  .modal-right .actions button {
    padding: 15px 30px;
    margin: 5px;
    font-size: 14px;
  }
}
