/* 合作工厂列表/详情；列表页头与品牌中心 page-header--brands 完全对齐 */

.factory-partners .page-header--brands {
  background: transparent;
  color: inherit;
  padding: 18px 0 8px;
  text-align: left;
  margin-bottom: 0;
  border-bottom: 1px solid #eef0f3;
}
.factory-partners .page-header__title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
}
.factory-partners .page-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--primary-color, #e83500);
  background: rgba(232, 53, 0, 0.08);
  flex-shrink: 0;
}
.factory-partners .page-header__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #1f2937;
}
.factory-partners .product-locate-tip {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
}
/* 已取消页内 search-bar，搜索统一走顶栏「工厂」 */
.factory-partners .search-bar {
  display: none !important;
}
.factory-section {
  padding: 24px 0 40px;
  background: #f5f7fa;
  min-height: 500px;
}
.factory-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}
.factory-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.factory-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}
.factory-logo {
  width: 140px;
  height: 140px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.factory-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.factory-logo .logo-error {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  color: #909399;
  font-size: 40px;
  border-radius: 8px;
}
/* 分页对齐品牌中心 .brands-pagination */
.factory-section .pagination,
.factory-section .brands-pagination {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  color: #606266;
  font-size: 14px;
}
.factory-section .pagination__meta {
  color: #909399;
  font-size: 13px;
}
.factory-section .pagination__meta strong {
  color: #303133;
  font-weight: 600;
}
.factory-section .pagination__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.factory-section .pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}
.factory-section .pagination__btn,
.factory-section .pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fff;
  color: #606266;
  text-decoration: none;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.factory-section .pagination__btn:hover,
.factory-section .pagination__page:hover {
  color: var(--primary-color, #e83500);
  border-color: var(--primary-color, #e83500);
  background: #fff7f4;
}
.factory-section .pagination__page.is-active {
  background: var(--primary-color, #e83500);
  border-color: var(--primary-color, #e83500);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232, 53, 0, 0.25);
  pointer-events: none;
}
.factory-section .pagination__btn--disabled {
  color: #c0c4cc;
  border-color: #ebeef5;
  background: #f5f7fa;
  cursor: not-allowed;
}
.factory-section .pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: #c0c4cc;
  letter-spacing: 1px;
}
@media (max-width: 640px) {
  .factory-section .brands-pagination {
    padding: 14px 12px;
    gap: 12px;
  }
  .factory-section .pagination__btn,
  .factory-section .pagination__page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }
}

/* 弹窗复用 portal-product.css 的 .portal-dialog / .brand-action-* */

/* 详情 */
.factory-detail-page {
  background: #f5f7fa;
  min-height: 60vh;
}
.detail-wrap {
  padding: 28px 0 48px;
}
.breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #909399;
  margin-bottom: 8px;
}
.breadcrumb-nav a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb-nav__sep { color: #c0c4cc; }
.detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  margin-top: 16px;
  border: 1px solid #ebeef5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f0f2f5;
}
.hero-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.factory-detail-page .logo,
.logo-fallback {
  width: 98px;
  height: 98px;
  border-radius: 10px;
  border: 1px solid #ebeef5;
  background: #fff;
  object-fit: contain;
}
.logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  color: #909399;
  font-size: 28px;
}
.factory-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
  color: #1f2937;
}
.factory-industry {
  margin: 10px 0 0;
  font-size: 15px;
  color: #6b7280;
}
.status-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d1fae5;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 600;
}
.meta-card {
  margin-top: 18px;
  border-radius: 10px;
  border: 1px solid #ebeef5;
  background: #fafbfc;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.meta-label { font-size: 13px; color: #9ca3af; }
.meta-value {
  font-size: 15px;
  color: #374151;
  line-height: 1.5;
  word-break: break-all;
}
.block { margin-top: 22px; }
.intro-block,
.relation-block {
  border: 1px solid #ebeef5;
  border-radius: 10px;
  padding: 18px 20px;
  background: #fff;
}
.block-title {
  margin: 0 0 14px;
  font-size: 18px;
  color: #1f2937;
}
.intro-content {
  color: #303133;
  font-size: 17px;
  line-height: 1.8;
}
.intro-content img { max-width: 100%; height: auto; }
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.enterprise-header {
  background: linear-gradient(135deg, var(--page-header-bg-start), var(--page-header-bg-end));
  color: #fff;
  padding: 36px 0;
  text-align: center;
}
.enterprise-header__title {
  margin: 0 0 8px;
  font-size: 28px;
}
.enterprise-header__desc {
  margin: 0;
  opacity: 0.9;
  font-size: 14px;
}

@media (max-width: 1439px) {
  .factory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .factory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .meta-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factory-title { font-size: 24px; }
  .factory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 768px) {
  .factory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .factory-partners .page-header--brands { padding: 14px 0 6px; }
  .factory-partners .page-header__title { font-size: 18px; }
  .factory-partners .page-header__icon { width: 32px; height: 32px; }
}
@media (max-width: 640px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .meta-card { grid-template-columns: 1fr; }
  .factory-title { font-size: 21px; }
}
@media (max-width: 480px) {
  .factory-grid { grid-template-columns: 1fr; }
}
