/* 一直顺房产 - 移动端首页 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
  max-width: 750px;
  margin: 0 auto;
  padding-bottom: 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

.home-header {
  position: relative;
  height: 240px;
  background-color: #8b7355;
  background-image: url("https://s1.ljcdn.com/hulk-web/static/m/asset/pages/siteIndex/img/home_bg.jpg"),
    url("https://image1.ljcdn.com/110000-inspection/pc1_BS8l8W2rD.jpg!m_fill,w_750,h_400,f_jpg");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  color: #fff;
  overflow: visible;
  margin-bottom: 24px;
}

.home-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 100%);
}

.home-header .top-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 0;
}

.city-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, .35);
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 14px;
}

.city-switch .arrow {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  margin-top: 2px;
}

.icon-user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #fff;
  flex-shrink: 0;
}

.icon-user svg {
  width: 24px;
  height: 24px;
  display: block;
}

.user-area {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.user-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.user-label {
  font-size: 10px;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}

.user-area.logged-in .user-label {
  display: none;
}

.user-area.logged-in {
  cursor: pointer;
}

body:not(.is-logged-in) .list-item {
  cursor: default;
}

.header-content {
  position: relative;
  z-index: 2;
  padding: 28px 16px 0;
  text-align: center;
}

.slogan {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  height: 40px;
  padding: 0 12px;
  margin: 0 4px;
  position: relative;
  top: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.search-box .icon-search {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-right: 8px;
}

.search-box .icon-search::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: #ccc;
  bottom: -1px;
  right: -4px;
  transform: rotate(45deg);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  background: transparent;
  min-width: 0;
}

.search-box input::placeholder {
  color: #999;
}

.search-clear {
  display: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  font-size: 16px;
  color: #bbb;
  cursor: pointer;
  border-radius: 50%;
  background: #f0f0f0;
}

.search-clear.visible {
  display: block;
}

.search-box .icon-search {
  cursor: pointer;
}

.search-hot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 4px 0;
  padding: 0 2px;
}

.search-hot-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .75);
}

.search-hot-item {
  border: none;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.search-hot-item:active {
  background: rgba(255, 255, 255, .35);
}

.search-result-tip {
  display: none;
  padding: 10px 16px 0;
  font-size: 13px;
  color: #666;
}

.search-result-tip.visible {
  display: block;
}

.search-result-tip.empty {
  color: #fa5741;
}

.list-empty {
  padding: 40px 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.list-empty p {
  margin-bottom: 8px;
}

.content-area {
  background: #f5f5f5;
}

.mod-box {
  background: #fff;
  margin-bottom: 8px;
}

.channel-nav {
  padding: 8px 0 12px;
}

.grid-4 {
  display: flex;
  flex-wrap: wrap;
}

.grid-4 .nav-item {
  width: 25%;
  text-align: center;
  margin-bottom: 16px;
}

.nav-item .icon-img {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
}

.nav-item .icon-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-item .name {
  font-size: 13px;
  color: #333;
}

.tool-list {
  padding: 0 16px 16px;
}

.tool-list .title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  padding: 16px 0 12px;
  border-bottom: 1px solid #f0f0f0;
}

.tool-list-wrap {
  display: flex;
  justify-content: space-around;
  padding-top: 16px;
}

.tool-item {
  text-align: center;
  flex: 1;
}

.tool-item .icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
}

.tool-item .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-item div {
  font-size: 12px;
  color: #666;
}

.house-lists {
  padding-bottom: 8px;
}

.mod-tit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
}

.mod-tit .tabs {
  display: flex;
  gap: 12px;
  font-size: 13px;
  font-weight: normal;
}

.mod-tit .tab {
  position: relative;
  color: #999;
  cursor: pointer;
  padding-bottom: 6px;
}

.mod-tit .tab.active {
  color: #30b067;
  font-weight: 600;
}

.mod-tit .tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #30b067;
  border-radius: 1px;
}

.list-item {
  position: relative;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.list-item:last-of-type {
  border-bottom: none;
}

.list-item .flexbox {
  display: flex;
  gap: 12px;
}

.list-item .media {
  flex-shrink: 0;
  width: 105px;
  height: 82px;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: #eee;
}

.list-item .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item .vr-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-item .vr-badge::after {
  content: "VR";
  font-size: 8px;
  color: #fff;
  font-weight: bold;
}

.list-item .info {
  flex: 1;
  min-width: 0;
}

.item-main {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-main .goodhouse-icon {
  display: inline-block;
  height: 16px;
  vertical-align: -2px;
  margin-right: 4px;
}

.search-highlight {
  color: #30b067;
  background: rgba(48, 176, 103, .12);
  padding: 0 1px;
  border-radius: 2px;
  font-style: normal;
}

.item-other {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-price {
  margin-bottom: 6px;
}

.price-total {
  font-size: 16px;
  font-weight: 600;
  color: #fa5741;
}

.price-total em {
  font-style: normal;
  font-size: 18px;
}

.price-total .unit {
  font-size: 14px;
}

.unit-price {
  font-size: 11px;
  color: #999;
  margin-left: 4px;
}

.tag-box {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  white-space: nowrap;
}

.item-desc {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  padding-left: 0;
}

.btn-view-all {
  display: block;
  margin: 12px 16px 16px;
  padding: 12px;
  text-align: center;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 2px;
  color: #30b067;
  font-size: 15px;
  font-weight: 600;
}

.footer {
  background: #394043;
  color: #9c9fa1;
  font-size: 12px;
  margin-top: 8px;
}

.footer .nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 12px 12px;
  gap: 4px;
}

.footer .nav h1 {
  font-size: 12px;
  font-weight: normal;
}

.footer .nav a {
  color: #9c9fa1;
}

.footer .nav .sep {
  color: #666;
  margin: 0 4px;
}

.link-box {
  border-top: 1px solid #4a4f52;
}

.link-tit {
  display: flex;
}

.link-tit .li {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #727373;
  background: #2d3133;
  cursor: pointer;
}

.link-tit .li.active {
  background: #394043;
  color: #fff;
  border-bottom: 2px solid #fff;
}

.link-cont {
  padding: 12px 8px;
}

.city-grid {
  display: none;
  flex-wrap: wrap;
}

.city-grid.active {
  display: flex;
}

.city-grid li {
  width: 33.33%;
  padding: 6px 4px;
}

.city-grid a {
  color: #9c9fa1;
  font-size: 12px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-grid a::before {
  content: "· ";
}

.footer .info {
  padding: 16px;
  border-top: 1px solid #4a4f52;
}

.icon-box {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
}

.icon-box a {
  color: #9c9fa1;
  font-size: 12px;
  padding-left: 20px;
  position: relative;
}

.icon-box .icon-iphone::before,
.icon-box .icon-android::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 1px solid #727373;
  border-radius: 3px;
}

.copyright p {
  line-height: 1.8;
  color: #727373;
}

.copyright a {
  color: #727373;
}

.copyright .beian {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.copyright .beian img {
  width: 14px;
  height: 14px;
}

.chat-fab {
  position: fixed;
  right: 16px;
  bottom: 80px;
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.chat-fab svg {
  width: 24px;
  height: 24px;
  fill: #666;
}

.license-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .85);
  padding: 20px 16px;
  overflow-y: auto;
}

.license-overlay.active {
  display: block;
}

.license-overlay img {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 4px;
}

.license-close {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 201;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}

/* ===== 登录弹窗 ===== */
.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-overlay.active {
  display: flex;
}

