#main_col {
  margin: 0 auto;
}

#introduce_col {
  flex-grow: 4;
  margin: 4rem 2rem;
}

#left_col {
  width: 70%;
  margin: auto;
}

#side_col {
  width: 30%;
  margin: 4rem 0;
  float: left;
}

.sidebar-contact-blocks {
  display: block;
  padding: 2rem;
}

.introduce_blocks {
  margin-bottom: 2rem;
  box-shadow: 3px 3px 5px rgb(89 89 89 / 20%);
}

.custom-post-block {
  padding: 2rem;
  border: 1px solid #ccc;
}

.custom-post-block img {
  width: 100%;
}

.property-image-blocks {
  position: relative;
}

.property-rent-tag {
  position: absolute;
  top: 5%;
  font-weight: bolder;
}

.rent-tag {
  padding: 0.5vw 1vw;
  margin-bottom: 0.5rem;
  text-align: center;
  color: rgb(255, 255, 255);
  background-color: rgb(211, 193, 155);
  border: 2px solid rgb(255, 255, 255);
  border-radius: 0.2rem;
  box-shadow: 2px 2px 3px rgb(89 89 89 / 80%);
}

.buy-tag {
  padding: 0.5vw 1vw;
  color: rgb(255, 255, 255);
  text-align: center;
  background-color: rgb(23, 26, 169);
  border: 2px solid rgb(255, 255, 255);
  border-radius: 0.2rem;
  box-shadow: 2px 2px 3px rgb(89 89 89 / 80%);
}

.property-name {
  padding: 1rem 0 0.5rem;
  border-bottom: 2px solid rgb(229, 229, 229);
}

.property-name-text {
  font-size: 1rem;
}

.property-info {
  margin: 1rem 0;
}

.property-info-first-block,
.property-info-second-block {
  display: block;
  position: relative;
  align-items: baseline;
}

.property-facility-blocks {
  display: flex;
  position: relative;
  align-items: flex-end;
}

.property-facility-block {
  display: flex;
  flex-grow: 1;
  margin-right: 0.5rem;
}

.property-facility-link {
  display: block;
  padding: 0.3rem;
  padding-left: 0;
  padding-bottom: 0;
}

.property-detail-block {
  display: flex;
  flex-grow: 1;
  flex-basis: 5rem;
  align-items: center;
  justify-content: flex-end;
}

.property-detail-link {
  display: block;
  padding: 1rem;
  color: rgb(255, 255, 255);
  font-size: 1rem;
  font-weight: 600;
}

.property-detail-link:hover {
  color: rgb(255, 255, 255);
}

.property-detail-button {
  background-color: rgb(23, 26, 169);
  box-shadow: 2px 2px 3px rgb(89 89 89 / 60%);
  transition: all 0.3s ease-in-out;
}

.property-detail-button:hover {
  background-color: rgba(23 26 169/ 60%);
}

.property-info-blocks {
  padding: 1rem 0;
}

.property-info-blocks td {
  max-height: 5rem;
}

.property-info-blocks div[class^="info-"]:not(.info-introduction) {
  display: block;
  float: left;
  padding-bottom: 1rem;
}

.info-type {
  width: 50%;
}

.info-type td:nth-child(1),
.info-area td:nth-child(1) {
  width: 4.5rem;
  /*3.5rem*/
}

.info-floor {
  width: 50%;
}

.info-floor td:nth-child(1),
.info-new-construction td:nth-child(1) {
  width: 4.5rem;
  /*2.8rem*/
}

.info-area {
  width: 50%;
  align-self: flex-start;
}

.info-introduction img {
  width: 0.9rem;
  margin-right: 0.2rem;
}

.info-rent {
  float: right;
  width: 50%;
  align-self: flex-start;
}

.info-rent td:nth-child(1) {
  width: 4.5rem;
  /*2rem*/
}

.introduction-tag {
  display: inline-block;
  padding: 0.2rem;
  margin-bottom: 0.3rem;
  line-height: 1.3;
  font-weight: bolder;
  border: 2px solid rgb(41, 170, 225);
  border-radius: 0.3rem;
}

.introduction-tag-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-search-title {
  padding: 0 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
  background-color: rgb(41, 170, 225);
  cursor: pointer;
}

.sidebar-search-title-table td,
.sidebar-button-table {
  vertical-align: middle;
}

.sidebar-search-title-table td:nth-child(1) {
  width: 1%;
}

.sidebar-search-title-table td:nth-child(2),
.sidebar-button-table {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(255, 255, 255);
}

.sidebar-search-title-table td:nth-child(3) {
  width: 1%;
}

