/* ====== GLOBAL ====== */
body {
  font-family: 'Prompt', sans-serif;
  background: #f5f7f9;
}

img {
  max-width: 100%;
  height: auto;
}

.value {
  word-break: break-word;
}

/* ====== CAROUSEL ====== */
.book-carousel {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

/* ====== BACKGROUND BLUR ====== */
.carousel-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;

  filter: blur(20px) brightness(0.6) contrast(1.1);
  transform: scale(1.2);
}



/* ====== CONTENT ====== */
.carousel-content {
  height: 350px;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* ====== BOOK CARD  ====== */
.book-card {
  display: flex;
  align-items: center;
  gap: 25px;

  background: transparent;
  backdrop-filter: none;
  box-shadow: none;

  padding: 0;
  width: auto;
  max-width: 900px;

  transition: all 0.4s ease;
}

.book-card:hover {
  transform: scale(1.03);
}

/* ====== IMAGE ====== */
.img-wrapper {
  width: 240px;
  height: 320px;
  flex-shrink: 0;
}

.book-img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  border-radius: 16px;

  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.book-img:hover {
  transform: scale(1.05);
}

/* ====== BOOK INFO BLOCK ====== */
.book-info {
  text-align: left;
  color: #fff;
  padding: 10px 5px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .book-title {
    font-size: 16px;
  }

  .book-info h6 {
    font-size: 13px;
  }

}

/* ====== BUTTON ====== */
.btn-book {
  width: fit-content;

  background: linear-gradient(135deg, #00796b, #005f56); /* 🔥 โทนหลัก */
  border: none;

  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;

  margin: 20px auto 0;
  display: block;

  padding: 10px 22px;
  border-radius: 30px;

  box-shadow: 0 6px 18px rgba(0, 95, 86, 0.35);

  transition: all 0.3s ease;
}

/* hover */
.btn-book:hover {
  transform: translateY(-2px) scale(1.03);

  background: linear-gradient(135deg, #009688, #00695c); /* 🔥 สว่างขึ้นนิด */
  box-shadow: 0 10px 25px rgba(0, 95, 86, 0.5);
}

/* กด */
.btn-book:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 95, 86, 0.4);
}

/* ====== SMOOTH SLIDE ====== */
.carousel-item {
  transition: transform 0.8s ease-in-out !important;
}

/* ====== INDICATORS ====== */
.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ====== CONTAINER ====== */
.container {
  width: 100%;
  max-width: 1200px;
}

/* ===== ปุ่มเลื่อน ===== */
.custom-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;

  width: 55px;
  height: 55px;
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);

  color: #fff;
  font-size: 26px;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-control.prev {
  left: 20px;
}

.custom-control.next {
  right: 20px;
}

.custom-control:hover {
  transform: translateY(-50%) scale(1.2);
  background: rgba(0, 0, 0, 0.7);
}

.custom-control:active {
  transform: translateY(-50%) scale(1.05);
}



.info-row span {
  min-width: 0; 
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {

  .carousel-content {
    height: 600px;
    padding: 0 15px;
  }

  .book-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .img-wrapper {
    width: 200px;
    height: 240px;
  }

  .book-info {
    align-items: center;
  }

  .book-title {
    text-align: center;
    font-size: 16px;
  }

  .btn-book {
    width: 50%;
    text-align: center;
  }
}

/* ====== SMALL MOBILE ====== */
@media (max-width: 480px) {

  .carousel-content {
    height: 520px;
  }

  .img-wrapper {
    width: 120px;
    height: 180px;
  }

}

/* ROW */
.info-row {
  display: grid;
  grid-template-columns: 100px 1fr; 
  gap: 10px;
  align-items: start;
}

/* LABEL (ฝั่งซ้าย) */
.label {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
  padding-right: 10px;
  font-size: 20px;
  display: block;
}

/*  */


.desc {
  display: -webkit-box;
  -webkit-line-clamp: 5;   
  -webkit-box-orient: vertical;

  overflow: hidden;

  line-height: 1.6;
  max-height: calc(1.6em * 5); 

  width: 100%;
}
.desc.has-more::after {
  content: " …";
}

.desc.has-more .read-btn {
  color: #00d1b2;
  cursor: pointer;
  font-weight: 600;
  margin-left: 4px;
}

.read-inline {
  color: #00d1b2;
  cursor: pointer;
  margin-left: 5px;
}


.read-more {
  display: inline-block;
  margin-top: 5px;
  color: #00d1b2;
  font-size: 13px;
  cursor: pointer;
}

/* overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.6);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transition: all 0.3s ease;
  z-index: 9999;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-box {
  background: #ffffff;
  border-radius: 16px;

  max-width: 500px;
  width: 90%;

  padding: 20px;

  transform: scale(0.8);
  transition: all 0.3s ease;
}


.popup-overlay.active .popup-box {
  transform: scale(1);
}


.popup-content {
  color: #333;
  font-size: 15px;
  line-height: 1.6;

  max-height: 300px;
  overflow-y: auto;
}

.popup-close {
  margin-top: 15px;
  width: 100%;

  background: #005f56;
  color: white;

  border: none;
  padding: 10px;

  border-radius: 10px;
  cursor: pointer;
}