.login-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.login-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: #999;
  margin-bottom: 24px;
}

.login-field {
  margin-bottom: 14px;
}

.login-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 15px;
  color: #333;
  outline: none;
  transition: border-color .2s;
}

.login-field input:focus {
  border-color: #30b067;
}

.login-field input::placeholder {
  color: #bbb;
}

.login-field-code {
  display: flex;
  gap: 10px;
}

.login-field-code input {
  flex: 1;
  min-width: 0;
}

.send-code-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #30b067;
  border-radius: 6px;
  background: #fff;
  color: #30b067;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.send-code-btn.disabled,
.send-code-btn:disabled {
  border-color: #ddd;
  color: #bbb;
  cursor: not-allowed;
}

.login-error {
  min-height: 18px;
  font-size: 12px;
  color: #fa5741;
  margin: -4px 0 10px;
  line-height: 1.4;
}

.login-submit {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 6px;
  background: #30b067;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.login-submit:active {
  background: #2a9d5c;
}

.login-tip {
  margin-top: 16px;
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.5;
}

/* ===== 用户信息弹窗 ===== */
.user-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.user-overlay.active {
  display: flex;
}

.user-modal {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px 24px;
  text-align: center;
}

.user-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  line-height: 1;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
}

.user-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border: 3px solid #30b067;
  border-radius: 50%;
  background: #f5f5f5;
  position: relative;
}

.user-avatar::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 18px;
  border: 3px solid #30b067;
  border-bottom: none;
  border-radius: 18px 18px 0 0;
}

.user-modal-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.user-modal-phone {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
}

.user-logout-btn {
  width: 100%;
  height: 44px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 15px;
  cursor: pointer;
}

.user-logout-btn:active {
  background: #f5f5f5;
}

/* ===== 房源详情弹窗 ===== */
.detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, .55);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.detail-overlay.active {
  display: flex;
}

body.detail-open {
  overflow: hidden;
}

.detail-modal {
  position: relative;
  width: 100%;
  max-width: 750px;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px 12px 0 0;
  overflow-y: auto;
}

.detail-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.detail-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #eee;
}

.detail-body {
  padding: 16px;
}

.detail-type {
  display: inline-block;
  font-size: 11px;
  color: #30b067;
  background: rgba(48, 176, 103, .12);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin-bottom: 8px;
}

.detail-info {
  font-size: 13px;
  color: #999;
  margin-bottom: 10px;
}

.detail-price {
  margin-bottom: 12px;
}

.detail-price em {
  font-style: normal;
  font-size: 22px;
  color: #fa5741;
  font-weight: 600;
}

.detail-price .unit {
  font-size: 14px;
  color: #fa5741;
}

.detail-contact {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: none;
  border-radius: 6px;
  background: #30b067;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.detail-contact:active {
  background: #2a9d5c;
}