.active-search-title,
.property-search-title:not(:nth-last-child(2)):hover {
  background-color: rgb(2, 159, 226);
}

.accordion-icon {
  width: 1.5rem;
  padding: 0.3rem;
}

.property-search-label-panel {
  display: none;
}

.first-title-image {
  width: 3rem;
  line-height: 1;
  vertical-align: middle;
}

.sidebar-button-table .first-title-image {
  width: 2rem;
}

.search-button {
  display: flex !important;
  position: relative;
  float: none !important;
  width: 100%;
  height: 3rem;
  padding: 0 0.5rem !important;
  margin: 1.5rem auto 0;
  align-items: center;
  justify-content: center;
  color: rgb(255, 255, 255);
  background: rgb(23, 26, 169);
  border: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.search-button:hover {
  background-color: rgba(23 26 169/ 60%);
}

.search-button .search-title-inner-front {
  padding-right: 0.1rem;
}

.search-button .search-title-inner-front .first-title-image {
  width: 2rem;
  padding-top: 0.3rem;
}

.search-button .search-title-inner-end {
  width: auto;
}

.search-title-inner-front {
  justify-content: flex-start;
}

.search-title-inner-end {
  display: flex;
  width: 100%;
  min-width: 8rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(255, 255, 255);
  align-items: center;
  justify-content: center;
}

.custom-checkbox:after {
  -webkit-transition: border-color 0.2s linear;
  transition: border-color 0.2s linear;
  position: absolute;
  top: 0px;
  left: 0px;
  display: block;
  background: rgb(231, 231, 230);
  width: 20px;
  height: 20px;
  content: "";
}

.property-search-blocks input[type="checkbox"] {
  display: none;
}

.property-search-blocks
  input[type="checkbox"]:checked
  + .custom-checkbox:after {
  content: url(https://www.e-stag-e.info/apaman/wp-content/uploads/2021/04/check-mark.png);
  width: 16px;
  height: 16px;
  padding: 2px;
}

.rent-dropdown-blocks {
  width: 95%;
  margin: auto;
}

.rent-dropdown {
  width: 100%;
  height: 2.3rem;
  margin: auto;
  border-radius: 0.3rem;
  border-color: rgb(178, 178, 178);
  background-color: rgb(255, 255, 255);
}

.archive_filter {
  display: block;
  margin: 0;
  padding: 2rem;
  background: rgb(255, 255, 255);
}

.archive_filter .property-search-label label {
  position: relative;
  float: none !important;
  padding: 0 0 0 28px !important;
}

.property-search-label {
  position: relative;
  margin-bottom: 0.5rem;
}

.search-title-text,
.sidebar-contact-text {
  white-space: pre;
  line-height: 1;
  vertical-align: middle;
}

#submit {
  display: none;
}

.sidebar-contact-link {
  display: flex;
  position: relative;
  width: auto;
  height: 3.2rem;
  padding: 0 0.5rem;
  align-items: center;
  justify-content: center;
  color: rgb(255, 255, 255);
  background: rgb(41, 170, 225);
  border: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.sidebar-contact-link:hover {
  opacity: 0.6;
}

.sidebar-contact-block {
  display: flex;
}

.sidebar-contact-inner-front {
  line-height: 1;
  padding-right: 0.5rem;
  justify-content: flex-start;
}

.sidebar-contact-inner-front .first-title-image {
  width: 2rem;
}

.sidebar-contact-inner-end {
  display: flex;
  width: auto;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(255, 255, 255);
  align-items: center;
  justify-content: center;
}

.property-post-pagination {
  margin-bottom: 2rem;
}

.property-post-pagination .page-numbers {
  display: inline-block;
  width: 1.5rem;
  height: 1.2rem;
  padding: 0.3rem;
  text-align: center;
  line-height: 1.5;
  font-weight: 600;
  color: rgb(0, 0, 0);
  background-color: rgb(231, 231, 231);
}

.property-post-pagination .current {
  color: rgb(255, 255, 255);
  background-color: rgb(41, 170, 225);
}

.no_post {
  margin: 4rem 2rem;
}

@media screen and (max-width: 1024px) {
  #main_col .archive_filter {
    padding: 0 2rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  #main_col .archive_filter {
    padding: 0 1rem;
  }

  .custom-post-block {
    padding: 1rem;
  }

  .sidebar-contact-blocks {
    padding: 0 1rem;
    margin: 1.5rem auto 0;
  }

  .search-title-text,
  .sidebar-contact-text {
    white-space: pre-line;
  }

  .property-detail-block {
    flex-basis: 10rem;
  }

  .property-detail-link {
    padding: 0.8rem;
    font-size: 0.8rem;
  }

  .property-info-blocks div[class^="info-"]:not(.info-introduction) {
    flex-basis: 0.1rem;
  }

  .info-type td:nth-child(1),
  .info-area td:nth-child(1),
  .info-floor td:nth-child(1),
  .info-new-construction td:nth-child(1),
  .info-rent td:nth-child(1) {
    width: 1px;
    white-space: nowrap;
  }

  .info-introduction {
    flex-basis: 0rem;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  #introduce_col {
    margin: 4rem 0;
  }
}

@media screen and (max-width: 767px) {
  #main_col {
    display: block;
  }

  #main_col .archive_filter {
    display: block;
    padding: 0;
  }

  #main_col .archive_filter label {
    float: none;
  }

  #side_col {
    width: 100%;
    margin: 4rem 0 2rem;
  }

  #left_col {
    width: 100%;
  }

  #introduce_col {
    margin: 0;
  }

  .rent-dropdown-blocks {
    width: 100%;
  }

  .custom-post-block {
    padding: 1rem;
  }

  .sidebar-contact-blocks {
    margin: 1.5rem auto 0;
    padding: 0;
  }

  .property-info-blocks:nth-child(3) {
    padding: 1rem 0 0;
  }

  .property-info-blocks:nth-child(4) {
    padding: 0 0 1rem;
  }

  .property-info-blocks div[class^="info-"]:not(.info-introduction) {
    float: none;
    width: auto;
    padding-bottom: 1rem;
  }

  .property-info-first-block {
    margin-bottom: 0;
  }

  .property-info-first-block,
  .property-info-second-block {
    flex-wrap: wrap;
  }

  .info-rent td:nth-child(1) {
    width: 4.5rem;
    /*2.8rem*/
  }

  .property-name-text {
    font-size: 1rem;
  }

  .property-facility-blocks {
    display: block;
  }

  .property-facility-block {
    margin-right: 0;
    justify-content: left;
  }

  .property-detail-block {
    justify-content: center;
    margin-top: 1rem;
  }

  .property-detail-link {
    font-size: 0.8rem;
  }

  .property-facility-link:last-child {
    padding-right: 0;
  }

  .property-detail-button {
    width: 100%;
    text-align: center;
  }

  /*Add style for space After searching : 280921 By Am*/
  .no_post {
    margin-top: 1rem;
    margin-bottom: 2rem !important;
  }
}

