/* toàn bộ lớp tiền tố ldp-detail- */

/* overlay & modal */
.ldp-detail-modal {
  position: fixed;
  inset: 0;
  display: flex; /* bật .active để hiển thị */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  overscroll-behavior: contain;
}
.ldp-detail-modal.active {
  opacity: 1;
  visibility: visible;
}
.ldp-detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}
.ldp-detail-spacer {
  flex: 0 0 300px; /* chiếm 300px top space */
}

.ldp-detail-content {
  position: relative;
  background: #fff;
  width: 100%;
  padding: 0 20px 20px 20px;
  z-index: 10;
}

/* close button */
.ldp-detail-close {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: flex-end;
  background: #fff;
  padding: 20px 16px 0;
}

/* layout */
.ldp-detail-body {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

/* gallery */
.ldp-detail-gallery {
  flex-basis: 65%;
  display: flex;
  gap: 20px;
}
.ldp-detail-thumbs-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ldp-detail-thumbs-btn {
  border: none;
  background-color: transparent;
}
.ldp-detail-thumbs-btn img {
  width: 11.333px;
  height: 17px;
}
.ldp-detail-thumbs {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.ldp-detail-thumb-item {
  border: 1px solid transparent;
  margin-bottom: 8px;
  cursor: pointer;
  width: 176px;
  height: 176px;
  flex-shrink: 0;
}
.ldp-detail-thumb-item.active {
  border-color: #b78b6d;
}
.ldp-detail-thumb-item img {
  width: 100%;
  height: 100%;
}
.ldp-detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* info */
.ldp-detail-info {
  flex-basis: 35%;
  display: flex;
  flex-direction: column;
}
.ldp-detail-title {
  color: #3f3b36;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.ldp-detail-price {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}
.ldp-detail-price-current {
  color: #b48c72;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  min-height: 52px;
}
.ldp-detail-price-old {
  margin-top: 10px;
  color: #b4b3b2;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
  text-decoration-line: line-through;
  min-height: 24px;
}

/* meta list */
.ldp-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ldp-detail-meta li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3f3b36;
  text-align: right;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.ldp-detail-meta li strong {
  color: #3f3b36;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* options */
.ldp-detail-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.ldp-detail-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ldp-detail-option-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}
.ldp-detail-colors {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 8px;
}
.ldp-detail-color {
  width: 24px;
  height: 24px;
  border: 1px solid #ccc;
  cursor: pointer;
  border-radius: 4px;
}
.ldp-detail-color.active {
  border: 1px solid #b48c72;
}
.swatch-white {
  background: linear-gradient(
    135deg,
    #434244 0%,
    #8f8f92 40%,
    #f2f2f2 80%,
    #ffffff 100%
  );
}
.swatch-gold {
  background: linear-gradient(135deg, #ead69b 0%, #f7e5b0 50%, #d4af37 100%);
}
.swatch-rose {
  background: linear-gradient(135deg, #f0d0c0 0%, #e6b9a5 50%, #c3896f 100%);
}

.ldp-detail-toggle-group {
  display: flex;
  gap: 8px;
}
.ldp-detail-toggle {
  display: flex;
  padding: 5px 10px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d9d9d9;
  color: #3f3b36;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  background-color: transparent;
}
.ldp-detail-toggle.active {
  border: 1px solid #b48c72;
  color: #3f3b36;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

/* footer actions */
.ldp-detail-cta {
  margin-top: 20px;
  display: flex;
  padding: 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #b48c72;
  border: none;
  color: #fff;
  text-align: center;
  font-family: "Averta Std CY";
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  text-transform: uppercase;
}
.ldp-detail-phone {
  margin-top: 12px;
  color: #3f3b36;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  padding-bottom: 20px;
  border-bottom: 1px solid #b4b3b2;
}
.ldp-detail-note {
  margin-top: 20px;
  color: #b4b3b2;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: normal;
}
.ldp-detail-favorite {
  background: none;
  border: none;
  cursor: pointer;
  align-self: flex-start;
}
.ldp-detail-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
@media screen and (max-width: 768px) {
  .ldp-detail-price-current {
    min-height: 31px;
  }
  .ldp-detail-price-old {
    min-height: 24px;
  }
  .ldp-detail-overlay {
    align-items: flex-end;
    padding-top: 100px;
  }
  .ldp-detail-content.container {
    flex: 1 1 auto; /* chiếm phần còn lại */
    overflow-y: scroll; /* bật scrollbar khi cần */
    overscroll-behavior: contain;
    /* tuỳ padding/margin nội dung */
    padding: 20px;
    height: 85%;
  }

  .ldp-detail-spacer {
    flex-basis: 300px;
  }
  .ldp-detail-body {
    flex: 1;
    flex-direction: column;
    max-width: 100%;
  }
  .ldp-detail-gallery {
    flex-basis: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .ldp-detail-main-image {
    flex: 1;
  }
  .ldp-detail-option.flex1 {
    order: 0;
  }
  .ldp-detail-title.flex2 {
    order: 1;
    margin-top: 32px;
  }
  .ldp-detail-price.flex3 {
    order: 2;
    margin-top: 5px;
  }
  .ldp-detail-meta.flex4 {
    order: 3;
  }
  .ldp-detail-option.flex5 {
    order: 4;
  }
  .ldp-detail-option.flex6 {
    order: 5;
  }
  .ldp-detail-cta.open-contact-popup.flex7 {
    order: 6;
  }
  .ldp-detail-phone.flex8 {
    order: 7;
  }
  .ldp-detail-note.flex9 {
    order: 8;
  }
  .ldp-detail-option-label.none {
    display: none;
  }
  .ldp-detail-content.container {
    margin: 0;
    max-width: 100%;
    overscroll-behavior: contain;
  }
  .ldp-detail-thumb-item {
    width: 92px;
    height: 92px;
  }
  .ldp-detail-close {
    background: #f7f7f7;
    padding: 10px;
    width: fit-content;
    margin: 0 10px 10px 0 !important;
  }
  .ldp-detail-title.flex2 {
    color: #3f3b36;
    text-align: justify;
    font-family: "Averta Std CY";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
  .ldp-detail-price-current {
    color: #b48c72;
    text-align: justify;
    font-family: "Averta Std CY";
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
}
