<template>
  <div class="page">
    <div class="page-top"></div>
    <div class="page-content">
      <!-- 搜索区域 -->
      <div class="search flex justify-center">
        <input type="text" placeholder="搜索店铺" />
      </div>
      <!-- 地区筛选 -->
      <div class="city"></div>
      <!-- 标题 -->
      <div class="title">距你最近...</div>
      <!-- 机构列表 -->
      <div class="list">
        <div class="section flex items-center">
          <img src="https://picsum.photos/200/200" class="cover" />
          <div class="info">
            <div class="name">美丽肌肤体验店</div>
            <div class="line"></div>
            <div class="mobile">0755-25777189</div>
            <div class="address">深圳市宝钢区一时路街188号好吃不上火...</div>
            <div class="distance">9999km</div>
          </div>
        </div>
        <div class="section flex items-center">
          <img src="https://picsum.photos/200/200" class="cover" />
          <div class="info">
            <div class="name">美丽肌肤体验店</div>
            <div class="line"></div>
            <div class="mobile">0755-25777189</div>
            <div class="address">深圳市宝钢区一时路街188号好吃不上火...</div>
            <div class="distance">9999km</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  layout: 'app-ldm',
}
</script>

<style scoped lang="scss">
@media screen and (min-width: 768px) {
  .page-top {
    height: 596px;
    background: url(https://static.caimei365.com/www/authentic/pc/ldm-bg-club.png)
      no-repeat center;
    background-size: auto 596px;
  }
  .page-content {
    width: 836px;
    margin: 0 auto;
    overflow: hidden;
    .search {
      width: 836px;
      position: relative;
      margin: 69px auto 40px;
      input {
        display: block;
        width: 100%;
        height: 56px;
        border: 0.1vw solid #000000;
        box-sizing: border-box;
        padding-left: 80px;
        font-size: 24px;
      }

      &::after {
        position: absolute;
        left: 33px;
        top: 50%;
        transform: translateY(-50%);
        content: '';
        display: block;
        width: 37px;
        height: 37px;
        background: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-search.png)
          no-repeat center;
        background-size: 37px;
      }
    }

    .title {
      text-align: right;
      font-size: 22px;
      color: #000;
    }
    .list {
      padding-top: 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      .section {
        width: 409px;
        background: #f1f1f1;
        border-radius: 20px;
        padding: 16px;
        box-sizing: border-box;
        margin-bottom: 20px;

        .cover {
          width: 92px;
          height: 92px;
          border-radius: 17px;
        }
        .info {
          position: relative;
          width: 263px;
          margin-left: 23px;
          .name {
            width: 200px;
            position: relative;
            font-size: 15px;
            color: #000;
            font-weight: bold;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            padding-left: 20px;
            line-height: 20px;

            &::after {
              content: '';
              display: block;
              width: 20px;
              height: 20px;
              position: absolute;
              left: 0;
              top: 50%;
              transform: translateY(-50%);
              background-size: 14px 14px;
              background-repeat: no-repeat;
              background-position: left center;
            }
          }

          .name {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-store.png);
            }
          }
          .line {
            height: 1px;
            margin: 14px 0;
            background: rgba(0, 0, 0, 0.3);
          }
          .mobile,
          .address {
            position: relative;
            font-size: 12px;
            color: #000000;
            padding-left: 20px;
            line-height: 20px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;

            &::after {
              content: '';
              display: block;
              width: 20px;
              height: 20px;
              position: absolute;
              left: 0;
              top: 50%;
              transform: translateY(-50%);
              background-size: 14px 14px;
              background-repeat: no-repeat;
              background-position: left center;
            }
          }
          .mobile {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-contact.png);
            }
          }
          .address {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/pc/ldm-icon-address.png);
            }
          }

          .distance {
            position: absolute;
            font-size: 12px;
            color: #404040;
            top: 0.2vw;
            right: 0;
          }
        }
      }
    }
  }
}

@media screen and (max-width: 768px) {
  .page-top {
    height: 59.6vw;
    background: url(https://static.caimei365.com/www/authentic/h5/ldm-bg-club.png);
    background-size: auto 59.6vw;
  }
  .page-content {
    overflow: hidden;
    .search {
      width: 86vw;
      position: relative;
      margin: 7.6vw auto 5.6vw;
      input {
        display: block;
        width: 100%;
        height: 8vw;
        border: 0.1vw solid #000000;
        box-sizing: border-box;
        padding-left: 10.5vw;
      }

      &::after {
        position: absolute;
        left: 2.9vw;
        top: 50%;
        transform: translateY(-50%);
        content: '';
        display: block;
        width: 5.4vw;
        height: 5.4vw;
        background: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-search.png)
          no-repeat center;
        background-size: 5.4vw;
      }
    }

    .title {
      text-align: right;
      padding-right: 6.6vw;
      font-size: 3.5vw;
      color: #000;
    }
    .list {
      display: flex;
      flex-direction: column;
      align-items: center;
      .section {
        width: 95.1vw;
        background: #f1f1f1;
        border-radius: 2vw;
        padding: 3.2vw;
        box-sizing: border-box;
        margin: 5.7vw 0;

        .cover {
          width: 21.5vw;
          height: 21.5vw;
          border-radius: 1.7vw;
        }
        .info {
          position: relative;
          width: 61.3vw;
          margin-left: 5.8vw;
          .name {
            width: 46vw;
            position: relative;
            font-size: 3.5vw;
            color: #000;
            font-weight: bold;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            padding-left: 5vw;
            line-height: 5vw;

            &::after {
              content: '';
              display: block;
              width: 4vw;
              height: 4vw;
              position: absolute;
              left: 0;
              top: 50%;
              transform: translateY(-50%);
              background-size: 3.6vw 3.6vw;
              background-repeat: no-repeat;
            }
          }

          .name {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-store.png);
            }
          }
          .line {
            height: 0.1vw;
            margin: 2.8vw 0;
            background: rgba(0, 0, 0, 0.3);
          }
          .mobile,
          .address {
            position: relative;
            font-size: 3vw;
            color: #000000;
            padding-left: 5vw;
            line-height: 5vw;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;

            &::after {
              content: '';
              display: block;
              width: 4vw;
              height: 4vw;
              position: absolute;
              left: 0;
              top: 50%;
              transform: translateY(-50%);
              background-size: 3.6vw 3.6vw;
              background-repeat: no-repeat;
            }
          }
          .mobile {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-contact.png);
            }
          }
          .address {
            &::after {
              background-image: url(https://static.caimei365.com/www/authentic/h5/ldm-icon-address.png);
            }
          }

          .distance {
            position: absolute;
            font-size: 3vw;
            color: #404040;
            top: 0.2vw;
            right: 0;
          }
        }
      }
    }
  }
}
</style>