/* FRANKY 2025-11-19 ============================================================= */

.property-detail-text p {
  color: rgb(255, 255, 255);
  background-color: rgb(41, 170, 225);
  padding: 1rem;
}

.property-list {
  width: 100%;
  margin: 20px 0;
}

.property-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 80px 1fr;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #ddd;
  gap: 4px;
}

.property-item img {
  width: 130px;
  border-radius: 6px;
}

.price {
  font-weight: bold;
  color: #e63946;
  display: block;
}

.price small {
  color: #444;
  font-weight: normal;
}

.property-item .publisher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.publisher img {
  width: 35px;
}

.actions button {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 0;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-contact {
  background: #ff6b6b;
  color: white;
}

.btn-details {
  background: #1e2a4f;
  color: white;
}

.header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 80px 1fr;
  background: rgb(41, 170, 225);
  color: white;
  font-weight: bold;
  gap: 4px;
}

.property-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3 columns by default */
  gap: 10px;
}

@media (max-width: 768px) {
  .property-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .property-gallery {
    grid-template-columns: 1fr;
  }
}

.property-gallery-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

/* Accordion  */
button.accordion-header {
  cursor: pointer;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
  background: rgb(41, 170, 225);
  color: white;
  font-weight: bold;
  padding: 1rem;
}

button.accordion-header:after {
  content: "\002B";
  color: white;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

button.accordion-header.active:after {
  content: "\2212";
}

button.accordion-header:hover {
  background-color: rgb(2, 159, 226);
}

/* --- Filter and Sort Controls Container --- */
.filter-controls {
  /* Change from flex-wrap to block or column structure for separation */
  display: block;
  padding: 15px;
  margin-bottom: 25px;
  background-color: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 5px;
}

/* --- Individual Control Sections (Sort & Filter) --- */
.filter-controls .control-section {
  display: flex;
  align-items: center;
  padding: 10px 0;
  /* Vertical padding for spacing */
}

.filter-controls h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 15px 0 0;
  /* Increased margin on the right of the header */
  color: #333;
  /* Ensure header takes up space but doesn't wrap the links */
  flex-shrink: 0;
}

