html, body {
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  background: #f6f8fa;
  color: #222;
}

.top-iframe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  border: none;
  z-index: 1000;
}

.main-content {
  margin-top: 80px;
  width: 96%;
  max-width: 1320px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0 20px 0;
  box-sizing: border-box;
}

/* Filter bar styles */
.filter-bar-card {
  background: #fff;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  margin-bottom: 14px;
  position: relative;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.filter-row:last-child {
  margin-bottom: 0;
}
.filter-label {
  color: #555;
  font-size: 16px;
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
  line-height: 36px;
}
.route-arrow {
  font-size: 18px;
  color: #006633;
  flex-shrink: 0;
  font-weight: bold;
}
.search-bar {
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 8px;
  padding: 20px 0 0 0;
}
.location-input-wrapper {
  position: relative;
  display: inline-block;
  width: 450px;
  min-width: 300px;
}

.location-input {
  width: 100%;
  height: 40px;
  border: 1px solid #e0e7ef;
  border-radius: 6px;
  padding: 0 40px 0 16px; /* 右侧留出空间给清除按钮 */
  font-size: 14px;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

.location-input:focus {
  border-color: #006633;
  box-shadow: 0 2px 8px rgba(0,102,51,0.15);
}

.location-input:hover {
  border-color: #006633;
}

.search-btn {
  background: linear-gradient(135deg, #006633, #008844);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,102,51,0.3);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 10px;
  align-self: flex-end; /* 确保按钮与输入框底部对齐 */
}
.search-btn:hover {
  background: linear-gradient(135deg, #004d26, #006633);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,102,51,0.4);
}

.company-list-outer {
  background: #fff;
  box-shadow: none;
  padding: 0 0 60px 0;
  margin-top: 18px;
  position: relative;
  min-height: 200px;
  border: 1px solid #e0e7ef;
}

.company-list-wrapper {
  padding: 0 15px;
  position: relative;
}

.fixed-height-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.empty-card {
  visibility: hidden;
  border: 1px solid transparent;
  height: 150px;
  margin: 15px 0;
  padding: 0;
  min-height: 150px;
}

.no-data {
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 16px;
  width: 100%;
}

.company-list-header {
  display: none;
}

.company-list-wrapper > div:not(.company-list-header) {
  display: flex;
  padding: 20px;
  min-height: auto;
  background: none;
  transition: none;
  box-shadow: none;
  transform: none;
}

.company-card {
  display: flex;
  background: #fff;
  border-radius: 4px;
  box-shadow: none;
  margin: 15px 0;
  padding: 20px;
  align-items: flex-start;
  border: 1px solid #e0e7ef;
  transition: background-color 0.2s;
  position: relative;
  box-sizing: border-box;
}
.company-card:hover {
  background-color: #f9f9f9;
  box-shadow: none;
  transform: none;
}

/* 占位卡片样式 - 用于防止分页抖动 */
.company-card-placeholder {
  visibility: hidden; /* 隐藏但保持布局空间 */
  min-height: 150px;  /* 与实际卡片高度一致 */
  margin: 15px 0;     /* 与实际卡片间距一致 */
}

.company-logo {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  padding: 5px;
  box-sizing: border-box;
}
.company-logo img {
  max-width: 100px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
}

.company-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-right: 15px;
}

.company-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: nowrap;
}
.company-name {
  font-size: 16px;
  font-weight: 600;
  color: #006633;
  margin-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recommend-tag {
  background-color: #ff6600;
  color: #fff;
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: normal;
  display: inline-block;
  line-height: 1.5;
}

.company-service-intro {
  font-size: 13px;
  color: #333;
  margin-bottom: 3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.company-detailed-services,
.company-address-meta {
  font-size: 13px;
  color: #333;
  margin-bottom: 3px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-service-intro b,
.company-detailed-services b,
.company-address-meta b {
  color: #333;
  font-weight: 500;
}

.company-contact {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 15px;
  border-left: 1px solid #eee;
  padding-left: 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
}

.contact-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  white-space: nowrap;
}

.contact-label {
  font-size: 13px;
  color: #333;
}

.contact-phone {
  font-size: 13px;
  color: #333;
}

.publisher-text {
  font-size: 12px;
  color: #090;
  text-align: center;
  background-color: #f9f9f9;
  padding: 1px 4px;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid #e0e7ef;
}

.view-btn {
  background: #ff6600;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-weight: normal;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s;
  padding: 3px 0;
  width: 100%;
  margin-bottom: 10px;
}
.view-btn:hover {
  background: #e65c00;
  box-shadow: none;
}

.company-date {
  font-size: 12px;
  color: #999;
  text-align: center;
  width: 100%;
}

@media (max-width: 900px) {
  .company-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }
  
  .company-logo {
    margin: 0 0 15px 0;
  }
  
  .company-contact {
    width: 100%;
    margin-left: 0;
    margin-top: 15px;
    align-items: flex-start;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #eee;
    padding-top: 15px;
  }
  
  .contact-info {
    align-items: flex-start;
  }
  
  .contact-header {
    justify-content: flex-start;
  }
  
  .view-btn {
    width: 120px;
  }
  
  .company-date {
    text-align: left;
  }
}

.pagination-fixed-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
  padding: 10px 0;
  display: flex;
  justify-content: center;
  z-index: 3;
  border-top: 1px solid #e0e7ef;
}

.pagination {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  border: none;
  border-radius: 2px;
  background: #f3f3f3;
  color: #222;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 8px;
  box-shadow: none;
}

.page-btn:hover {
  background: #e5e5e5;
  box-shadow: none;
}

.page-btn.active {
  background: #ff9900;
  color: #fff;
  font-weight: normal;
  box-shadow: none;
}

.page-btn.disabled {
  background: #f8f8f8;
  color: #bbb;
  cursor: not-allowed;
  box-shadow: none;
}

.page-ellipsis {
  color: #bbb;
  font-size: 14px;
  padding: 0 2px;
}

.footer-iframe {
  width: 100%;
  border: none;
}

/* 省市区选择弹窗 */
#location-modal-mask {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.18);
  z-index: 9999;
}
#location-modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 32px 36px 24px 36px;
  z-index: 10000;
  min-width: 340px;
}
.modal-title {
  font-size: 18px;
  font-weight: bold;
  color: #006633;
  margin-bottom: 18px;
}
.modal-select-group {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-select-group select {
  width: 110px;
  border: 1px solid #e0e7ef;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border 0.2s;
}
.modal-select-group select:focus {
  border-color: #006633;
}
.modal-actions {
  text-align: right;
}
.modal-actions button {
  padding: 6px 22px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
}
#modal-cancel-btn {
  margin-right: 12px;
  background: #eee;
  color: #333;
}
#modal-ok-btn {
  background: #006633;
  color: #fff;
}

