* { font-family: 'Athiti', sans-serif; box-sizing: border-box; }

/* ฟอนต์หลัก */
body {
  margin: 0;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
}

.sqm-price {
  font-size: 16px;
  font-weight: normal;
  color: #555;
  margin-left: 6px;
}


/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 30px;
  z-index: 1000;
  font-weight: 100;
}

.logo img { height: 30px; }

/* Hamburger */
.menu-toggle { display: none; cursor: pointer; }
.menu-toggle img { width: 28px; }

/* Language */
.language img {
  width: 28px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.language img:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* เมนู Desktop */
nav { display: flex; gap: 35px; font-size: 18px; }
nav a { color: #fff; text-decoration: none; font-weight: bold; transition: color 0.3s; }
nav a:hover { color: #aaa; }

/* ===== Mobile Header ===== */
@media (max-width: 768px) {
  header { justify-content: space-between; }
  .menu-toggle { display: block; order: 1; }
  .logo { order: 2; text-align: center; flex: 1; }
  .logo img { height: 40px; }
  .language { order: 3; }

  nav {
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; width: 100%;
    background: #1a1a1a;
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
  }
  nav.active { max-height: 100vh; overflow-y: auto; }
  nav a { padding: 15px 0; text-align: center; border-bottom: 1px solid #333; }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 15px auto;
  font-size: 14px;
  color: #666;
  padding: 0 15px;
}
.breadcrumb a { color: #000; text-decoration: none; }
.breadcrumb span { color: #444; }

/* ===== Layout ===== */
.content-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.property-content { flex: 1; min-width: 0; }

/* ===== PROPERTY HEADER ===== */
.property-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}
.post-date { font-size: 13px; color: #777; margin-top: 4px; }

.share-btn {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Athiti", sans-serif;
  transition: background 0.3s;
}

.share-btn:hover { background: #444; }

.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 30px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}
.toast.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}

/* สถานะ */
.status {
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
}
.status.available {
  background: #28a745;
  box-shadow: 0 0 10px #28a745, 0 0 20px #28a745;
  animation: glow-blink 1.0s infinite;
}
.status.unavailable {
  background: #dc3545;
  box-shadow: 0 0 10px #ff3636, 0 0 20px #ff0000;
  animation: glow-blink 1.0s infinite;
}

.status.available.soon { 
  background: #c2ae00;
  box-shadow: 0 0 10px #dfe218, 0 0 20px #a79028;
  animation: glow-blink 1.0s infinite;
 }

.status.availability.sold { 
  background: #000000;
  box-shadow: 0 0 10px #dfe218, 0 0 20px #a79028;
  animation: glow-blink 1.0s infinite;
 }

@keyframes glow-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ===== GALLERY ===== */
/* .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery-item,
.gallery-more {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 4 / 3;
}
.gallery-item img,
.gallery-more img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover,
.gallery-more:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.gallery-item:hover img,
.gallery-more:hover img { transform: scale(1.1); }

.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }

.gallery-more .overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: bold; color: #fff;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-more:hover .overlay { opacity: 1; } */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

.gallery-more {
  position: relative;
}

.gallery-more .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
}
/* 🎨 Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* ✅ เอฟเฟกต์ตอน hover */
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Overlay ตอน hover */
.gallery-item::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* 🎯 ปุ่ม +10 รูป overlay */
.gallery-more {
  position: relative;
}

.gallery-more .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-more:hover .overlay {
  opacity: 1;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
}
.lightbox img {
  max-width: 90%; max-height: 80%;
  display: block; margin: 5% auto;
}
.lightbox .close {
  position: absolute; top: 20px; right: 40px;
  font-size: 40px; color: #fff; cursor: pointer;
}
.lightbox-controls {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; display: flex; justify-content: space-between;
  padding: 0 30px; z-index: 2100;
}
.lightbox-controls button {
  background: rgba(255,255,255,0.5);
  border: none; padding: 10px; border-radius: 50%;
  cursor: pointer; font-size: 22px;
}

/* ===== DETAIL + INFO ===== */
.property-detail .price {
  font-size: 20px; font-weight: bold; color: #d33;
}
.property-info { margin: 20px 0; }
.property-info h3 { font-size: 22px; margin-bottom: 20px; font-weight: 600; color: #333; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
}
.info-box {
  background: #fff; border: 1px solid #e0e0e0;
  padding: 12px; text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.info-box:hover { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
.info-box img { width: 35px; height: 35px; object-fit: contain; margin-bottom: 6px; }
.info-box p { font-size: 16px; color: #444; margin: 0; }
.info-box strong { display: block; font-size: 18px; margin-top: 5px; color: #222; }

/* ===== HIGHLIGHTS ===== */
.highlight-tags { margin: 12px 0; }
.highlight-tags .tag {
  background: #eee; padding: 4px 10px; border-radius: 20px; margin-right: 6px; font-size: 14px;
}

.feature-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 10px; 
  margin: 10px 0; 
}

.feature {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  padding: 12px; 
  border: 1px solid #d8d8d8; 
  border-radius: 12px; background: #303030; text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(0,0,0,0.15); }
.feature img { width: 40px; height: 40px; object-fit: contain; margin-bottom: 8px; }
.feature span { font-size: 14px; font-weight: 500; color: #ffffff; }
.feature.active { opacity: 1; }
.feature.inactive { opacity: 0.4; }

/* อ่านต่อ */
.property-highlight .full-text {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.7s ease, opacity 0.7s ease, margin-top 0.7s ease;
  margin-top: 0;
}
.property-highlight.expanded .full-text { opacity: 1; margin-top: 10px; }
.property-highlight.expanded .short-text { display: none; }

#readMoreBtn {
  margin-top: 10px; background: #000000; color: #fff;
  border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px;
  transition: all 0.2s ease;
}
#readMoreBtn:hover { background-color: #0056b3; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
#readMoreBtn:active { transform: scale(0.95); box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* ===== TERMS ===== */
.terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px; list-style: none; padding: 0; margin: 20px 0;
}
.terms li {
  background: #fff; border: 1px solid #ddd; border-radius: 12px;
  padding: 15px; font-size: 15px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.terms li:hover { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(0,0,0,0.15); }

/* ===== AGENT ===== */
.agent-container {
  width: 260px;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.agent-box {
  background: #fff; border-radius: 16px; padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); text-align: center;
}
.agent-box img {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin-bottom: 10px;
}
.phone {
  display: inline-block; font-size: 16px; font-weight: bold;
  transition: opacity 0.3s ease; opacity: 1;
}
.phone.hide { opacity: 0; }
.reveal-btn {
  margin-top: 8px; padding: 8px 16px;
  background: #007bff; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 14px;
  transition: all 0.2s ease;
}
.reveal-btn:hover { background: #0056b3; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.reveal-btn:active { transform: scale(0.95); box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

/* ไลน์เอเจ้น */
.line-contact {
  margin-top: 10px; 
  font-size: 14px; 
  font-weight: bold;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 6px; 
  color: #00b900;
}
.line-logo { 
  width: 25px !important;   /* บังคับให้เล็ก */
  height: 25px !important;  /* รักษาสัดส่วน */
  object-fit: contain;      /* กันรูปยืด */
  vertical-align: middle;   /* จัดให้อยู่กึ่งกลางกับข้อความ */
   cursor: pointer;          /* ทำให้เห็นว่าเป็นปุ่มกด */
  transition: transform 0.2s ease;
}

.line-logo:hover { 
  transform: scale(1.1); 
}

.line-contact a 
{ display: flex; 
  align-items: center; 
  gap: 6px; 
  text-decoration: none; 
  color: #000; 
  font-weight: bold; 
  font-size: 14px;
 }

/* ===== MAP ===== */
.property-location {
  margin: 50px auto; padding: 20px; max-width: 1200px; text-align: center;
}
.property-location h2 {
  font-size: 24px; font-weight: bold; margin-bottom: 20px; color: #333;
}
.map-container {
  border-radius: 15px; overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.map-container:hover { transform: scale(1.02); box-shadow: 0 10px 25px rgba(0,0,0,0.25); }

/* ===== Mobile layout ===== */
@media (max-width: 768px) {
  .content-wrapper { flex-direction: column; }
  .agent-container {
    position: static; /* ยกเลิก sticky ในมือถือ */
    width: 100%;
    top: auto;
    margin-top: 20px;
  }
}

/* ===== FOOTER ===== */
footer {
  background: #fafafa; color: #000; text-align: center; padding: 20px;
  font-weight: 100;
}
footer .social-icons img { height: 23px; margin: 0 8px; transition: transform 0.3s; }
footer .social-icons img:hover { transform: scale(1.2); }