/* --- Separator Line Between Controls --- */
.control-separator {
  border: none;
  border-top: 1px solid #e0e0e0;
  /* Light gray line separator */
  margin: 10px 0;
  /* Space above and below the line */
}

/* --- Style for Links (Sorting and Filtering) --- */
.control-section a {
  text-decoration: none;
  color: #0073aa;
  padding: 8px 15px;
  /* Slightly larger padding for better click area */
  border: 1px solid #0073aa;
  border-radius: 20px;
  /* Rounded pill shape for a modern look */
  margin-right: 10px;
  transition: all 0.2s ease;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  /* Prevent links from breaking text onto multiple lines */
}

.control-section a:hover {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
}

/* --- Highlight currently active link --- */
.control-section a.active-filter {
  background-color: #333;
  color: white;
  border-color: #333;
  font-weight: bold;
}

@media (max-width: 768px) {
  /* --- Main Container --- */
  .filter-controls {
    /* Remove horizontal padding to use full screen width */
    padding-left: 5px;
    padding-right: 5px;
  }

  /* --- Individual Control Sections (Sort & Filter) --- */
  .filter-controls .control-section {
    /* Change to wrap to the next line if space runs out */
    flex-wrap: wrap;
    /* Add some space below each section */
    margin-bottom: 10px;
  }

  /* --- Header (並び替え/間取りで絞り込む) --- */
  .filter-controls h3 {
    /* Force the header to take up the full width above the buttons */
    flex-basis: 100%;
    margin-bottom: 10px;
    margin-left: 0;
  }

  /* --- Individual Links/Buttons --- */
  .control-section a {
    /* Add margin to the bottom for vertical spacing when they wrap */
    margin-bottom: 10px;
    /* Allow them to grow and shrink slightly, but with a minimum size */
    flex-grow: 1;
    flex-shrink: 1;
    /* Set a minimum width so buttons don't get too squeezed */
    min-width: 120px;
    /* Ensure the text inside is centered when the button is wide */
    text-align: center;
  }

  /* Remove right margin from the last button in each row for clean edge */
  .control-section a:last-child {
    margin-right: 0;
  }
}

/* Container for horizontal scroll on mobile */
.property-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling for iOS */
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Base Table Styling */
.property-table {
  width: 100%;
  /* Forces scroll on small screens */
  border-collapse: collapse;
  background-color: #fff;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Blue Header */
.property-table thead th {
  background-color: #29aae1;
  color: #ffffff;
  padding: 16px 10px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

/* Rows & Cells */
.property-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.property-table tbody tr:hover {
  background-color: #f9f9f9;
  /* Subtle hover effect */
}

/* .property-table td {
    padding: 12px 15px;
    vertical-align: middle;
  } */
.property-table .clickable-row td {
  padding: 0 !important;
  vertical-align: middle;
}

.property-table .row-link {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px 10px;
  /* ย้ายการตั้งค่าความสวยงาม (Padding) มาไว้ที่นี่แทน */
  text-decoration: none;
  /* เอาเส้นใต้ลิงก์ออก */
  color: inherit;
  /* ให้ใช้สีตัวอักษรเดียวกับตาราง */
  box-sizing: border-box;
}

/* Cell Contents Layout */
.cell-content {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Property Thumbnail */
.prop-img img {
  width: 110px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Typography */
.price-text {
  font-weight: 700;
  font-size: 1.1em;
  color: #333;
}

.col-introduce {
  color: #666;
  font-size: 0.95em;
  max-width: 300px;
}

.text-truncate {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icons (Using WordPress Dashicons) */
.dashicons {
  color: #29aae1;
  font-size: 20px;
  width: 20px;
  height: 20px;
}

/* คอนโทรลด้านบน */
.table-controls input:focus {
  outline: none;
  border-color: #31aadb;
}

/* ทำให้หัวตารางที่คลิกได้ดูเหมือนปุ่ม */
.property-table thead th a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-table thead th a:hover {
  opacity: 0.8;
}

/* ตกแต่งไอคอน Sort */
.fa-sort-up,
.fa-sort-down {
  font-size: 14px;
}

.status-btn {
  display: flex;
  padding: 8px 16px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 50px;
  text-decoration: none;
  color: #555 !important;
  font-size: 14px;
  transition: all 0.2s;
}

.status-btn.active {
  background: var(--primary-color);
  color: #fff !important;
  border-color: var(--primary-color);
}

.status-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.status-btn.active:hover {
  color: #fff;
}

.count {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 5px;
}

.location-parent-title {
  font-weight: bold;
}

.location-child {
  padding-left: 1.2rem; /* indent หัวข้อย่อย */
}
