@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;700&display=swap');

:root {
  --brand: #16a34a;
  --bar: #0f172a;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: 'Kanit', sans-serif;
}

#map {
  height: 100%;
  width: 100%;
  background: #f0f0f0;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bar);
  color: white;
  padding: 10px 12px;
  box-shadow: 0 -5px 15px rgba(0,0,0,.2);
}

/* --- ไอคอนบนแผนที่ --- */
.custom-asset-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .2s ease;
}

.custom-asset-icon:hover {
    transform: scale(1.05);
    z-index: 1000 !important;
}

.custom-asset-icon img {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  object-fit: cover;
  background-color: #ddd;
}

.custom-asset-icon .info {
  background-color: rgba(0,0,0,0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  margin-top: -10px;
  z-index: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.2);
  text-align: center;
}

.info-name {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.info-price {
    font-size: 12px;
    font-weight: 700;
    color: #55f38d;
}

/* --- Modal (Popup) Styles --- */

.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  padding: 16px;
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  display: none;
}

.modal-content {
  background: white;
  max-width: 800px;
  max-height: 95vh;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-close-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 18px; font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.modal-body { padding: 20px; flex: 1; overflow-y: auto; }
.modal-body h1 { margin: 0 0 10px; font-size: 22px; line-height: 1.4; }
.modal-price { color: var(--brand); font-size: 20px; font-weight: 700; margin-bottom: 16px; }

.spec-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.spec-item { background: #f5f5f5; padding: 8px 12px; border-radius: 8px; text-align: center; }
.spec-item .label { font-size: 12px; color: #666;}
.spec-item .value { font-size: 15px; font-weight: 500;}

.detail-section h3, .staff-section h3 { font-size: 16px; margin: 20px 0 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.detail-content { font-size: 14px; line-height: 1.7; color: #333; white-space: pre-wrap; }

.staff-card { display: flex; align-items: center; gap: 15px; margin-top: 10px; }
.staff-card img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.staff-info .name { font-weight: 700; font-size: 16px; }
.staff-info .actions { display: flex; gap: 10px; margin-top: 5px; }
.staff-info .actions a { text-decoration: none; color: white; background: var(--brand); padding: 6px 12px; border-radius: 20px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }

/* --- Slider --- */
.slider { position: relative; height: 280px; background: #eee; overflow: hidden; border-radius: 16px 16px 0 0; }
.slider .slides { display: flex; height: 100%; transition: transform .3s ease-in-out; }
.slider .slide { min-width: 100%; height: 100%; }
.slider img { width: 100%; height: 100%; object-fit: cover; }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 100%; display: flex; justify-content: space-between; padding: 0 10px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.slider:hover .slider-nav { opacity: 1; }
.slider-nav button { background: rgba(0,0,0,0.5); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; pointer-events: all; }
.slide-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.slide-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background .3s; }
.slide-dots .dot.active { background: white; }