@media (max-width: 900px) {
  .company-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }
  .grid-12 {
    grid-template-columns: 1fr;
    gap: 10px 0;
  }
  .company-logo.col-3 {
    margin: 0 auto 12px auto;
    justify-content: center;
  }
  .company-info {
    gap: 4px;
  }
  .company-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .company-name, .recommend-tag {
    margin-left: 0;
  }
  .company-contact-top {
    margin-left: 0;
  }
  .company-service-intro, .company-detailed-services, .company-address-meta {
    font-size: 14px;
  }
  .ellipsis-2 {
    min-height: 34px;
  }
  .company-action {
    align-items: center;
    margin-top: 15px;
    justify-content: flex-start;
  }
  .publisher-info {
    align-items: center;
    margin-bottom: 8px;
  }
  .view-btn {
    max-width: 100%;
    padding: 6px 20px;
    font-size: 14px;
    align-self: center;
    margin-bottom: 8px;
  }
  .company-date {
    margin-top: 8px;
    align-self: center;
    text-align: center;
  }
}

/* 优化服务类别和省份按钮组样式 */
.service-btn-group, .province-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin: 0 0 18px 0;
}
.service-btn, .province-btn {
  background: #f5f7fa;
  color: #145a2a;
  border: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
  min-width: 60px;
  min-height: 34px;
  box-shadow: 0 1px 2px rgba(0,102,51,0.04);
  letter-spacing: 1px;
}
.service-btn.active, .province-btn.active {
  background: #006633;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,153,68,0.10);
  border: 1.5px solid #009944;
}
.service-btn:hover:not(.active), .province-btn:hover:not(.active) {
  background: #e0f3e7;
  color: #009944;
}
.filter-row.search-bar {
  display: flex;
  gap: 18px 0;
  align-items: flex-start;
}
.filter-label {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 500;
  color: #888888;
  min-width: 80px;
}
.search-btn {
  margin-left: 0;
  margin-top: 0px;
  height: 40px;
  font-size: 18px;
  font-weight: 600;
  padding: 0 38px;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .service-btn, .province-btn {
    font-size: 15px;
    padding: 5px 12px;
    min-width: 60px;
    min-height: 34px;
  }
  .service-btn-group, .province-btn-group {
    gap: 8px 8px;
    margin: 10px 0 10px 0;
  }
  .filter-label {
    font-size: 15px;
    min-width: 60px;
  }
  .search-btn {
    font-size: 15px;
    padding: 0 18px;
    height: 34px;
  }
  .company-name-input-wrapper {
    width: 100%;
    min-width: 200px;
  }
  .company-name-input {
    height: 36px;
    font-size: 14px;
  }
  .search-btn {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
  }
  .filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.filter-row-flex {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-row-flex .filter-label {
  margin-right: 18px;
}
.service-btn-group, .province-btn-group {
  flex: 1;
  min-width: 0;
}
@media (max-width: 900px) {
  .filter-row-flex {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
  }
  .filter-row-flex .filter-label {
    margin-right: 0;
  }
}

/* 12栏布局 */
.grid-12 {
  display: grid;
  grid-template-columns: 3fr 7fr 2fr;
  gap: 0 28px;
  align-items: stretch;
  width: 100%;
}
.col-3 { grid-column: 1 / 2; }
.col-7 { grid-column: 2 / 3; }
.col-2 { grid-column: 3 / 4; }
.company-logo.col-3 {
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-action.col-2 {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  min-height: 44px;
}
@media (max-width: 900px) {
  .grid-12 {
    grid-template-columns: 1fr;
    gap: 10px 0;
  }
  .company-logo.col-3, .company-action.col-2 {
    justify-content: flex-start;
  }
  .company-action.col-2 {
    margin-top: 10px;
  }
}

/* 新的筛选按钮样式 - 与货源大厅保持一致 */
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-btn {
  background: #f6f8fa;
  border: none;
  border-radius: 4px;
  color: #222;
  font-size: 15px;
  padding: 4px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.filter-btn.active, .filter-btn:hover {
  background: #02542A;
  color: #fff;
}

/* 加载状态样式 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
  color: #666;
  font-size: 14px;
  height: 400px;
}

.loading-state-icon {
  font-size: 24px;
  margin-bottom: 10px;
  animation: rotate 2s linear infinite;
}

.loading-state-text {
  color: #999;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 骨架屏样式 */
.skeleton-card {
  opacity: 0.7;
  pointer-events: none;
}

.skeleton-line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 60%;
}

.skeleton-text {
  height: 16px;
  width: 80%;
}

.skeleton-text-short {
  height: 16px;
  width: 40%;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.companies-list.loading {
  opacity: 0.8;
}

/* 企业名称搜索输入框样式 */
.company-name-input-wrapper {
  position: relative;
  display: inline-block;
  width: 350px; /* 减小宽度，为搜索按钮留出空间 */
  min-width: 250px;
}

.company-name-input {
  width: 100%;
  height: 40px;
  border: 1px solid #e0e7ef;
  border-radius: 6px;
  padding: 0 40px 0 16px; /* 右侧留出空间给清除按钮 */
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

.company-name-input:focus {
  border-color: #006633;
  box-shadow: 0 2px 8px rgba(0,102,51,0.15);
}

.company-name-input:hover {
  border-color: #006633;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s;
  z-index: 2;
}

.clear-btn:hover {
  color: #666;
} 