/* 전국지사 카드·필터 — 정돈된 카탈로그 레이아웃 */

.branch-search-wrap {
  margin-bottom: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.branch-search-wrap input[type="text"] {
  width: 100%;
  max-width: 360px;
  padding: 11px 16px;
  border: 1px solid #cfd6e0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.branch-search-wrap input[type="text"]:focus {
  outline: none;
  border-color: #e07820;
  box-shadow: 0 0 0 3px rgba(224, 120, 32, 0.12);
}

.branch-search-wrap button {
  padding: 11px 20px;
  background: #e07820;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(224, 120, 32, 0.22);
}

.branch-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto 28px;
  padding: 0 24px;
}

.branch-filter-tabs button {
  padding: 8px 16px;
  border: 1px solid #cfd6e0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.branch-filter-tabs button:hover {
  border-color: #e07820;
  color: #e07820;
}

.branch-filter-tabs button[data-filter]:not([data-filter="all"]):hover {
  border-color: var(--region-color-border);
  color: var(--region-color);
  background: var(--region-color-bg);
}

.branch-filter-tabs button.active {
  background: #e07820;
  color: #fff;
  border-color: #e07820;
  box-shadow: 0 2px 8px rgba(224, 120, 32, 0.24);
}

.branch-filter-tabs button[data-filter]:not([data-filter="all"]).active {
  background: var(--region-color);
  color: #fff;
  border-color: var(--region-color);
  box-shadow: 0 2px 8px var(--region-color-bg);
}

.branch-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.branch-card {
  display: flex;
  flex-direction: column;
  min-height: 232px;
  background: #fff;
  border: 1px solid #cfd6e0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 4px 14px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.branch-card:hover {
  border-color: #b8c2d0;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.06),
    0 10px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.branch-card__body {
  flex: 1 1 auto;
  padding: 20px 20px 16px;
}

.branch-card .region-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.branch-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.branch-card .address {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
  min-height: 40px;
}

.branch-card .address-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.branch-card .address-text {
  flex: 1 1 auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.branch-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 14px 18px;
  background: #f8fafc;
  border-top: 1px solid #e8edf3;
}

.branch-card .manager {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
}

.branch-card .manager-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.branch-card .manager-name {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.branch-card .manager svg {
  width: 16px;
  height: 16px;
  fill: #94a3b8;
  flex-shrink: 0;
}

.branch-card .footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.branch-card .quote-btn,
.branch-card .detail-btn {
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  padding: 0;
  line-height: 1.2;
}

.branch-card .quote-btn {
  color: #fff;
  background: #e07820;
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 2px 6px rgba(224, 120, 32, 0.22);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.branch-card .quote-btn:hover {
  background: #c96a1a;
  box-shadow: 0 3px 10px rgba(224, 120, 32, 0.28);
}

.branch-card .detail-btn {
  color: #e07820;
  background: transparent;
  padding: 8px 4px;
}

.branch-card .detail-btn:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .branch-search-wrap,
  .branch-filter-tabs,
  .branch-cards-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .branch-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .branch-card__footer {
    flex-wrap: wrap;
  }

  .branch-card .footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
