body {
  font-family: "Kanit", sans-serif !important;
  background-color: #f8f9fa !important;
}

.property-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.property-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
/* ปุ่มเลื่อนซ้ายขวา */
.property-img .carousel-control-prev,
.property-img .carousel-control-next {
  width: 35px !important;
  height: 35px !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border-radius: 50% !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* ซ่อนปุ่มก่อน */
.property-img .carousel-control-prev,
.property-img .carousel-control-next {
  opacity: 0;
  transition: 0.2s;
}

/* hover แล้วโชว์ */
.property-img:hover .carousel-control-prev,
.property-img:hover .carousel-control-next {
  opacity: 1;
}

/* Navbar Customization */
.navbar {
  background-color: #fff !important;
  border-bottom: 2px solid #dc3545 !important;
  /* เส้นแดงใต้ Navbar */
}

.navbar-brand {
  font-weight: 700 !important;
  color: #dc3545 !important ;
  font-size: 1.5rem !important;
}

.search-section {
  background: url("../images/banner.png") center/cover no-repeat;
  padding: 180px 0;
  position: relative;
}

.search-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.search-section .container {
  position: relative !important;
  z-index: 2 !important;
}

.search-box-wrapper {
  background: #fff !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  max-width: 900px !important;
  margin: -100px auto 0 !important;
  position: relative !important;
  z-index: 10 !important;
}

.type-switcher {
  display: flex !important;
  border-bottom: 1px solid #dee2e6 !important;
  margin-bottom: 15px !important;
}

.type-btn {
  flex: 1 !important;
  text-align: center !important;
  padding: 10px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  color: #6c757d !important;
  transition: 0.3s !important;
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  border-bottom-right-radius: 8px !important;
  color: #dc3545 !important;
}

.form-control:focus {
  border-color: #dc3545 !important;
  outline: 0 !important;
  box-shadow: 0 5px 5px rgba(220, 53, 69, 0.25) !important;
}

.type-btn.active {
  color: #dc3545 !important;
  border-bottom: 3px solid #dc3545 !important;
}

/* Input ค้นหา */
.main-search-input {
  border-radius: 50px !important;
  border: 1px solid #ced4da !important;
  padding-left: 20px !important;
  padding-right: 120px !important; /* กันพื้นที่ให้ปุ่ม */
  height: 45px !important;
}

.form-select:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 5px 5px rgba(220, 53, 69, 0.25) !important;
}


