.row1 {
  width: 100%;
  max-width: 1300px;
  margin: 0px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  
}

.carousel-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.carousel-images img.active {
  opacity: 1;
}

button.prev, button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: white;
  background: rgba(0,0,0,0.4);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

button.prev:hover, button.next:hover {
  background: rgba(0,0,0,0.6);
}

button.prev { left: 15px; }
button.next { right: 15px; }

@media (max-width: 768px) {
  .row1 {
    max-width:      100%;        /* ลดขนาดให้พอดีกับหน้าจอมือถือ */
    border-radius: 12px;   /* ขอบมนเล็กลง */
  }

  .row1 img {
    width: 100%;
    height: 100%;          /* ปรับความสูงอัตโนมัติให้ภาพไม่บิด */
    object-fit: cover;
  }

  .carousel-wrapper button {
    font-size: 1.2rem;     /* ปรับขนาดปุ่มให้เล็กลง */
    padding: 6px 10px;
  }
}
