@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&family=Poppins:wght@300;400;500;600&display=swap');

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

/* Fondo */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}

/* .product-price {
  cursor: pointer;
} */
.product-price {
  font-size: 1.4rem;
  font-weight: 600;
  background: #1a428a;
  color: #f2e088;
  padding: 10px 14px;
  border-radius: 8px;
  width: fit-content;
  margin: 0px 0px;
}

/* Contenedor */
.modal-content {
  position: relative;
  background: #fafafa;;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  animation: modalIn 0.35s ease;
}

/* Grid */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 100%;
}

/* Imagen ocupa 4 columnas */
.modal-image {
  grid-column: span 5;
  background: #f5f5f5;
}

.modal-image .img_modal {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Barra lateral */
.modal-info {
  grid-column: span 3;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: #fafafa;
  border-left: 1px solid #e5e5e5;
  box-shadow: 0px 2px 49px #000000c9;
}

.container-title{
  display: flex;
  flex-direction: row;
  gap: 10px;
}

@media (max-width: 1200px) {
  .modal-info {
    box-shadow: none;
  }
}

/* Colores */
.modal-colors {
  display: flex;
  gap: 10px;
}

/* .modal-colors span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #ccc;
  cursor: pointer;
  } */
  .modal-colors span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #dcdcdc;
    cursor: pointer;
    transition: transform .2s ease;
  }

/* Cerrar */
.modal-close {
  z-index: 8;
  position: absolute;
  color: rgb(255, 255, 255);
  top: 20px;
  right: 18px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Animación */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Estado inicial del modal */
.modal {
  opacity: 0;
  pointer-events: none;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-info {
  transform: translateX(80px);
  opacity: 0;
  transition:
    transform 0.65s ease,
    opacity 0.45s ease;
}

.modal-image {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.modal.show .modal-info {
  transform: translateX(0);
  opacity: 1;
}

/* Delay para que aparezca después del aside */
.modal.show .modal-image {
  opacity: 1;
  transition-delay: 0.35s;
}

.modal-image .img_modal {
  transition: opacity 0.4s ease;
  height: 100vh;
}

.modal-colors {
  display: flex;
  gap: 10px;
}

.modal-colors span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #ccc;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.modal-colors span:hover {
  transform: scale(1.15);
}

.modal-colors span.active {
  box-shadow: 0 0 0 2px #000;
}

/* .toggle_desc {
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: #000000a1;
  font-style: italic;
  line-height: 1;
} */
.toggle_desc {
  font-size: 0.85rem;
  color: #335f82;
  font-weight: 500;
  cursor: pointer;
  margin-top: -10px;
}


@media (max-width: 768px) {
  .modal-content {
    overflow-y: auto;
  }

  .modal-grid {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .modal-image{
    position: relative;
    max-height: 50vh;
    overflow: hidden;
  }

  .modal-image .img_modal {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .modal-info {
    overflow: visible;
  }

  /* .modal-info {
    border-left: none;
    border-top: 1px solid #e5e5e5;
  } */
  .modal-info {
    font-family: "Poppins", sans-serif;
  }

  /* .modal-name{
    font-size: 1rem;
  } */
  .modal-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
  }

  /* .size_text{
    font-size: 0.8rem;
  } */
  .size_text {
    font-size: 0.9rem;
    font-weight: 500;
  }
  /* .desc{
    font-size: 0.8rem;
    font-family: "Playfair Display", serif;
  } */
  .desc {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #444;
    font-family: "Poppins", sans-serif;
    max-width: 95%;
  }
}

.modal-name{
  font-size: 1.2rem;
  font-family: "Playfair Display", serif;
}

/* .size_text{
  font-size: 0.8rem;
} */
.size_text {
  font-size: 0.9rem;
  font-weight: 500;
}

/* .desc{
  font-size: 0.8rem;
  font-family: "Playfair Display", serif;
} */
.desc {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #444;
  font-family: "Poppins", sans-serif;
  max-width: 95%;
}

.open-dot{
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  background: #1a428a;
  color: #f2e088;
  padding: 10px 10px;
  border-radius: 8px;
  width: fit-content;
  margin: 0px 0px;
  text-align: center;
  cursor: pointer;
}

.open-dot:hover{
  background-color: rgb(8, 73, 138);
}

/* .modal-opens{
  display: none;
} */
.modal-opens {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  background: #1a428a;
  color: #f2e088;
  padding: 10px 10px;
  border-radius: 8px;
  width: fit-content;
  margin: 0px 0px;
  align-content: center;
  /* display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0px; */
}

/* this is ia */
.modal-opens .option-box {
  background: #f1f1f1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  cursor: pointer;
  transition: background .2s ease;
}

/* this is ia */
.modal-opens .option-box:hover {
  background: #e7e7e7;
}

/* this is ia */
.modal-opens .option-box.active {
  border: 2px solid #000;
}

.modal-top{
  display: flex;
  justify-content: center;
  gap: 5px;
}

.span-top{
  margin: 0px 10px 0px 0px;
  padding: 5px;
  background: gray;
  border-radius: 5px;
  color: white;
  cursor: pointer;
}

.span-top:hover{
  background: rgb(83, 83, 83);
}

.container_size{
  display: flex;
  justify-content: left;
  align-items: end;
}

.displayNone{
  display: none;
}

.btns_top{
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