.form-select option:checked {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #dc3545 !important;
  box-shadow: 0 5px 5px rgba(220, 53, 69, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-dropdown {
  z-index: 1056 !important;
  overflow: hidden !important;
  color: #212529 !important;
  background-color: #fff !important;
  border-color: #dc3545 !important;
  border-radius: 0.25rem !important;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-search
  .select2-search__field:focus {
  border-color: #dc3545;
  box-shadow: 0 5px 5px rgba(220, 53, 69, 0.25) !important;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options
  .select2-results__option[aria-selected="true"]:not(
    .select2-results__option--highlighted
  ) {
  color: #fff !important;
  background-color: #dc3545 !important;
}

/* wrapper */
.search-wrapper {
  position: relative;
}

/* ปุ่มค้นหา */

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #dc3545;
  color: white;
  padding: 6px 18px;
  border-radius: 40px;
  font-size: 14px;
  height: 35px;
  transition: 0.2s;
}

.search-btn:hover {
  background: #bb2d3b;
}
/* แถบฟิลเตอร์ด้านล่าง (ประเภท, รถไฟฟ้า, ตัวกรอง) */
.filter-row {
  display: flex !important;
  gap: 10px !important;
  margin-top: 15px !important;
}

.filter-item {
  flex: 1 !important;
  border-radius: 8px !important;
  border: 1px solid #ced4da !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 15px !important;
  font-size: 0.9rem !important;
  background: #fff !important;
  text-align: center !important;
}

.btn-dark-filter {
  background: #343a40 !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.9rem !important;
}

.btn-red-action {
  background: #dc3545 !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 0 25px !important;
  border: none !important;
}

/* Search Section */
.search-container {
  background: #212529 !important;
  /* พื้นหลังดำ */
  color: white !important;
  padding: 40px 0 !important;
  border-bottom: 5px solid #dc3545 !important;
}

/* ทรัพย์มาใหม่ */
.new-property {
  border: 2px solid #dc3545 !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

/* ทรัพย์แนะนำ */
.recommended-property {
  border: 2px solid #dc3545 !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}
/* Property Card */
.card {
  /* cursor: pointer; */
  border: none;
  border-radius: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.15);
  position: relative;
  overflow: hidden; /* ตัวนี้สำคัญ */
}

.card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 25px rgb(255 0 0 / 24%) !important;
}

.badge-red {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc3545;
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 5px;
  z-index: 10;
}

.price-tag {
  color: #dc3545 !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important;
}

/* Buttons */
.btn-red {
  background-color: #dc3545 !important;
  color: white !important;
  border: none !important;
}

.btn-red:hover {
  background-color: #a71d2a !important;
  color: white !important;
}

/* Pagination */
.page-link {
  color: #212529 !important;
}

.page-item.active .page-link {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}

/* Footer */
footer {
  background-color: #212529 !important;
  color: #fff !important;
  padding: 50px 0 20px !important;
}

footer h5 {
  color: #dc3545 !important;
  margin-bottom: 20px !important;
}

.recommended-wrapper {
  overflow: hidden;
}

.recommended-slider {
  display: flex;
  gap: 20px;
  transition: 0.4s;
}

.recommended-slider .col-card {
  min-width: 300px;
}

/* loading */
.skeleton-card {
  border-radius: 12px;
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  height: 220px;
}

.skeleton-text {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.skeleton-price {
  width: 60%;
  height: 18px;
  border-radius: 6px;
}

.skeleton {
  background: linear-gradient(90deg, #eeeeee 25%, #f5f5f5 37%, #eeeeee 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/*-- PropertyDetail --*/
/* ============================= */
/* PROPERTY DETAIL */
/* ============================= */

.property-gallery img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Thumbnail */
/* wrapper */
.thumb-wrapper {
  position: relative;
}

/* scroll container */
.thumb-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 5px 35px;
}

/* ซ่อน scrollbar */
.thumb-list::-webkit-scrollbar {
  display: none;
}

/* thumbnail */
.thumb-list img {
  width: 95px;
  height: 75px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.25s;
  border: 2px solid transparent;
  flex: 0 0 auto;
}

.thumb-list img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.thumb-list img.active {
  opacity: 1;
  border: 2px solid #dc3545;
}

/* arrow buttons */
.thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 2;
}

.thumb-nav.left {
  left: 0;
}

.thumb-nav.right {
  right: 0;
}

/* Title */
.property-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 15px;
}

.property-location {
  color: #6c757d;
  font-size: 0.95rem;
}

.property-price {
  font-size: 1.9rem;
  font-weight: 700;
  color: #dc3545;
}

/* PROPERTY INFO */
.property-info {
  display: flex;
  justify-content: space-between;
  text-align: center;
  margin: 25px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.property-info div {
  flex: 1;
}

.property-info strong {
  display: block;
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.property-info div div {
  font-weight: 600;
  font-size: 1.05rem;
}

/* CONTACT CARD */
.contact-card {
  border-radius: 14px;
  border: none;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-card h5 {
  font-weight: 700;
}

.contact-card p {
  font-size: 0.95rem;
}

.contact-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 10px;
  font-weight: 600;
  transition: 0.25s;
}

.contact-btn:hover {
  background: #bb2d3b;
  transform: translateY(-2px);
}

/* DESCRIPTION */
.card h5 {
  font-weight: 700;
}

/* MAP BUTTON */
#map_link {
  border-radius: 10px;
  padding: 12px 25px;
  font-weight: 600;
}

/* SIDEBAR */
.col-lg-4 .card {
  border-radius: 14px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.col-lg-4 p {
  font-size: 0.95rem;
}

/* SIMILAR PROPERTY */
.similar-card {
  border-radius: 14px;
  overflow: hidden;
  transition: 0.3s;
}

.similar-card img {
  height: 170px;
  width: 100%;
  object-fit: cover;
}

.similar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.similar-card .card-body {
  padding: 12px 15px;
}

.similar-card h6 {
  font-weight: 600;
}

.similar-card .text-danger {
  font-size: 1rem;
  font-weight: 700;
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 12px;
  width: 100%;
  border-radius: 8px;
  font-weight: 600;
}

.contact-btn:hover {
  background: #b02a37;
}

.similar-card img {
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
.carousel-inner {
  cursor: pointer !important;
}

/* SELECT2 */
.select2-container--bootstrap-5 .select2-selection {
  flex: 1;
  border-radius: 8px !important;
  border: 1px solid #ced4da !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 15px !important;
  font-size: 0.9rem !important;
  background: #fff !important;
  text-align: center !important;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
  width: 100%;
  text-align: center;
  line-height: normal !important;
}

.select2-container {
  flex: 1;
}

.select2-container--bootstrap-5
  .select2-dropdown
  .select2-results__options:not(.select2-results__options--nested) {
  text-align: center !important;
}

.property-title {
  font-weight: 700;
  font-size: 1.4rem;
}

.property-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000;
}

.property-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #ffe5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #e03131;
}

.info-label {
  font-size: 0.85rem;
  color: #777;
}

.info-value {
  font-weight: 600;
}

.meta-row {
  font-size: 0.95rem;
  color: #6c757d;
}

.property-code {
  font-weight: 600;
  color: #333;
}

.agoda-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.main-photo img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
}

.side-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
}

.side-photos img {
  width: 100%;
  height: 205px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.side-photos img:hover {
  transform: scale(1.03);
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

.gallery-image {
  max-width: 90%;
  max-height: 70%;
  border-radius: 8px;
}

.close-gallery {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 45px;
  color: white;
  cursor: pointer;
  padding: 10px 20px;
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-counter {
  color: white;
  margin-top: 10px;
}

.gallery-thumbs {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.gallery-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  border-radius: 4px;
}

.gallery-thumbs img.active {
  opacity: 1;
  border: 2px solid white;
}

.thumb-more {
  position: relative;
  cursor: pointer;
}

.thumb-more img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.more-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 26px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.breadcrumb-modern {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumb-modern a {
  text-decoration: none;
  color: #666;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.breadcrumb-modern a:hover {
  color: #e60023;
}

.breadcrumb-modern .divider {
  margin: 0 8px;
  color: #bbb;
}

.breadcrumb-modern .current {
  color: #111;
  font-weight: 600;
}

.section-title {
  font-weight: 600;
  display: flex;
  align-items: center;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.contact-item i {
  font-size: 18px;
}

.property-detail {
  line-height: 1.7;
  color: #555;
}

.contact-card {
  border-radius: 12px;
}

.contact-item a {
  color: inherit;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}
/* ============================= */
/* RESPONSIVE FIX */
/* ============================= */

/* Tablet */
@media (max-width: 992px) {
  .search-section {
    padding: 120px 0;
  }

  .search-box-wrapper {
    max-width: 100%;
    margin: -80px 15px 0;
  }

  .property-img,
  .property-img img {
    height: 200px;
  }

  .main-photo img {
    height: 320px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .search-section {
    padding: 90px 0;
  }

  .search-box-wrapper {
    margin: -70px 10px 0;
    padding: 15px;
  }

  /* gallery mobile */
  .agoda-gallery {
    grid-template-columns: 1fr;
  }

  .side-photos {
    grid-template-columns: 1fr 1fr;
  }

  .side-photos img {
    height: 120px;
  }

  .main-photo img {
    height: 260px;
  }

  /* property info */
  .property-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* contact card */
  .contact-card {
    padding: 15px;
  }

  /* similar property */
  .similar-card img {
    height: 150px;
  }

  .property-img,
  .property-img img {
    height: 190px;
  }

  .price-tag {
    font-size: 1.1rem;
  }

  .similar-card h6 {
    font-size: 0.95rem;
  }
}

/* Small mobile */
@media (max-width: 576px) {
  .property-title {
    font-size: 1.2rem;
  }

  .property-price {
    font-size: 1.4rem;
  }

  .info-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .gallery-thumbs img {
    width: 60px;
    height: 45px;
  }
}

/* Footer */

footer {
  background: #212529;
  color: #fff;
  padding: 50px 0 20px;
}

footer h5 {
  color: #dc3545;
  margin-bottom: 20px;
  font-weight: 600;
}

/* link */

.footer-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.footer-link:hover {
  color: #dc3545;
}

/* mobile spacing */

@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px;
  }

  footer h5 {
    font-size: 18px;
  }
}
